Skip to content

Commit 7fcb7bd

Browse files
committed
add enclosed by to pgx ontoloy map load command
1 parent b6a46f2 commit 7fcb7bd

File tree

4 files changed

+580
-595
lines changed

4 files changed

+580
-595
lines changed

linkedSPLs/LinkedSPLs-update/README

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CODE TO GENERATE THE SQL AND LINKED-DATA VERSION OF LINKEDSPLS
22
Authors: Richard Boyce, Greg Gardner, Yifan Ning
3-
Date: 09/25/2015
3+
4+
Last updated Date: 09/25/2015
5+
6+
problematic labels:
7+
spls/e8ae0b66-25de-41b1-8013-7f414bbb7568.xml
8+
49

510
################################################################################
611
OVERVIEW
@@ -37,8 +42,12 @@ Update all linkedSPLs mappings by command below
3742
$ ant linkedSPLs-update
3843

3944
Update piece by piece (recommended)
40-
$ ant loadDailymedSPLsToRDB
41-
$ ant load-loincSection
45+
create schema linkedSPLs
46+
modify db connection information in db-connection.properties (if creating linkedSPLs)
47+
$ ant unzip-spls (if creating linkedSPLs)
48+
$ ant createTableSchema (if creating linkedSPLs)
49+
$ ant load-loincSection (if creating linkedSPLs)
50+
$ ant loadDailymedSPLsToRDB (ensure tables are truncated)
4251

4352
$ ant load-FDAPreferredSubstanceToUNII
4453
$ ant load-FDA_UNII_to_ChEBI
@@ -61,12 +70,17 @@ $ ant load-OMOPId-RXCUIs-from-OHDSI
6170

6271

6372

64-
65-
6673
################################################################################
6774
PRE-REQUISITES (Download all source data before run any ant command)
6875
################################################################################
6976

77+
Install python libs if deploy linkedSPLs on new environment
78+
79+
apt-get install libxml2-dev libxslt1-dev python-dev
80+
apt-get install python-lxml
81+
apt-get install python-feedparser
82+
83+
7084
Download and organize all source data files in data folder
7185

7286
--------------------------------------------------------

linkedSPLs/LinkedSPLs-update/build.xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171

172172
<target name ="check-mapping-sources">
173173

174-
<property name="datasource" value="${FDA_UNII_NAMES},${FDA_UNII_RECORDS},${DRUGBANK_XML},${PG_CLASS_INDEXING_SPLS},${RXNORM_SETID},${RXNCONSO_RRF},${RXNORM_FULL_SCHEMA},${DRON_RXCUI_INGREDIENT},${DRON_RXNORM_DRUG},${ERROR_LOG}"/>
174+
<property name="datasource" value="${FDA_UNII_NAMES},${FDA_UNII_RECORDS},${DRUGBANK_XML},${PG_CLASS_INDEXING_SPLS},${RXNORM_SETID},${RXNCONSO_RRF},${RXNORM_FULL_SCHEMA},${DRON_RXCUI_INGREDIENT},${DRON_RXCUI_INGREDIENT},${DRON_RXCUI_DRUG},${ERROR_LOG}"/>
175175
<filelist id="data.sources" dir="." files="${datasource}" />
176176

177177
<restrict id="missing.files">
@@ -232,10 +232,10 @@
232232
<!-- <antcall target="load-FDAPharmgxTable" /> -->
233233
<!-- <antcall target="load-FDAPharmgxTableToOntologyMap" /> -->
234234

235-
<!-- <antcall target="load-DrOn_RXCUI_DRUG" /> -->
236-
<!-- <antcall target="load-DrOn_RXCUI_INGREDIENT" /> -->
235+
<!-- <antcall target="load-DrOn_RXCUI_DRUG" /> -->
236+
<!-- <antcall target="load-DrOn_RXCUI_INGREDIENT" /> -->
237237

238-
<!-- <antcall target="load-OMOPId-RXCUIs-from-OHDSI" /> -->
238+
<!-- <antcall target="load-OMOPId-RXCUIs-from-OHDSI" /> -->
239239

240240
<antcall target="set.timestamp">
241241
<param name="message" value="updated all mappings in ${mysql-schema}" />
@@ -327,13 +327,13 @@
327327
</java>
328328

329329
<!-- old apporach that query bioportal -->
330-
<exec executable="python" failonerror="true">
331-
<arg line="${PT-UNII-ChEBI-mapping}/getChebiMappingsFromJSON.py data/FDA/FDAPreferredSubstanceToUNII.txt" />
332-
<redirector append="true">
333-
<outputmapper type="merge" to="${PT-UNII-ChEBI-mapping}/UNIIToChEBI.txt"/>
334-
<errormapper type="merge" to="${ERROR_LOG}"/>
335-
</redirector>
336-
</exec>
330+
<!-- <exec executable="python" failonerror="true"> -->
331+
<!-- <arg line="${PT-UNII-ChEBI-mapping}/getChebiMappingsFromJSON.py data/FDA/FDAPreferredSubstanceToUNII.txt" /> -->
332+
<!-- <redirector append="true"> -->
333+
<!-- <outputmapper type="merge" to="${PT-UNII-ChEBI-mapping}/UNIIToChEBI.txt"/> -->
334+
<!-- <errormapper type="merge" to="${ERROR_LOG}"/> -->
335+
<!-- </redirector> -->
336+
<!-- </exec> -->
337337

338338
<antcall target="set.timestamp">
339339
<param name="message" value="mappings of FDA preferred term and ChEBI is created at ${PT-UNII-ChEBI-mapping}/UNIIToChEBI.txt" />
@@ -868,7 +868,7 @@
868868
</classpath>
869869
<transaction>
870870
truncate FDAPharmgxTableToOntologyMap;
871-
LOAD DATA LOCAL INFILE "${BIOMARKER}" INTO TABLE FDAPharmgxTableToOntologyMap FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES(FDAReferencedSubgroup,HGNCGeneSymbol,Synonymns,AlleleVariant,Pharmgkb,URI,Ontology,CuratorComments);
871+
LOAD DATA LOCAL INFILE "${BIOMARKER}" INTO TABLE FDAPharmgxTableToOntologyMap FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES(FDAReferencedSubgroup,HGNCGeneSymbol,Synonymns,AlleleVariant,Pharmgkb,URI,Ontology,CuratorComments);
872872
</transaction>
873873
</sql>
874874

0 commit comments

Comments
 (0)