Skip to content

Commit

Permalink
Fixed docstring width in mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
npalacioescat committed Feb 27, 2020
1 parent 1705143 commit 5eae913
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/pypath/utils/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,22 +1162,20 @@ def map_name(
Returns set of the target ID type.
This function should be used to convert individual IDs.
It takes care about everything and ideally you don't need to think
on the details.
It takes care about everything and ideally you don't need to
think on the details.
How does it work: looks up dictionaries between the original
and target ID type, if doesn't find, attempts to load from
the predefined inputs.
If the original name is genesymbol, first it looks up
among the preferred gene names from UniProt, if not
found, it takes an attempt with the alternative gene
names. If the gene symbol still couldn't be found, and
strict = False, the last attempt only the first 5 chara-
cters of the gene symbol matched. If the target name
type is uniprot, then it converts all the ACs to primary.
Then, for the Trembl IDs it looks up the preferred gene
names, and find Swissprot IDs with the same preferred
gene name.
and target ID type, if doesn't find, attempts to load from the
predefined inputs.
If the original name is genesymbol, first it looks up among the
preferred gene names from UniProt, if not found, it takes an
attempt with the alternative gene names. If the gene symbol
still couldn't be found, and strict = False, the last attempt
only the first 5 characters of the gene symbol matched. If the
target name type is uniprot, then it converts all the ACs to
primary. Then, for the Trembl IDs it looks up the preferred gene
names, and find Swissprot IDs with the same preferred gene name.
name : str
The original name to be converted.
Expand All @@ -1195,12 +1193,14 @@ def map_name(
- embl (DDBJ/EMBL/GeneBank CDS accession)
- embl_id (DDBJ/EMBL/GeneBank accession)
To use other IDs, you need to define the input method
and load the table before calling :py:func:Mapper.map_name().
and load the table before calling
:py:func:Mapper.map_name().
target_id_type : str
The name type to translate to, more or less the same values
are available as for ``id_type``.
nameType : str
Deprecated. Synonym for ``id_type`` for backwards compatibility.
Deprecated. Synonym for ``id_type`` for backwards
compatibility.
targetNameType : str
Deprecated. Synonym for ``target_id_type``
for backwards compatibility.
Expand Down

0 comments on commit 5eae913

Please sign in to comment.