pypath.utils.mapping.map_names§

pypath.utils.mapping.map_names(names, id_type=None, target_id_type=None, ncbi_tax_id=None, strict=False, expand_complexes=True, uniprot_cleanup=True)[source]§

Same as map_name but translates multiple IDs at once. These two functions could be seamlessly implemented as one, still I created separate functions to always make it explicit if a set of translated IDs come from multiple original IDs.

Args

name (str): The original name to be converted. id_type (str): The type of the name. Available by default:

  • genesymbol (gene name)

  • entrez (Entrez Gene ID [#])

  • refseqp (NCBI RefSeq Protein ID [NP_*|XP_*])

  • ensp (Ensembl protein ID [ENSP*])

  • enst (Ensembl transcript ID [ENST*])

  • ensg (Ensembl genomic DNA ID [ENSG*])

  • hgnc (HGNC ID [HGNC:#])

  • gi (GI number [#])

  • embl (DDBJ/EMBL/GeneBank CDS accession)

  • embl_id (DDBJ/EMBL/GeneBank accession)

And many more, see the code of pypath.internals.input_formats

target_id_type (str): The name type to translate to, more or

less the same values are available as for id_type.

ncbi_tax_id (int): NCBI Taxonomy ID of the organism. strict (bool): In case a Gene Symbol can not be translated,

try to add number “1” to the end, or try to match only its first five characters. This option is rarely used, but it makes possible to translate some non-standard gene names typically found in old, unmaintained resources.

expand_complexes (bool): When encountering complexes,

translated the IDs of its components and return a set of IDs. The alternative behaviour is to return the Complex objects.

uniprot_cleanup (bool): When the target_id_type is UniProt

ID, call the Mapper.uniprot_cleanup function at the end.