API#

Import scMagnify as:

import scmagnify as scm

API Flowchart

Models#

MAGNI(data[, modal, layer, time_key, ...])

Class implementing Multi-Scale Gene Regulation Inference (MAGNI).

MSNGC(n_reg, n_target[, chrom_constraint, ...])

Generalised VAR (GVAR) model based on self-explaining neural networks, primarily based on the concepts described in [1]_.

partial_ordering(adata[, dyn, lag])

Computes the partial ordering of cells using diffusion operators from RNA velocity or pseudotime kernels.

chromatin_constraint(data[, modal, layer, ...])

Build chromatin constraints and import them into the analysis.

import_basalGRN(basal_grn, adata[, ...])

Import a provided basal GRN and align it to the given AnnData.

Tools#

tools.lineage_classifer(data[, modal, ...])

Select cells along lineage branches using pseudotime and fate probabilities.

tools.select_paga_path(data, nodes[, modal, ...])

Select cells along specified nodes in a PAGA graph.

tools.test_association(data[, modal, layer, ...])

Test association between genes and pseudotime, and optionally re-filter significant genes.

tools.build_metacells_SEACells(mdata[, ...])

Build metacells using SEACells for RNA and ATAC modalities in a MuData object.

tools.connect_peaks_genes(data, meta_mdata)

Calculate the correlation between ATAC-seq peaks and gene expression for a list of genes.

tools.MotifScanner([motif_db, ...])

A class for scanning DNA sequences for motifs using position frequency matrices (PFMs).

tools.convert_motif_format(input_path, ...)

Converts between different motif file formats.

tools.get_network_score(gdata[, modal, ...])

Calculate centrality measures for all nodes in a directed graph.

tools.RegDecomp(data[, net_key, ...])

A class for performing tensor decomposition on gene regulatory networks to identify regulatory factors (RegFactors).

tools.extract_regfactor_genes(data[, ...])

Extract TFs or TGs with high loadings for each RegFactor and optionally plot their distributions.

tools.FuncEnrich(gene_sets[, geneset_col, ...])

Performs Over-Representation Analysis (ORA) to identify enriched biological pathways or gene sets from a given list of genes.

tools.infer_signal_pairs(data, meta_mdata, ...)

Infer receptor-to-transcription factor (RTF) downstream activity.

Plotting#

plotting.barplot(data[, modal, key, n_top, ...])

Plot top features per group as bar charts.

plotting.rankplot(data[, modal, key, n_top, ...])

Plot ranked features per group with label annotations.

plotting.circosplot(data[, modal, ...])

Plot a Circos plot for GRN analysis with an optional central embedding scatter plot.

plotting.heatmap(data, var_names[, modal, ...])

Plot time series for genes as a heatmap.

plotting.trendplot(data, var_dict[, sortby, ...])

Plot variable trends along a sorted dimension (e.g., pseudotime).

plotting.stripplot(data[, modal, key, ...])

Plot a PairGrid of the top n-th genes with high-network scores, with isolated plotting parameters and italicized gene labels.

plotting.distplot(data_dict, thresholds[, ...])

Plot the distribution of multiple parameters with thresholds on separate subplots.

plotting.GRNVisualizer(gdata)

Class for visualizing gene regulatory networks (GRNs) from GRNMuData objects.

plotting.GenomeViewer(data[, modal, gtf, ...])

A class to visualize genomic loci, including coverage tracks, gene annotations, and other genomic features.

Settings#

Logging#

Utils#

GRNMuData(data, tf_act, network)

GRNMuData class extends the MuData class to include a Gene Regulatory Network (GRN) and associated TF activity data.