API#

Import infercnvpy together with scanpy as

import scanpy as sc
import infercnvpy as cnv

For consistency, the infercnvpy API tries to follow the scanpy API as closely as possible.

Input/Output: io#

genomic_position_from_gtf(gtf_file[, adata, ...])

Get genomic gene positions from a GTF file.

read_scevan(adata, scevan_res_dir[, ...])

Load results from SCEVAN [FCS+21] for downstream analysis with infercnvpy.

Preprocessing: pp#

neighbors(adata[, use_rep, key_added, inplace])

Compute the neighborhood graph based on the result from infercnvpy.tl.infercnv().

Tools: tl#

Tools add an interpretable annotation to the AnnData object which usually can be visualized by a corresponding plotting function.

The tools for embeddings and clustering mirror the scanpy API. However, while the scanpy tools operate on transcriptomics data, the infercnvpy equivalent operates on CNV data.

InferCNV#

infercnv(adata, *[, reference_key, ...])

Infer Copy Number Variation (CNV) by averaging gene expression over genomic regions.

copykat(adata[, gene_ids, organism, ...])

Inference of genomic copy number and subclonal structure.

CNV scores#

cnv_score(adata[, groupby, use_rep, ...])

Assign each cnv cluster a CNV score.

ithcna(adata, groupby, *[, use_rep, ...])

Compute the ITHCNA diversity score based on copy number variation [WFH+21].

ithgex(adata, groupby, *[, use_raw, layer, ...])

Compute the ITHGEX diversity score based on gene expression cite:Wu2021.

Embeddings#

pca(adata[, svd_solver, zero_center, ...])

Compute the PCA on the result of infercnvpy.tl.infercnv().

umap(adata[, neighbors_key, key_added, inplace])

Compute the UMAP on the result of infercnvpy.tl.infercnv().

tsne(adata[, use_rep, key_added, inplace])

Compute the t-SNE on the result of infercnvpy.tl.infercnv().

Clustering#

leiden(adata[, neighbors_key, key_added, ...])

Perform leiden clustering on the CNV neighborhood graph.

Plotting: pl#

InferCNV#

chromosome_heatmap(adata, *[, groupby, ...])

Plot a heatmap of smoothed gene expression by chromosome.

chromosome_heatmap_summary(adata, *[, ...])

Plot a heatmap of average of the smoothed gene expression by chromosome per category in groupby.

Embeddings#

umap(adata, **kwargs)

Plot the CNV UMAP.

tsne(adata, **kwargs)

Plot the CNV t-SNE.

Datasets: datasets#

maynard2020_3k()

Return the dataset from [MMR+20] as AnnData object, downsampled to 3000 cells.

oligodendroglioma()

The original inferCNV example dataset.