@@ -398,9 +398,16 @@ function MapXrefs($xref, &$url = false, &$ns = null, &$id = null)
398
398
"refseqrna " => "refseq " ,
399
399
"ucscgenomebrowser " => "refseq " ,
400
400
"uniprotkb " => "uniprot " ,
401
- 'genecard ' =>'genecards '
401
+ 'genecard ' =>'genecards ' ,
402
+ 'ucsc genome browser ' => 'refseq ' ,
403
+ 'refseq rna ' => 'refseq ' ,
404
+ 'refseq protein ' => 'refseq ' ,
405
+ 'refseq dna ' => 'refseq ' ,
406
+ 'comparative toxicogenomics database ' => 'ctd ' ,
407
+ 'humancyc gene ' => 'humancyc '
402
408
);
403
409
$ this ->getRegistry ()->ParseQName ($ xref ,$ ns ,$ id );
410
+ $ ns = str_replace ('" ' ,'' ,$ ns );
404
411
if (isset ($ xrefs [$ ns ])) {
405
412
$ ns = $ xrefs [$ ns ];
406
413
}
@@ -499,7 +506,9 @@ function drugs()
499
506
$ b = explode (', ' ,trim ($ a [6 ]));
500
507
foreach ($ b as $ c ) {
501
508
$ this ->getRegistry ()->parseQName ($ c ,$ ns ,$ id1 );
502
- $ ns = str_replace (array ('keggcompound ' ,'keggdrug ' ,'drugbank ' ,'uniprotkb ' ), array ('kegg ' ,'kegg ' ,'drugbank ' , 'uniprot ' ), strtolower ($ ns ));
509
+ $ ns = str_replace (array ('keggcompound ' ,'keggdrug ' ,'drugbank ' ,'uniprotkb ' ,'clinicaltrials.gov ' ,'drugs product database (dpd) ' ,'national drug code directory ' ,'therapeutic targets database ' ,'fda drug label at dailymed ' ),
510
+ array ('kegg ' ,'kegg ' ,'drugbank ' , 'uniprot ' ,'clinicaltrials ' ,'dpd ' ,'ndc ' ,'ttd ' ,'dailymed ' ),
511
+ strtolower (str_replace ('" ' ,'' ,$ ns )));
503
512
if ($ ns == "url " ) {
504
513
parent ::addRDF (
505
514
parent ::QQuadO_URL ($ id , "rdfs:seeAlso " , $ id )
@@ -728,6 +737,10 @@ function rsid()
728
737
$ z = 0 ;
729
738
$ this ->GetReadFile ()->Read ();
730
739
$ this ->GetReadFile ()->Read ();
740
+ parent ::addRDF (
741
+ parent ::describeClass (parent ::getVoc ()."Variation " , "PharmGKB Variation " )
742
+ );
743
+
731
744
while ($ l = $ this ->GetReadFile ()->Read ()) {
732
745
if ($ z % 10000 == 0 ) {
733
746
parent ::writeRDFBufferToWriteFile ();
@@ -736,10 +749,8 @@ function rsid()
736
749
$ rsid = "dbsnp: " .$ a [0 ];
737
750
$ genes = explode ("; " ,$ a [1 ]);
738
751
parent ::addRDF (
739
- parent ::describeIndividual ($ rsid , $ rsid , parent ::getVoc ()."Variation " ).
740
- parent ::describeClass (parent ::getVoc ()."Variation " , "PharmGKB Variation " )
752
+ parent ::describeIndividual ($ rsid , $ rsid , parent ::getVoc ()."Variation " )
741
753
);
742
- $ this ->AddRDF ($ this ->QQuad ($ rsid ,"void:inDataset " ,$ this ->GetDatasetURI ()));
743
754
foreach ($ genes AS $ gene ) {
744
755
parent ::addRDF (
745
756
parent ::triplify ($ rsid , parent ::getVoc ()."gene " , parent ::getNamespace ().$ gene )
0 commit comments