additional_labeling¶
- besca.st.additional_labeling(adata: AnnData, labeling_to_use: str, labeling_name: str, labeling_description: str, labeling_author: str = '', results_folder: str = './', cluster_method: str = 'louvain', is_celltype_labeling: bool = False, filename: str = 'labelinfo.tsv')[source]¶
Standard Workflow function to export an additional labeling besides louvain to FAIR format.
This function calculated marker genes per label (using rank_genes_groups and the method ‘wilcoxon’), exports the labeling, generates a labeling_info file, and exports the rank file.
- Parameters:
adata (AnnData) – AnnData object from which the labeling is to be exported
labeling_to_use (str) – string identifying the column in adata.obs containing the labeling that is to be exported (also used to calculate the ranked_genes)
labeling_name (str) – string identifiying under which name the labeling should be exported
labeling_description (str) – string defining the description which should be saved in the labeling_info file for the exported labeling
labeling_author (str) – string defining the author of the labeling which should be saved in the labeling_info file for the exported labeling
results_folder (str) – string indicating the basepath to the results folder which is automatically generated when using the standard workflow (pass results_folder)
cluster_method (str) –
for (string identifying of what othe labeling/dataset this is an annotated version of (so) – example if the labeling is celltype annotation of a leiden clustering then this would reference the leiden clsutering that was used to obtain the clusters that were then labeled here)
is_celltype_labeling (bool) – Set to true if you want to use the former celltype based labeling
filename (str) – name of the labeling info file
- Returns:
writes out several files to folder results_folder/labelings/<labeling_name>
- Return type:
None