Skip to content
Snippets Groups Projects
Commit 7b922c5b authored by Matthew Laird's avatar Matthew Laird
Browse files

EntrezGene file head has changed, deal with the new format

parent d4f5a767
No related branches found
No related tags found
No related merge requests found
......@@ -65,21 +65,22 @@ sub run {
my $gene_tax_id_index = -2;
my $gene_synonyms_index = -2;
foreach (my $i=0; $i<= $#arr; $i++){
#-1 as first one is "#Format:"q
if($arr[$i] eq "tax_id"){
$gene_tax_id_index = $i-1;
# Format change by Entrez, first header
# element is #tax_id
if($arr[$i] eq "#tax_id"){
$gene_tax_id_index = $i;
}
elsif($arr[$i] eq "GeneID"){
$gene_id_index = $i-1;
$gene_id_index = $i;
}
elsif($arr[$i] eq "Symbol"){
$gene_symbol_index = $i-1;
$gene_symbol_index = $i;
}
elsif($arr[$i] eq "description"){
$gene_desc_index = $i-1;
$gene_desc_index = $i;
}
elsif($arr[$i] eq "Synonyms"){
$gene_synonyms_index = $i-1;
$gene_synonyms_index = $i;
}
}
if( $gene_id_index == -2 ||
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment