Skip to content

Commit 777a99b

Browse files
added source of validation to gene disease association
1 parent b021002 commit 777a99b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

orphanet/orphanet.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,19 @@ function genes($file)
412412
}
413413
}
414414

415+
// parse the sources of validation
416+
//<SourceOfValidation>16150725[PMID]_16150725[PMID]_21771795[PMID]</SourceOfValidation>
417+
$sources = explode("_",$dga->SourceOfValidation);
418+
foreach($sources AS $source) {
419+
preg_match_all("/([0-9]*)\[([^\]]*)?\]/",$source, $m, PREG_PATTERN_ORDER );
420+
if(isset($m[1][0])) {
421+
$prefix = parent::getRegistry()->getPreferredPrefix($m[2][0]);
422+
parent::addRDF(
423+
parent::triplify($gene_id,parent::getVoc()."source-of-validation", "$prefix:".$m[1][0])
424+
);
425+
}
426+
}
427+
415428
$dga_id = parent::getRes().((string)$d->OrphaNumber)."_".md5($dga->asXML());
416429
$ga = $dga->DisorderGeneAssociationType;
417430
$ga_id = parent::getNamespace().((string) $ga->attributes()->id);

0 commit comments

Comments
 (0)