Skip to content

Commit

Permalink
Adding 'pfam' nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarinllao committed Oct 5, 2018
1 parent 1eaa63d commit 6824d83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/pathme/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def ensure_pathme_folders():

KEGG = 'kegg'
INTERPRO = 'interpro'
PFAM = 'pfam'

REACTOME = 'reactome'
WIKIPATHWAYS = 'wikipathways'

Expand Down
9 changes: 8 additions & 1 deletion src/pathme/wikipathways/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import networkx as nx
from bio2bel_wikipathways import Manager as WikiPathwaysManager

from ..constants import DATA_DIR, ENSEMBL, ENTREZ, EXPASY, HGNC, KEGG, UNIPROT, WIKIPATHWAYS, WIKIPEDIA, INTERPRO
from ..constants import DATA_DIR, ENSEMBL, ENTREZ, EXPASY, HGNC, KEGG, UNIPROT, WIKIPATHWAYS, WIKIPEDIA, INTERPRO, PFAM
from ..utils import get_files_in_folder, check_multiple

WIKIPATHWAYS_DIR = os.path.join(DATA_DIR, WIKIPATHWAYS)
Expand Down Expand Up @@ -153,6 +153,13 @@ def get_valid_gene_identifier(node_ids_dict, hgnc_manager):

return INTERPRO, interpro_name, interpro_id

elif PFAM.lower() in node_ids_dict['uri_id']:
pfam_id = check_multiple(node_ids_dict['identifier'], 'pfam_id')
pfam_name = check_multiple(node_ids_dict['name'], 'pfam_name')
log.warning('Adding PFAM node %s ', pfam_id)

return PFAM, pfam_name, pfam_id

raise Exception('Unknown identifier for node %s', node_ids_dict)


Expand Down

0 comments on commit 6824d83

Please sign in to comment.