analysis_metadata

besca.export.analysis_metadata(adata: AnnData, outpath: Optional[str] = None, filename: str = 'analysis_metadata.tsv', total_counts: bool = True, n_pcs: int = 3, umap: bool = True, tsne: bool = False, percent_mito: bool = True, n_genes: bool = True)[source]

export plotting coordinates to analysis_metadata.tsv

This function exports the indicated plotting coordinates or calculated PCAs to a .tsv file. This can be used to either transfer the data between different analysis platforms but can also be uploaded to the scseq database sicne the file follows the FAIR document format.

To ensure FAIR compatibility the filename should not be changed.

Parameters:
  • adata (AnnData) – the AnnData object containing the metadata

  • 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.

  • filename (str | default = ‘analysis_metadata.tsv’) – filename of the file that is to be written out

  • total_counts (bool | default = True) – boolian indicator if total counts should be written out or not

  • n_pcs (int | default = 3) – indicates number of PCA components that should be written out. If 0 no PCA components will be written out

  • umap (bool | default = True) – boolian indicator if UMAP coordinates should be written out.

  • tsne (bool | default = False) – boolian indicator if tSNE coordinates should be written out.

  • percent_mito (bool | default = True) – boolian indicator if percent_mito should be written out or not

  • n_genes (bool | default = True) – boolian indicator if n_genes should be written out or not

Returns:

file is written out.

Return type:

None