episcanpy.api.ct.save_sparse_mtx¶
- episcanpy.api.ct.save_sparse_mtx(initial_matrix, output_file='.h5ad', path='', omic='ATAC', bed=False, save=True)¶
Convert regular atac matrix into a sparse Anndata:
- Parameters
- initial_matrix : initial dense count matrix to load and convert into a sparse matrix.
- bed = True : If
- should be the path to the bed file. : initial_matrix
- output_file : name of the output file for the AnnData object.
- output is the name of the input file with .h5ad extension : Default
- path : path to the input count matrix. The AnnData object is written in the current directory,
not the location specified in path.
- omic : 'ATAC', 'RNA' or 'methylation' are the 3 currently recognised omics in epiScanpy.
However, other omic name can be accepted but are not yet recognised in other functions. default: ‘ATAC’
- bed : boolean. If True it consider another input format (bedtools output format for count matrices)
- save : boolean. If True, the sparse matrix is saved as h5ad file. Otherwise it is simply return.
- Returns
It returns the loaded matrix as an AnnData object.