db_map
ensembl.io.genomio.external_db.db_map
¶
Get a mapping for external db names.
DEFAULT_EXTERNAL_DB_MAP = default_map_path
module-attribute
¶
default_map_res = files('ensembl.io.genomio.data.external_db_map').joinpath('default.txt')
module-attribute
¶
MapFormatError
¶
Bases: ValueError
Error when parsing the db map file.
Source code in src/python/ensembl/io/genomio/external_db/db_map.py
32 33 |
|
get_external_db_map(map_file)
¶
Get an external_db map from a tab file without header.
Empty lines and comments (lines starting with #) are ignored. The first 2 columns are expected to be the main name, and the alternative name. Any other columns after that are ignored.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
map_file
|
Path
|
Path to a file with external DB mapping. |
required |
Returns:
Type | Description |
---|---|
dict[str, str]
|
Dict with keys as alternate names, and values as standard name. |
Source code in src/python/ensembl/io/genomio/external_db/db_map.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|