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_names
match, but the order is irrelevant.- Parameters:
adata (
AnnData
) – adata object to which the SCEVAN results shall be addedscevan_res_table (
Union
[str
,Path
,None
] (default:None
)) – The results ofSCEVAN::pipelineCNA
saved as CSV file. Will add the columns{key_added}_class
,{key_added}_confident_normal
and, if SCEVAN was ran with subclone calling,{key_added}_subclone
toadata.obs
. This parameter can be omitted if you only want to load the CNV matrix.scevan_res_dir (
Union
[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
)) – IfTrue
(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 toadata.obs
and will add the CNV matrix asX_{key_added}
toadata.obsm
, and chromosome indices toadata.uns[key_added]
.inplace (
bool
(default:True
)) – IfTrue
, modify anndata inplace. Otherwise, return a copy.
- Return type:
- Returns:
Depending on the value of
inplace
returns a modified AnnData object or returnsNone
and modifies adata inplace.