Downstream

Downstream#

add_mat_to_adata(adata, matrix, cell_order, ...)

Add the SwiftCNV output matrix to an anndata.AnnData object along with matrix indices (cell_order and gene_order).

load_output(output_dir[, adata])

Load the outputs of SwiftCNV written in a directory.

summarise_by_obs(adata[, obsm_key, by, mode])

Summarise the values in the specified obsm matrix by cell attributes (sample by default).

summarise_by_var(adata[, obsm_key, by, ...])

Summarise the values of the specified obsm matrix by gene attributes (arm by default).

cnv_score(adata[, obsm_key, key_added, inplace])

Calculate CNV burden as the mean of the CNV scores squared.

get_genes_chr_arm(adata[, obsm_key, chr_arms])

Get the genes corresponding to a specific chromosome arm from an anndata.AnnData object.

get_cancer_type_correlation(mat, arms[, ...])

Get correlation scores to copy number gains retreived from https://doi.org/10.1038/s41586-023-06054-z by arm by cancer type.