decoupler.translate_net
- decoupler.translate_net(net, source='source', target='target', source_tax_id=9606, target_tax_id=10090, id_type='genesymbol', translate_source=False)
Translate networks between species by orthology.
This function downloads orthology databases from omnipath and converts genes between species. The first time you run this function will take a while (~15 minutes) but then it stores all the information in cache for quick reusability.
In case you need to restart the cache, you can do it by doing:
rm -r .pypath/cache/
- Parameters:
- netDataFrame
Network in long format.
- sourcestr
Column name in net with source nodes.
- targetstr
Column name in net with target nodes.
- source_tax_idint
NCBI Taxonomy ID of the source organism.
- target_tax_idint
NCBI Taxonomy ID of the target organism.
- id_type: str
Identifier type of the source and target columns. Can be “genesymbol”, “uniprot”, “ensmbl”
- translate_sourcebool
Whether to also translate the source column in net.
- Returns:
- hom_netDataFrame
Network in long format with translated genes.