Skip to content

Commit f1265ee

Browse files
updated goa script with new file locations, and new evidence codes
1 parent a1de209 commit f1265ee

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

goa/goa.php

+21-9
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ function run(){
5757

5858
foreach($files as $file){
5959
$download = parent::getParameterValue('download');
60-
$lfile = $ldir."goa_".$file.".gz";
60+
$basefile = "goa_".$file.".gaf";
61+
$lfile = $ldir."/".$basefile.".gz";
6162
if(!file_exists($lfile) && $download == false) {
6263
trigger_error($lfile." not found. Will attempt to download.", E_USER_NOTICE);
6364
$download = true;
6465
}
6566

6667
//download file
67-
$rfile = $rdir.strtoupper($file)."/gene_association.goa_".$file.".gz";
68+
$rfile = $rdir.strtoupper($file)."/".$basefile.".gz";
6869
if($download == true) {
69-
echo "downloading $file ... ";
70-
//file_put_contents($lfile,file_get_contents($rfile));
70+
echo "downloading $file".".gz ... ";
7171
utils::DownloadSingle($rfile,$lfile);
7272
}
7373

7474
$gz = (strstr(parent::getParameterValue('output_format'),".gz") === FALSE)?false:true;
75-
$ofile = "goa_".$file.".".parent::getParameterValue('output_format');
75+
$ofile = $basefile.".".parent::getParameterValue('output_format');
7676

7777
parent::setReadFile($lfile, TRUE);
7878
parent::setWriteFile($odir.$ofile, $gz);
@@ -153,6 +153,9 @@ function process($file){
153153
$goid = substr($fields[4],3);
154154
$refs = $this->getDbReferences($fields[5]);
155155
$eco = $this->getEvidenceCodeLabelArr($fields[6]);
156+
if($eco === null) {
157+
print_r($fields[6]);exit;
158+
}
156159
$aspect = $this->getAspect($fields[8]);
157160
$label = $fields[9];
158161
$synonyms = explode("|", $fields[10]);
@@ -291,6 +294,15 @@ function getEvidenceCodeLabelArr($aec){
291294
"IGI"=> array("Inferred from Genetic Interaction","0000316"),
292295
"IEP"=> array("Inferred from Expression Pattern", "0000008")
293296
);
297+
298+
$htp = array(
299+
"HTP" => array("Inferred from High Throughput Experiment",""),
300+
"HDA" => array("Inferred from High Throughput Direct Assay",""),
301+
"HMP" => array("Inferred from Hight Throughput Mutant Phenotype",""),
302+
"HGI" => array("Inferred from High Throughput Genetic Interaction",""),
303+
"HEP" => array("Inferred from High Throughput Expression Pattern","")
304+
);
305+
294306
//computational analysis codes
295307
$cac = array(
296308
"ISS"=> array("Inferred from Sequence or Structural Similarity","0000027"),
@@ -319,9 +331,11 @@ function getEvidenceCodeLabelArr($aec){
319331
$aac = array(
320332
"IEA"=>array("Inferred from Electronic Annotation", "0000203")
321333
);
322-
334+
323335
if(array_key_exists($aec, $ec)){
324336
return array("experimental evidence code"=>$ec[$aec]);
337+
}elseif(array_key_exists($aec, $htp)){
338+
return array("high throughput code"=>$htp[$aec]);
325339
}elseif(array_key_exists($aec, $cac)){
326340
return array("computational analysis code"=>$cac[$aec]);
327341
}elseif(array_key_exists($aec, $asc)){
@@ -330,10 +344,8 @@ function getEvidenceCodeLabelArr($aec){
330344
return array("curator statement code"=>$csc[$aec]);
331345
}elseif(array_key_exists($aec, $aac)){
332346
return array("automatically assigned code"=>$aac[$aec]);
333-
}elseif(array_key_exists($aec, $oec)){
334-
return array("obsolete evidence code"=>$oec[$aec]);
335347
}else{
336-
return null;
348+
return array("unmapped evidence code"=> $aec);
337349
}
338350
} else {
339351
return null;

0 commit comments

Comments
 (0)