Skip to content

Commit aa42d34

Browse files
fix for #446
1 parent b04a2f2 commit aa42d34

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

kegg/kegg.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ function parseEntry($lfile)
672672
}
673673
if(in_array($k, array("INTERACTION","METABOLISM","TARGET"))) {
674674
// dopamine D2-receptor antagonist [HSA:1813] [KO:K04145]
675+
// K04348 K06268 K17610 K17611
675676
$id = parent::getRes().md5($uri.$v);
676677
$type = ucfirst(strtolower($k));
677678
if(in_array($k, array("INTERACTION","METABOLISM"))) {
@@ -694,10 +695,14 @@ function parseEntry($lfile)
694695
if(isset($m[1]) and !empty($m[1])) {
695696
foreach($m[1] AS $item) {
696697
$a = explode(':',$item); // get the namespace
698+
if(!isset($a[1])) {continue;} // skip this.
697699
$b = explode(' ',$a[1]);
698700
foreach($b AS $c) {
699-
if(!strstr($item,"KO")) $i = "kegg:".$a[0].'_'.$c;
700-
else $i = "kegg:".$c;
701+
if(!strstr($item,"KO")) {
702+
$i = "kegg:".$a[0].'_'.$c;
703+
} else {
704+
$i = "kegg:".$c;
705+
}
701706
parent::addRDF(
702707
parent::triplify($id,parent::getVoc()."link",$i)
703708
);
@@ -842,4 +847,4 @@ function parseKGML($lfile)
842847
}
843848

844849

845-
850+

0 commit comments

Comments
 (0)