Skip to content

Commit 0531d10

Browse files
Merge branch 'release3' of github.com:micheldumontier/bio2rdf-scripts into release3
Conflicts: irefindex/irefindex.php
2 parents 3ced855 + 4c6e4ee commit 0531d10

File tree

9 files changed

+78
-533
lines changed

9 files changed

+78
-533
lines changed

README.md

-26
This file was deleted.

goa/goa.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class GOAParser extends Bio2RDFizer
3636
{
3737
function __construct($argv) {
3838
parent::__construct($argv,"goa");
39-
parent::addParameter('files',true,'all|arabidopsis|chicken|cow|dicty|dog|fly|human|mouse|pdb|pig|rat|uniprot|worm|yeast|zebrafish','all','all or comma-separated list of files to process');
39+
// parent::addParameter('files',true,'all|arabidopsis|chicken|cow|dicty|dog|fly|human|mouse|pdb|pig|rat|uniprot|worm|yeast|zebrafish','all','all or comma-separated list of files to process');
40+
parent::addParameter('files',true,'all|arabidopsis|chicken|cow|dicty|dog|fly|human|mouse|pig|rat|worm|yeast|zebrafish','all','all or comma-separated list of files to process');
4041
parent::addParameter('download_url',false,null,'ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/');
4142
parent::initialize();
4243
}
@@ -161,9 +162,13 @@ function process($file){
161162

162163
//entity id
163164
$eid = $this->getdbURI($db,$id);
165+
if(!$eid) {
166+
print_r($fields);
167+
continue;
168+
}
164169
parent::addRDF(
165170
parent::describeIndividual($eid,$label,parent::getVoc()."GO-Annotation").
166-
parent::describeClass(parent::getVoc()."GO-Annotation","GO Annotation").
171+
parent::describeClass(parent::getVoc()."GO-Annotation","GO Annotation").
167172
parent::triplifyString($eid,parent::getVoc()."symbol",$symbol)
168173
);
169174
parent::addRDF(
@@ -261,6 +266,8 @@ function getdbURI($db_id, $db_object_id){
261266
} else if ($db_id == "PDB"){
262267
$split_object = explode("_", $db_object_id);
263268
$returnMe = "pdb:".$split_object[0]."/chain_".$split_object[1];
269+
} else {
270+
$returnMe = $db_id.":".$db_object_id;
264271
}
265272
return $returnMe;
266273
}

hgnc/hgnc.php

+18-6
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ function Run(){
117117
function process(){
118118
$header = $this->GetReadFile()->Read(200000);
119119
$header_arr = explode("\t", $header);
120-
121-
if (count($header_arr) != 40)
120+
$n = 41;
121+
$c = count($header_arr);
122+
if ($c != $n)
122123
{
123124
echo PHP_EOL;
124-
trigger_error ("Header format is different than expected, please update the script",E_USER_ERROR);
125+
print_r($header_arr);
126+
trigger_error ("Expected $n columns, found $c . please update the script",E_USER_ERROR);
125127
exit;
126128
}
127129

@@ -164,9 +166,10 @@ function process(){
164166
$refseq_mappeddatasuppliedbyNCBI = $fields[34];
165167
$uniprot_id_mappeddatasuppliedbyUniProt = $fields[35];
166168
$ensembl_id_mappeddatasuppliedbyEnsembl = $fields[36];
167-
$ucsc_id_mappeddatasuppliedbyUCSC = $fields[37];
168-
$mouse_genome_database_id_mappeddatasuppliedbyMGI = $fields[38];
169-
$rat_genome_database_id_mappeddatasuppliedbyRGD = $fields[39];
169+
$vega_id_mappeddatasuppliedbyVega = $fields[37];
170+
$ucsc_id_mappeddatasuppliedbyUCSC = $fields[38];
171+
$mouse_genome_database_id_mappeddatasuppliedbyMGI = $fields[39];
172+
$rat_genome_database_id_mappeddatasuppliedbyRGD = $fields[40];
170173

171174
$id_res = $id;
172175
$id_label = "Gene Symbol for ".$approved_symbol;
@@ -464,6 +467,15 @@ function process(){
464467
}
465468
}
466469

470+
if(!empty($ucsc_id_mappeddatasuppliedbyVega)){
471+
$ucsc_id_mappeddatasuppliedbyVega = explode(", ", $ucsc_id_mappeddatasuppliedbyVega);
472+
foreach ($ucsc_id_mappeddatasuppliedbyVega as $vega_id) {
473+
parent::AddRDF(
474+
parent::triplify($id_res, $this->getVoc()."x-vega", "vega:".trim($vega_id)).
475+
parent::describeProperty($this->getVoc()."x-vega", "Vega entry")
476+
);
477+
}
478+
}
467479
if(!empty($ucsc_id_mappeddatasuppliedbyUCSC)){
468480
$ucsc_id_mappeddatasuppliedbyUCSC = explode(", ", $ucsc_id_mappeddatasuppliedbyUCSC);
469481
foreach ($ucsc_id_mappeddatasuppliedbyUCSC as $ucsc_id) {

0 commit comments

Comments
 (0)