sfaira.versions.genomes.GenomeContainer

class sfaira.versions.genomes.GenomeContainer(organism: Optional[str] = None, release: Optional[str] = None)

Container class for a genome annotation for a specific release.

This class can be used to translate between symbols and ENSEMBL IDs for a specific assembly, to store specific gene subsets of an assembly, and to subselect genes by biotypes in an assembly.

Attributes

biotype

List of biotypes of genes in genome container.

ensembl

List of ENSEMBL IDs of genes in genome container.

id_to_symbols_dict

Dictionary-formatted map of ENSEMBL IDs to gene symbols.

n_var

Number of genes in genome container.

strippednames_to_id_dict

symbol_to_id_dict

Dictionary-formatted map of gene symbols to ENSEMBL IDs.

symbols

List of symbols of genes in genome container.

genome_tab

release

Methods

load_genome()

organism()

set([biotype, symbols, ensg])

Subset by gene biotype or to gene list defined by identifiers (symbol or ensemble ID).

translate_id_to_symbols(x)

Translate ENSEMBL IDs to gene symbols.

translate_symbols_to_id(x)

Translate gene symbols to ENSEMBL IDs.