@@ -398,9 +398,16 @@ function MapXrefs($xref, &$url = false, &$ns = null, &$id = null)
398398 "refseqrna " => "refseq " ,
399399 "ucscgenomebrowser " => "refseq " ,
400400 "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 '
402408 );
403409 $ this ->getRegistry ()->ParseQName ($ xref ,$ ns ,$ id );
410+ $ ns = str_replace ('" ' ,'' ,$ ns );
404411 if (isset ($ xrefs [$ ns ])) {
405412 $ ns = $ xrefs [$ ns ];
406413 }
@@ -499,7 +506,9 @@ function drugs()
499506 $ b = explode (', ' ,trim ($ a [6 ]));
500507 foreach ($ b as $ c ) {
501508 $ 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 )));
503512 if ($ ns == "url " ) {
504513 parent ::addRDF (
505514 parent ::QQuadO_URL ($ id , "rdfs:seeAlso " , $ id )
@@ -728,6 +737,10 @@ function rsid()
728737 $ z = 0 ;
729738 $ this ->GetReadFile ()->Read ();
730739 $ this ->GetReadFile ()->Read ();
740+ parent ::addRDF (
741+ parent ::describeClass (parent ::getVoc ()."Variation " , "PharmGKB Variation " )
742+ );
743+
731744 while ($ l = $ this ->GetReadFile ()->Read ()) {
732745 if ($ z % 10000 == 0 ) {
733746 parent ::writeRDFBufferToWriteFile ();
@@ -736,10 +749,8 @@ function rsid()
736749 $ rsid = "dbsnp: " .$ a [0 ];
737750 $ genes = explode ("; " ,$ a [1 ]);
738751 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 " )
741753 );
742- $ this ->AddRDF ($ this ->QQuad ($ rsid ,"void:inDataset " ,$ this ->GetDatasetURI ()));
743754 foreach ($ genes AS $ gene ) {
744755 parent ::addRDF (
745756 parent ::triplify ($ rsid , parent ::getVoc ()."gene " , parent ::getNamespace ().$ gene )
0 commit comments