read_mtx¶
- besca.Import.read_mtx(filepath, annotation=True, use_genes='SYMBOL', species='human', citeseq=None)[source]¶
- Read matrix.mtx, genes.tsv, barcodes.tsv to AnnData object. By specifiying an input folder this function reads the contained matrix.mtx, genes.tsv and barcodes.tsv files to an AnnData object. In case annotation = True it also adds the annotation contained in metadata.tsv to the object. :param filepath: filepath as string to the directory containg the matrix.mtx, genes.tsv, - barcodes.tsv and if applicable metadata.tsv - Parameters:
- annotation (bool (default = True)) – boolian identifier if an annotation file is also located in the folder and should be added to the AnnData object 
- use_genes (str) – either SYMBOL or ENSEMBL. Other genenames are not yet supported. 
- species (str | default = ‘human’) – string specifying the species, only needs to be used when no Gene Symbols are supplied and you only have the ENSEMBLE gene ids to perform a lookup. 
- citeseq ('gex_only' or 'citeseq_only' or False or None | default = None) – string indicating if only gene expression values (gex_only) or only protein expression values (‘citeseq_only’) or everything is read if None is specified 
 
- Return type:
- returns an AnnData object