Skip to content

Commit

Permalink
fixed typing
Browse files Browse the repository at this point in the history
  • Loading branch information
micheldumontier committed May 31, 2014
1 parent 31bdee7 commit 8429894
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions dbsnp/dbsnp.php
Expand Up @@ -181,15 +181,17 @@ function parse($file)
foreach($entry->children() AS $o) {
$rsid = "rs".$o->attributes()->rsId;
$id = parent::getNamespace().$rsid;
$type = parent::getVoc().ucfirst(str_replace(" ","-", (string) $o->attributes()->snpClass));

$snpclass = parent::getVoc().((string)$o->attributes()->snpClass);
$moltype = parent::getVoc().((string)$o->attributes()->molType);
// attributes
parent::addRDF(
parent::describeIndividual($id,$rsid,parent::getVoc().((string) str_replace(" ","-",(string) $o->attributes()->snpClass))).
parent::triplify($id,parent::getVoc()."snp-class",$snpclass).
parent::describeClass($snpclass,(string)$o->attributes()->snpClass, parent::getVoc()."SNPclass").
parent::describeIndividual($id,$rsid,$type).
parent::describeClass($type, ucfirst("".$o->attributes()->snpClass)).
parent::triplify($id,parent::getVoc()."mol-type",$moltype).
parent::describeClass($moltype,(string)$o->attributes()->molType, parent::getVoc()."Moltype").
parent::describeClass(parent::getVoc()."Moltype","Moltype").
parent::triplify($id,parent::getVoc()."taxid","taxonomy:".(string) $o->attributes()->taxId)
);
$genotype = (string)$o->attributes()->genoType;
Expand Down Expand Up @@ -224,7 +226,7 @@ function parse($file)


// assembly
$assembly= $o->Assembly;
$assembly = $o->Assembly;
if($assembly->attributes()->reference == "true") {
parent::addRDF(
parent::triplifyString($id,parent::getVoc()."dbsnp-build",(string) $assembly->attributes()->dbSnpBuild).
Expand All @@ -244,7 +246,8 @@ function parse($file)

parent::addRDF(
parent::triplify($id,parent::getVoc()."maps-to",$fxnset_id).
parent::triplify($fxnset_id,"rdf:type",parent::getVoc()."fxnset")
parent::triplify($fxnset_id,"rdf:type",parent::getVoc()."Fxnset").
parent::describeClass(parent::getVoc()."Fxnset","Fxnset")
);
if(isset($fxnset->attributes()->geneId))
parent::addRDF(parent::triplify($fxnset_id,parent::getVoc()."gene","ncbigene:".((string) $fxnset->attributes()->geneId)));
Expand Down

0 comments on commit 8429894

Please sign in to comment.