Skip to content

Commit

Permalink
Continue renaming from Bioentities to Famplex
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Mar 6, 2018
1 parent 2ca71cb commit 3e2be54
Show file tree
Hide file tree
Showing 9 changed files with 4,079 additions and 5,425 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ developed by manual curation for use by natural language processing and
biological modeling teams in the [DARPA Big
Mechanism](http://www.darpa.mil/program/big-mechanism) and [Communicating with
Computers](http://www.darpa.mil/program/communicating-with-computers) programs.

Note: FamPlex used to be called Bioentities, and was renamed to better reflect
the focus of the resource.

The repository contains the following files:

* ```relations.csv```. Defines membership of specific genes/proteins in
Expand Down Expand Up @@ -49,15 +53,15 @@ relationships, including sub-families (families within families) and complexes
consisting of families of related subunits (e.g., PI3K, NF-kB).

The ```relations.csv``` file consists of five columns: (1) the namespace for
the subject (e.g., ```HGNC``` for gene names, ```UP``` for Uniprot, or ```BE```
for the FamPlex namespace), (2) the identifier for the subject, (3) the
relationship (```isa``` or ```partof```), (4) the namespace for the object, and
(5) the identifier for the object.
the subject (e.g., ```HGNC``` for gene names, ```UP``` for Uniprot, or
```FPLX``` for the FamPlex namespace), (2) the identifier for the subject,
(3) the relationship (```isa``` or ```partof```), (4) the namespace for the
object, and (5) the identifier for the object.

The ```equivalences.csv``` file consists of three columns (1) the namespace of
an outsite entity (e.g. ```BEL```, ```PFAM```),
(2) the identifier of the outside entity in the namespace given in the
first column, and (3) the equivalent entity in the ```BE``` namespace.
first column, and (3) the equivalent entity in the ```FPLX``` namespace.

## Grounding Map

Expand Down
12 changes: 6 additions & 6 deletions check_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ def pubchem_and_chebi(db_refs):

print()
print("-- Checking for undeclared FamPlex IDs in grounding map --")
# Look through grounding map and find all instances with an FP' db
# Look through grounding map and find all instances with an FPLX db key
entities_missing_gm = []
for text, db_refs in gm.items():
if db_refs is not None:
for db_key, db_id in db_refs.items():
if db_key == 'FP' and db_id not in entities:
if db_key == 'FPLX' and db_id not in entities:
entities_missing_gm.append(db_id)
print("ERROR: ID %s referenced in grounding map "
"is not in entities list." % db_id)
Expand Down Expand Up @@ -171,7 +171,7 @@ def pubchem_and_chebi(db_refs):
for term in (subj, obj):
term_ns = term[0]
term_id = term[1]
if term_ns == 'FP' and term_id not in entities:
if term_ns == 'FPLX' and term_id not in entities:
entities_missing_rel.append(term_id)
print("ERROR: ID %s referenced in relations "
"is not in entities list." % term_id)
Expand All @@ -181,7 +181,7 @@ def pubchem_and_chebi(db_refs):
for ix, (subj, rel, obj) in enumerate(relationships):
for term in (subj, obj):
term_ns = term[0]
if term_ns not in ('FP', 'HGNC', 'UP'):
if term_ns not in ('FPLX', 'HGNC', 'UP'):
print("ERROR: row %d: Invalid namespace in relations.csv: %s" %
(ix+1, term_ns))
signal_error = True
Expand Down Expand Up @@ -256,10 +256,10 @@ def pubchem_and_chebi(db_refs):
subj_id = subj[1]
obj_ns = obj[0]
obj_id = obj[1]
if subj_ns == 'FP' and subj_id == ent:
if subj_ns == 'FPLX' and subj_id == ent:
found = True
break
if obj_ns == 'FP' and obj_id == ent:
if obj_ns == 'FPLX' and obj_id == ent:
found = True
break
if not found:
Expand Down
Loading

0 comments on commit 3e2be54

Please sign in to comment.