py4cytoscape.tables.map_table_column¶
-
map_table_column
(column, species, map_from, map_to, force_single=True, table='node', namespace='default', network=None, base_url='http://127.0.0.1:1234/v1')[source]¶ Map Table Column.
Perform identifier mapping using an existing column of supported identifiers to populate a new column with identifiers mapped to the originals.
Supported species: Human, Mouse, Rat, Frog, Zebrafish, Fruit fly, Mosquito, Worm, Arabidopsis thaliana, Yeast, E. coli, Tuberculosis. Supported identifier types (depending on species): Ensembl, Entrez Gene, Uniprot-TrEMBL, miRBase, UniGene, HGNC (symbols), MGI, RGD, SGD, ZFIN, FlyBase, WormBase, TAIR.
- Parameters
column (str) – Name of column containing identifiers of type specified by
map.from
species (str) – Common name for species associated with identifiers, e.g., Human. See details.
map_from (str) – Type of identifier found in specified
column
. See details.map.to (str) – Type of identifier to populate in new column. See details.
force.single (bool) – Whether to return only first result in cases of one-to-many mappings; otherwise the new column will hold lists of identifiers. Default is TRUE.
table (str) – name of Cytoscape table to load data into, e.g., node, edge or network; default is “node”
namespace (str) – Namespace of table. Default is “default”.
network (SUID or str or None) – Name or SUID of a network. Default is the “current” network active in Cytoscape.
base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://127.0.0.1:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.
- Returns
contains map_from and map_to columns.
- Return type
dataframe
Warning
If map_to is not unique, it will be suffixed with an incrementing number in parentheses, e.g., if mapIdentifiers is repeated on the same network. However, the original map_to column will be returned regardless.
- Raises
HTTPError – if table or namespace or table doesn’t exist in network
CyError – if network name or SUID doesn’t exist, or if mapping parameter is invalid
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> map_table_column('name','Yeast','Ensembl','SGD') name SGD 17920 YER145C S000000947 17921 YMR058W S000004662 17922 YJL190C S000003726 ...