infercnvpy.io.read_scevan
- infercnvpy.io.read_scevan(adata, scevan_res_dir, scevan_res_table=None, *, subclones=True, inplace=True, subset=True, key_added='scevan')
Load results from SCEVAN [FCS+21] for downstream analysis with infercnvpy.
Requires that the cell barcodes used for SCEVAN and
adata.obs_namesmatch, but the order is irrelevant.- Parameters
- adata :
AnnData adata object to which the SCEVAN results shall be added
- scevan_res_table :
str|Path|NoneUnion[str,Path,None] (default:None) The results of
SCEVAN::pipelineCNAsaved as CSV file. Will add the columns{key_added}_class,{key_added}_confident_normaland, if SCEVAN was ran with subclone calling,{key_added}_subclonetoadata.obs. This parameter can be omitted if you only want to load the CNV matrix.- scevan_res_dir :
str|PathUnion[str,Path] The output directory created by SCEVAN. Must only contain results for a single sample. Will read the files
*_CNAmtx.RData,*_CNAmtxSubclones.RData(if available), and*_count_mtx_annot.RData.- subclones :
bool(default:True) Load the separate subclone segmentation, if available.
- subset :
bool(default:True) If
True(the default), subset anndata to the cells that have not been filtered out by the SCEVAN analysis. Otherwise the CNV matrix may containnan-values and downstream analysis such as PCA will not work.- key_added :
str(default:'scevan') Used as prefix for the columns added to
adata.obsand will add the CNV matrix asX_{key_added}toadata.obsm, and chromosome indices toadata.uns[key_added].- inplace :
bool(default:True) If
True, modify anndata inplace. Otherwise, return a copy.
- adata :
- Return type
- Returns
Depending on the value of
inplacereturns a modified AnnData object or returnsNoneand modifies adata inplace.