@@ -163,7 +163,7 @@ function Parse()
163163 trigger_erorr ("Expecting 54 columns, found $ c! " );
164164 return FALSE ;
165165 }
166-
166+ #print_r($header);exit;
167167 // check # of columns
168168 while ($ l = parent ::getReadFile ()->read (500000 )) {
169169 $ a = explode ("\t" ,trim ($ l ));
@@ -280,14 +280,14 @@ function Parse()
280280 }
281281
282282 // add the alternatives through the taxon + seq redundant group
283- for ($ i =2 ;$ i <= 3 ;$ i ++) {
283+ for ($ i =0 ;$ i <1 ;$ i ++) {
284284 $ taxid = '' ;
285- $ rogid = "irefindex. " .$ a [32 +( $ i - 2 ) ];
285+ $ rogid = "irefindex. " .$ a [32 +$ i ];
286286 parent ::addRDF (
287287 parent ::describeIndividual ($ rogid ,"" ,parent ::getVoc ()."Taxon-Sequence-Identical-Group " ).
288288 parent ::describeClass (parent ::getVoc ()."Taxon-Sequence-Identical-Group " ,"Taxon + Sequence Identical Group " )
289289 );
290- $ tax = $ a [9 +( $ i - 2 ) ];
290+ $ tax = $ a [9 +$ i ];
291291 if ($ tax && $ tax != '- ' && $ tax != '-1 ' ) {
292292 $ data = $ this ->ParseStringArray ($ tax );
293293 $ taxid = trim ($ data ["ns " ]).": " .trim ($ data ["id " ]);
@@ -296,7 +296,8 @@ function Parse()
296296 );
297297 }
298298
299- $ list = explode ("| " ,$ a [3 +($ i -2 )]);
299+ // parse the alternative identifiers
300+ $ list = explode ("| " ,$ a [2 +$ i ]);
300301 foreach ($ list AS $ item ) {
301302 $ data = $ this ->ParseStringArray ($ item );
302303 $ ns = trim ($ data ["ns " ]);
@@ -311,6 +312,24 @@ function Parse()
311312 );
312313 }
313314 }
315+
316+ // parse the aliases
317+ $ list = explode ("| " ,$ a [4 +$ i ]);
318+ foreach ($ list AS $ item ) {
319+ $ data = $ this ->ParseStringArray ($ item );
320+ $ ns = trim ($ data ["ns " ]);
321+ $ id = trim ($ data ["id " ]);
322+ $ qname = $ ns .": " .$ id ;
323+ if ($ ns && $ ns != 'rogid ' && $ ns != 'irogid ' and $ ns != 'icrogid ' and $ id != '- ' ) {
324+ parent ::addRDF (
325+ parent ::triplify ($ rogid ,parent ::getVoc ()."has-member " ,$ qname )
326+ );
327+ if ($ taxid && $ taxid != '- ' && $ taxid != '-1 ' ) parent ::addRDF (
328+ parent ::triplify ($ qname ,parent ::getVoc ()."x-taxonomy " ,$ taxid )
329+ );
330+ }
331+ }
332+
314333 }
315334
316335 // publications
0 commit comments