@@ -57,22 +57,22 @@ function run(){
57
57
58
58
foreach ($ files as $ file ){
59
59
$ download = parent ::getParameterValue ('download ' );
60
- $ lfile = $ ldir ."goa_ " .$ file .".gz " ;
60
+ $ basefile = "goa_ " .$ file .".gaf " ;
61
+ $ lfile = $ ldir ."/ " .$ basefile .".gz " ;
61
62
if (!file_exists ($ lfile ) && $ download == false ) {
62
63
trigger_error ($ lfile ." not found. Will attempt to download. " , E_USER_NOTICE );
63
64
$ download = true ;
64
65
}
65
66
66
67
//download file
67
- $ rfile = $ rdir .strtoupper ($ file )."/gene_association.goa_ " .$ file .".gz " ;
68
+ $ rfile = $ rdir .strtoupper ($ file )."/ " .$ basefile .".gz " ;
68
69
if ($ download == true ) {
69
- echo "downloading $ file ... " ;
70
- //file_put_contents($lfile,file_get_contents($rfile));
70
+ echo "downloading $ file " .".gz ... " ;
71
71
utils::DownloadSingle ($ rfile ,$ lfile );
72
72
}
73
73
74
74
$ 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 ' );
76
76
77
77
parent ::setReadFile ($ lfile , TRUE );
78
78
parent ::setWriteFile ($ odir .$ ofile , $ gz );
@@ -153,6 +153,9 @@ function process($file){
153
153
$ goid = substr ($ fields [4 ],3 );
154
154
$ refs = $ this ->getDbReferences ($ fields [5 ]);
155
155
$ eco = $ this ->getEvidenceCodeLabelArr ($ fields [6 ]);
156
+ if ($ eco === null ) {
157
+ print_r ($ fields [6 ]);exit ;
158
+ }
156
159
$ aspect = $ this ->getAspect ($ fields [8 ]);
157
160
$ label = $ fields [9 ];
158
161
$ synonyms = explode ("| " , $ fields [10 ]);
@@ -291,6 +294,15 @@ function getEvidenceCodeLabelArr($aec){
291
294
"IGI " => array ("Inferred from Genetic Interaction " ,"0000316 " ),
292
295
"IEP " => array ("Inferred from Expression Pattern " , "0000008 " )
293
296
);
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
+
294
306
//computational analysis codes
295
307
$ cac = array (
296
308
"ISS " => array ("Inferred from Sequence or Structural Similarity " ,"0000027 " ),
@@ -319,9 +331,11 @@ function getEvidenceCodeLabelArr($aec){
319
331
$ aac = array (
320
332
"IEA " =>array ("Inferred from Electronic Annotation " , "0000203 " )
321
333
);
322
-
334
+
323
335
if (array_key_exists ($ aec , $ ec )){
324
336
return array ("experimental evidence code " =>$ ec [$ aec ]);
337
+ }elseif (array_key_exists ($ aec , $ htp )){
338
+ return array ("high throughput code " =>$ htp [$ aec ]);
325
339
}elseif (array_key_exists ($ aec , $ cac )){
326
340
return array ("computational analysis code " =>$ cac [$ aec ]);
327
341
}elseif (array_key_exists ($ aec , $ asc )){
@@ -330,10 +344,8 @@ function getEvidenceCodeLabelArr($aec){
330
344
return array ("curator statement code " =>$ csc [$ aec ]);
331
345
}elseif (array_key_exists ($ aec , $ aac )){
332
346
return array ("automatically assigned code " =>$ aac [$ aec ]);
333
- }elseif (array_key_exists ($ aec , $ oec )){
334
- return array ("obsolete evidence code " =>$ oec [$ aec ]);
335
347
}else {
336
- return null ;
348
+ return array ( " unmapped evidence code " => $ aec ) ;
337
349
}
338
350
} else {
339
351
return null ;
0 commit comments