celltype_labeling

besca.st.celltype_labeling(adata, labeling_author, results_folder, labeling_to_use='celltype', labeling_name='celltype', labeling_description='manual celltype annotation', cluster_method='louvain')[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 | default = ‘celltype’) – 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 | default = ‘celltype’) – string identifiying under which name the labeling should be exported

  • labeling_description (str | default = ‘manual celltype annotation’) – 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)

Returns:

writes out several files to folder results_folder/labelings/<labeling_name>

Return type:

None

Deprecated since version 2.5: This will be removed in 3.0. Use the additional_labeling function instead