write_labeling_to_files¶
- besca.export.write_labeling_to_files(adata: AnnData, outpath: Optional[str] = None, column: str = 'leiden', label: str = 'LABEL', filename: str = 'cell2labels.tsv', export_average: bool = True, export_fractpos: bool = True, use_raw: bool = True) None[source]¶
- export mapping of cells to specified label to .tsv file - This is a function with which any type of labeling (i.e. celltype annotation, leiden clustering, etc.) can be written out to a .tsv file. The generated file can then also be easily uploaded to the database since it fullfilles the FAIR document standards. - To ensure FAIR compatbility label, and file name should not be changed. - Parameters:
- adata (AnnData) – the AnnData object containing the label 
- directory (outpath str | default = current working) – filepath to the directory in which the results should be outputed, if no directory is specified it outputs the results to the current working directory. 
- column (str | default = ‘leiden’) – Name of the column in adata.obs that is to be mapped to cell barcodes and written out to file. 
- label (str | default = ‘LABEL’) – label above the column when it is written out to file 
- filename (str | default = ‘cell2labels.tsv’) – Filename that is written out. 
 
- Returns:
- files are written out. 
- Return type:
- None