#!/usr/bin/perl $fn = $ARGV[0]; open(FH, "$fn") || die("cannot open:$!"); $\ = ' '; while() { $\ = "\n" if eof; chomp($_); $_ =~ s/\(|\)//xmg; if($_ =~ /LOCUS\s+(\S+)/) { $gi=$1; } elsif($_ =~ /\A\s+(\w+)\s+(\S+)\.\.(\S+)/) { print "\t\t$gi\t$1\t$2\t$3\n"; } elsif($_ =~ /gene\=\"(\S+)\"/) { print "\t\t$gi\t\t\t\t\tgene=$1\n"; } elsif($_ =~ /\/transcript_id\=\"(\S+)\"/) {print "\t\t$gi\t\t\t\t\tTranscriptID=$1\n";} } #### gene 348634..348822 /gene="LOC100129305" /note="Derived by automated computational analysis using gene prediction method: GNOMON. Supporting evidence includes similarity to: 1 Protein" /db_xref="GeneID:100129305" mRNA 348634..348822 /gene="LOC100129305" /product="similar to C21orf94 protein" /note="Derived by automated computational analysis using gene prediction method: GNOMON. Supporting evidence includes similarity to: 1 Protein" /transcript_id="XM_001714760.1" /db_xref="GI:169215265" /db_xref="GeneID:100129305" #### gene 348634 348822 gene=LOC100129305 gene 348634 348822 gene=LOC100129305 TranscriptID=XM_001714760.1 #### gene 348634 348822 gene=LOC100129305 gene 348634 348822 gene=LOC100129305 TranscriptID=XM_001714760.1