Skip to content

Commit 3c50194

Browse files
author
Yifan Ning
authored
Merge pull request #448 from bio2rdf/release3
Release3 - update linkedSPLs at Jan 18, 2017
2 parents f1e2855 + 2c90a28 commit 3c50194

32 files changed

+11817
-97068
lines changed

.gitignore

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,18 @@
22
.DS_Store
33
*.lock
44
*.log
5-
linkedSPLs/LinkedSPLs-activeMoiety/activeMoietySub-in-rdf.xml
5+
6+
linkedSPLs/LinkedSPLs-activeMoiety/mergedActiveMoiety.csv
7+
linkedSPLs/LinkedSPLs-clinicalDrug/mergedClinicalDrug.tsv
8+
linkedSPLs/LinkedSPLs-activeMoiety/activeMoietySub-in-rdf.xml
9+
linkedSPLs/LinkedSPLs-clinicalDrug/clinicalDrugSub-in-rdf.xml
10+
11+
linkedSPLs/LinkedSPLs-activeMoiety/mappings/
12+
linkedSPLs/LinkedSPLs-clinicalDrug/mappings/
13+
14+
linkedSPLs/LinkedSPLs-activeMoiety/PT-RXCUI-UNII-DB.csv
15+
16+
linkedSPLs/LinkedSPLs-update/data/
17+
linkedSPLs/LinkedSPLs-update/load-dailymed-spls/problematic-spls/
18+
linkedSPLs/LinkedSPLs-update/mappings/FDA-pharmacogenetic-info-mapping/cached-table-downloads/
19+
linkedSPLs/LinkedSPLs-update/mappings/PT-UNII-ChEBI-mapping/ChEBIJavaClient/bin/

linkedSPLs/LinkedSPLs-activeMoiety/README

+32-35
Original file line numberDiff line numberDiff line change
@@ -4,67 +4,64 @@ OVERVIEW
44

55
This folder will hold a graph that maps the active moiety components of an SPL to other drug resources
66

7-
Inputs are original mappings listed as belows:
8-
9-
(1) PT to UNII
10-
(2) UNII to RxNORM
11-
(3) PT to Drugbank
12-
(4) PT to ChEBI
13-
(5) RxNORM to OMOP
14-
(6) RxNORM to DrOn
15-
(7) RxNORM to NDFRT (EPC)
16-
177
Outputs is a RDF/XML graph that represents all active moiety with linked resouces.
188

199

2010
################################################################################
21-
Procedures to get active moieties RDF graph
11+
PRE-CONDITIONS:
2212
################################################################################
2313

24-
<1>: query to get omopid mapping and put in mapping folder
14+
------------------------------------------------------------------------
15+
python libraries:
16+
------------------------------------------------------------------------
17+
18+
(1) Bio from "http://biopython.org/wiki/Download"
19+
(2) rdflib
20+
(3) rdflib#jsonld from "https://github.com/RDFLib/rdflib-jsonld"
21+
(4) pandas
22+
23+
------------------------------------------------------------------------
24+
Mappings from linkedSPLs core update
25+
------------------------------------------------------------------------
26+
27+
Please ensure following mappings are available at specified path. They are should be automatically generated when core graph updated (refers to LinkedSPLs-update/README)
2528

26-
mappings/active-ingredient-omopid-rxcui.dsv
29+
(1) PT (preferred term) to UNII: LinkedSPLs-update/data/FDA/FDAPreferredSubstanceToUNII.txt
30+
(2) UNII to RxNORM: LinkedSPLs-update/data/UMLS/UNIIs-Rxcuis-from-UMLS.txt
31+
(3) PT to Drugbank: LinkedSPLs-update/mappings/ChEBI-DrugBank-bio2rdf-mapping/fda-substance-preferred-name-to-drugbank.txt
32+
(4) PT to ChEBI: LinkedSPLs-update/mappings/PT-UNII-ChEBI-mapping/UNIIToChEBI.txt
33+
(5) RxNORM to DrOn: LinkedSPLs-update/mappings/DrOn-to-RxNorm/cleaned-dron-chebi-rxcui-ingredient.txt
34+
(6) RxNORM to NDFRT (EPC): LinkedSPLs-update/mappings/pharmacologic_class_indexing/EPC_extraction_most_recent.txt
35+
36+
(7) OMOP concept Id from OHDSI or query OMOP CDM V5 (GeriOMOP) by SQL query
2737

28-
2938
query OMOP CDM V5 (GeriOMOP) by SQL query below:
3039
SELECT cpt.CONCEPT_ID as omopid, cpt.CONCEPT_CODE as rxcui FROM
3140
CONCEPT cpt
3241
WHERE
3342
cpt.CONCEPT_CLASS = 'Ingredient';
3443

35-
09/04/2015: 17049 results
36-
3744
right click result table and export to csv ('|' delimited)
45+
save name as: active-ingredient-omopid-rxcui-<DATE>.dsv
46+
to dir: LinkedSPLs-activeMoiety/mappings/active-ingredient-omopid-rxcui.dsv
3847

48+
01/18/2017: 17049 results
3949

40-
<STEP 2>: run python script to merge those mappings together
50+
################################################################################
51+
Procedures to get active moieties RDF graph
52+
################################################################################
53+
54+
(1) run python script to merge those mappings together
4155

4256
$ python mergeToActiveMoiety.py
4357

4458
outputs: mergedActiveMoiety.csv contains all joined mappings
4559

4660
columns: pt, unii, db_uri1, db_uri2, rxcui, omopid, chebi, dron, nui, nameAndRole
4761

48-
<STEP 3>: run python script to create RDF graph for all active moieties
62+
(2) run python script to create RDF graph for all active moieties
4963

5064
$ python createActiveMoietySubInRDF.py
5165

5266
outputs: activeMoietySub-in-rdf.xml
5367

54-
55-
################################################################################
56-
PRE-REQUISITES:
57-
################################################################################
58-
59-
python libraries:
60-
61-
(1) Bio
62-
from "http://biopython.org/wiki/Download"
63-
64-
(2) rdflib
65-
66-
(3) rdflib#jsonld
67-
from "https://github.com/RDFLib/rdflib-jsonld"
68-
69-
(4) pandas
70-

0 commit comments

Comments
 (0)