|
210 | 210 | (6) mappings of RxNORM, NUI and NDFRT label
|
211 | 211 | (7) mappings of setId, UNII, NUI and PreferredNameAndRole
|
212 | 212 |
|
213 |
| - takes about 1 hour for update |
| 213 | + takes about 3 hour for update |
214 | 214 | -->
|
215 | 215 |
|
216 | 216 | <target name="linkedSPLs-update" depends="check-mapping-sources">
|
|
221 | 221 |
|
222 | 222 | <!-- <antcall target="load-FDAPreferredSubstanceToUNII" /> -->
|
223 | 223 | <!-- <antcall target="load-FDA_UNII_to_ChEBI" /> -->
|
224 |
| - <!-- <antcall target="load-FDAPreferredSubstanceToRxNORM" /> --> |
225 | 224 | <!-- <antcall target="load-FDA_SUBSTANCE_TO_DRUGBANK_BIO2RDF" /> -->
|
| 225 | + <!-- <antcall target="load-ChEBI_DRUGBANK_BIO2RDF" /> --> |
| 226 | + |
| 227 | + <!-- <antcall target="load-FDAPreferredSubstanceToRxNORM" /> --> |
226 | 228 | <!-- <antcall target="load-SPLSetIDToRxNORM" /> -->
|
227 | 229 | <!-- <antcall target="load-RXNORM_NDFRT_INGRED_Table" /> -->
|
228 | 230 | <!-- <antcall target="load-FDA_EPC_Table" /> -->
|
229 |
| - <!-- <antcall target="load-ChEBI_DRUGBANK_BIO2RDF" /> --> |
230 | 231 |
|
231 | 232 | <!-- <antcall target="load-FDAPharmgxTable" /> -->
|
232 | 233 | <!-- <antcall target="load-FDAPharmgxTableToOntologyMap" /> -->
|
|
290 | 291 |
|
291 | 292 | <target name="load-FDA_UNII_to_ChEBI">
|
292 | 293 |
|
293 |
| - <delete file="${PT-UNII-ChEBI-mapping}/UNIIToChEBI-${TODAY_US}.txt"/> |
| 294 | + <delete file="${PT-UNII-ChEBI-mapping}/UNIIToChEBI.txt"/> |
294 | 295 |
|
295 | 296 | <delete dir="${PT-UNII-ChEBI-mapping}/ChEBIJavaClient/bin"/>
|
296 | 297 | <mkdir dir="${PT-UNII-ChEBI-mapping}/ChEBIJavaClient/bin" />
|
|
316 | 317 | </manifest>
|
317 | 318 | </jar>
|
318 | 319 |
|
319 |
| - <echo>[INFO] : It takes about 4 hour ... </echo> |
| 320 | + <echo>[INFO] : It takes about 4 hours ... </echo> |
320 | 321 |
|
321 | 322 | <java classname="chebi.service.GetChEBIbyNames" fork="true" >
|
322 | 323 | <classpath>
|
|
326 | 327 | </java>
|
327 | 328 |
|
328 | 329 | <!-- old apporach that query bioportal -->
|
329 |
| - <!-- <exec executable="python" failonerror="true"> --> |
330 |
| - <!-- <arg line="${PT-UNII-ChEBI-mapping}/getChebiMappingsFromJSON.py data/FDA/FDAPreferredSubstanceToUNII.txt" /> --> |
331 |
| - <!-- <redirector append="true"> --> |
332 |
| - <!-- <outputmapper type="merge" to="${PT-UNII-ChEBI-mapping}/UNIIToChEBI-${TODAY_US}.txt"/> --> |
333 |
| - <!-- <errormapper type="merge" to="${ERROR_LOG}"/> --> |
334 |
| - <!-- </redirector> --> |
335 |
| - <!-- </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> |
336 | 337 |
|
337 | 338 | <antcall target="set.timestamp">
|
338 | 339 | <param name="message" value="mappings of FDA preferred term and ChEBI is created at ${PT-UNII-ChEBI-mapping}/UNIIToChEBI.txt" />
|
|
368 | 369 |
|
369 | 370 | <target name="load-FDA_SUBSTANCE_TO_DRUGBANK_BIO2RDF" >
|
370 | 371 |
|
371 |
| - <delete file="${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/Name_Syns_UNII_DbId_0_${TODAY_US}.txt"/> |
| 372 | + <delete file="${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/Name_Syns_UNII_DbId_0.txt"/> |
372 | 373 |
|
373 | 374 | <antcall target="set.timestamp">
|
374 | 375 | <param name="message" value="execute script to parse ${DRUGBANK_XML}, ${FDA_UNII_NAMES} and ${FDA_UNII_RECORDS} " />
|
|
379 | 380 | <exec executable="python" failonerror="true">
|
380 | 381 | <arg line="${ChEBI-DrugBank-bio2rdf-mapping}/scripts/parseDBIdBySynsInchiName.py 0 ${DRUGBANK_XML} ${FDA_UNII_NAMES} ${FDA_UNII_RECORDS}"/>
|
381 | 382 | <redirector append="true">
|
382 |
| - <outputmapper type="merge" to="${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/Name_Syns_UNII_DbId_0_${TODAY_US}.txt"/> |
| 383 | + <outputmapper type="merge" to="${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/Name_Syns_UNII_DbId_0.txt"/> |
383 | 384 | <errormapper type="merge" to="${ERROR_LOG}"/>
|
384 | 385 | </redirector>
|
385 | 386 | </exec>
|
386 | 387 |
|
387 |
| - <delete file="${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/INCHI-OR-Syns-OR-Name-${TODAY_US}.txt"/> |
| 388 | + <delete file="${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/INCHI-OR-Syns-OR-Name.txt"/> |
388 | 389 |
|
389 | 390 | <exec executable="bash">
|
390 | 391 | <arg value="-c" />
|
391 |
| - <arg value ='cat ${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/Name_Syns_UNII_DbId_0_${TODAY_US}.txt | cut -f1,3,4,5 | sort | uniq > ${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/INCHI-OR-Syns-OR-Name-${TODAY_US}.txt' /> |
| 392 | + <arg value ='cat ${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/Name_Syns_UNII_DbId_0.txt | cut -f1,3,4,5 | sort | uniq > ${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/INCHI-OR-Syns-OR-Name.txt' /> |
392 | 393 | </exec>
|
393 | 394 |
|
394 | 395 | <antcall target="set.timestamp">
|
395 |
| - <param name="message" value="mappings of perferred term, UNII and drugbank URI is created at ${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/INCHI-OR-Syns-OR-Name-${TODAY_US}.txt" /> |
| 396 | + <param name="message" value="mappings of perferred term, UNII and drugbank URI is created at ${ChEBI-DrugBank-bio2rdf-mapping}/UNII-data/INCHI-OR-Syns-OR-Name.txt" /> |
396 | 397 | </antcall>
|
397 | 398 |
|
398 | 399 | <delete file="${ChEBI-DrugBank-bio2rdf-mapping}/fda-substance-preferred-name-to-drugbank.txt"/>
|
399 | 400 |
|
400 | 401 | <exec executable="python" dir="${ChEBI-DrugBank-bio2rdf-mapping}/scripts" output="${ChEBI-DrugBank-bio2rdf-mapping}/fda-substance-preferred-name-to-drugbank.txt">
|
401 |
| - <arg line="addBio2rdf_UNII_to_DrugBank.py ../UNII-data/INCHI-OR-Syns-OR-Name-${TODAY_US}.txt"/> |
| 402 | + <arg line="addBio2rdf_UNII_to_DrugBank.py ../UNII-data/INCHI-OR-Syns-OR-Name.txt"/> |
402 | 403 | </exec>
|
403 | 404 |
|
404 | 405 | <antcall target="set.timestamp">
|
|
520 | 521 |
|
521 | 522 | <target name="load-SPLSetIDToRxNORM" >
|
522 | 523 |
|
523 |
| - <delete file="${RxNORM-mapping}/converted_rxnorm_mappings_${TODAY_US}.txt"/> |
| 524 | + <delete file="${RxNORM-mapping}/converted_rxnorm_mappings.txt"/> |
524 | 525 |
|
525 | 526 | <exec executable="bash">
|
526 | 527 | <arg value="-c" />
|
527 |
| - <arg value ='tail -n +2 ${RXNORM_SETID} | cut -f 1,3,4 -d "|" | sort > ${RxNORM-mapping}/converted_rxnorm_mappings_${TODAY_US}.txt' /> |
| 528 | + <arg value ='tail -n +2 ${RXNORM_SETID} | cut -f 1,3,4 -d "|" | sort > ${RxNORM-mapping}/converted_rxnorm_mappings.txt' /> |
528 | 529 | </exec>
|
529 | 530 |
|
530 | 531 | <antcall target="set.timestamp">
|
531 |
| - <param name="message" value="mappings of setid, RxCui and RxClinicalDrug is created at ${RxNORM-mapping}/converted_rxnorm_mappings_${TODAY_US}.txt" /> |
| 532 | + <param name="message" value="mappings of setid, RxCui and RxClinicalDrug is created at ${RxNORM-mapping}/converted_rxnorm_mappings.txt" /> |
532 | 533 | </antcall>
|
533 | 534 |
|
534 | 535 | <sql
|
|
541 | 542 | </classpath>
|
542 | 543 | <transaction>
|
543 | 544 | truncate SPLSetIDToRxNORM;
|
544 |
| - LOAD DATA LOCAL INFILE '${RxNORM-mapping}/converted_rxnorm_mappings_${TODAY_US}.txt' INTO TABLE `SPLSetIDToRxNORM` FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' (setId, RxCUI, RxClinicalDrug); |
| 545 | + LOAD DATA LOCAL INFILE '${RxNORM-mapping}/converted_rxnorm_mappings.txt' INTO TABLE `SPLSetIDToRxNORM` FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' (setId, RxCUI, RxClinicalDrug); |
545 | 546 | </transaction>
|
546 | 547 | </sql>
|
547 | 548 |
|
|
559 | 560 |
|
560 | 561 | <target name="load-RXNORM_NDFRT_INGRED_Table" >
|
561 | 562 |
|
562 |
| - <delete file="${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping-${TODAY_US}.txt"/> |
| 563 | + <delete file="${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping.txt"/> |
563 | 564 |
|
564 | 565 | <exec executable="bash">
|
565 | 566 | <arg value="-c" />
|
566 |
| - <arg value ='cat ${RXNCONSO_RRF} | grep "Chemical/Ingredient" | cut -f 1,14,15 -d "|" > ${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping-${TODAY_US}.txt' /> |
| 567 | + <arg value ='cat ${RXNCONSO_RRF} | grep "Chemical/Ingredient" | cut -f 1,14,15 -d "|" > ${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping.txt' /> |
567 | 568 | </exec>
|
568 | 569 |
|
569 | 570 | <antcall target="set.timestamp">
|
570 |
| - <param name="message" value="mappings of RxNORM, NUI and NDFRT label is created at ${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping-${TODAY_US}.txt" /> |
| 571 | + <param name="message" value="mappings of RxNORM, NUI and NDFRT label is created at ${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping.txt" /> |
571 | 572 | </antcall>
|
572 | 573 |
|
573 |
| - <delete file="${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient-${TODAY_US}.txt"/> |
| 574 | + <delete file="${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient.txt"/> |
574 | 575 |
|
575 | 576 | <exec executable="python" failonerror="true">
|
576 |
| - <arg line="${NDFRT-to-RxNorm}/convertNDFRTandRXNORM_UUIDsToPurls.py ${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping-${TODAY_US}.txt" /> |
| 577 | + <arg line="${NDFRT-to-RxNorm}/convertNDFRTandRXNORM_UUIDsToPurls.py ${NDFRT-to-RxNorm}/rxnorm-to-ndfrt-chemical-ingredient-mapping.txt" /> |
577 | 578 | <redirector append="true">
|
578 |
| - <outputmapper type="merge" to="${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient-${TODAY_US}.txt"/> |
| 579 | + <outputmapper type="merge" to="${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient.txt"/> |
579 | 580 | <errormapper type="merge" to="${ERROR_LOG}"/>
|
580 | 581 | </redirector>
|
581 | 582 | </exec>
|
582 | 583 |
|
583 | 584 | <antcall target="set.timestamp">
|
584 |
| - <param name="message" value="post-processed mappings of RxNORM, NUI and NDFRT label is created at ${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient-${TODAY_US}.txt" /> |
| 585 | + <param name="message" value="post-processed mappings of RxNORM, NUI and NDFRT label is created at ${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient.txt" /> |
585 | 586 | </antcall>
|
586 | 587 |
|
587 | 588 | <sql
|
|
594 | 595 | </classpath>
|
595 | 596 | <transaction>
|
596 | 597 | truncate RXNORM_NDFRT_INGRED_Table;
|
597 |
| - LOAD DATA LOCAL INFILE "${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient-${TODAY_US}.txt" INTO TABLE RXNORM_NDFRT_INGRED_Table(RXNORM, NUI, NDFRT_LABEL); |
| 598 | + LOAD DATA LOCAL INFILE "${NDFRT-to-RxNorm}/converted-rxnorm-to-ndfrt-chemical-ingredient.txt" INTO TABLE RXNORM_NDFRT_INGRED_Table(RXNORM, NUI, NDFRT_LABEL); |
598 | 599 | </transaction>
|
599 | 600 | </sql>
|
600 | 601 |
|
|
612 | 613 |
|
613 | 614 | <target name="load-FDA_EPC_Table" >
|
614 | 615 |
|
615 |
| - <delete file="${pharmacologic_class_indexing}/EPC_extraction_most_recent_${TODAY_US}.txt"/> |
| 616 | + <delete file="${pharmacologic_class_indexing}/EPC_extraction_most_recent.txt"/> |
616 | 617 |
|
617 | 618 | <exec executable="python" failonerror="true">
|
618 |
| - <arg line="${pharmacologic_class_indexing}/parseEPCfromXMLs.py ${PG_CLASS_INDEXING_SPLS}" /> |
| 619 | + <arg line="${pharmacologic_class_indexing}/parseEPCfromXMLs.py ${PG_CLASS_INDEXING_SPLS}" /> |
619 | 620 | <redirector append="true">
|
620 | 621 | <outputmapper type="merge" to="${pharmacologic_class_indexing}/EPC_extraction_most_recent.txt"/>
|
621 | 622 | <errormapper type="merge" to="${ERROR_LOG}"/>
|
|
0 commit comments