Tools: tl

Tools: tl#

The tools module crested.tl provides everything you need to train and interpret models.

Submodules

data

Utility functions to prepare data for training and evaluation.

design

Functions to design enhancers using CREsted models.

losses

Custom tf.Keras.losses.Loss functions for specific use cases.

metrics

Custom tf.keras.metrics.Metric metrics for specific use cases.

modisco

TF-MoDISco (utility) functions.

zoo

Custom tf.keras.Model definitions that have shown to work well in specific use cases.

Classes

Crested

Main class to handle training, testing, predicting and calculation of contribution scores.

TaskConfig

Task configuration (optimizer, loss, and metrics) for use in tl.Crested.

Functions

contribution_scores(input, target_idx, model)

Calculate contribution scores based on given method for the specified inputs.

contribution_scores_specific(input, ...[, ...])

Calculate contribution scores based on given method only for the most specific regions per class.

default_configs(task[, num_classes])

Get default loss, optimizer, and metrics for an existing task.

enhancer_design_in_silico_evolution(*args, ...)

Create synthetic enhancers for a specified class using in silico evolution (ISE).

enhancer_design_motif_insertion(*args, **kwargs)

Create synthetic enhancers using motif insertions.

evaluate(adata, model[, metrics, split, ...])

Calculate metrics on the test set.

extract_layer_embeddings(input, model, ...)

Extract embeddings from a specified layer for all inputs.

predict(input, model[, genome, batch_size])

Make predictions using the model(s) on some input that represents sequences.

score_gene_locus(chr_name, gene_start, ...)

Score regions upstream and downstream of a gene locus using the model's prediction.