Fgenesh Parser to Parse the Gene Prediction Results

One of reader at Bioinformatics-made-simple.com asked to me to give a Fgenesh Parser which can process the results obtained from FGENESH server, a gene prediction server from Softberry. Although I didn't get success in gene prediction from multiple sequences in a go, but because of their great collection of genome FGENESH is good server for ORF prediction. So here is a FGENESH parser orginally written by Malcolm.Cook 

FGENESH parser.pl
#!/usr/bin/env perl

# PURPOSE: parse fgenesh output into gff
# USAGE: fgenesh fish somefish.dna | fgenesh2gff > somefish.dna.fgenesh.gff

use strict;
use warnings;

use Bio::Tools::Fgenesh;    # to parse output into feature
use Bio::Tools::GFF;

# Remaining options should name files to process, but if none, process
# standard input:

@ARGV = ('-') unless @ARGV; 
my $fgenesh = Bio::Tools::Fgenesh->new(-fh => \*ARGV);
my $featureout = new Bio::Tools::GFF(-gff_version=>2);
my $IDNUM = 0;
while (my $gene = $fgenesh->next_prediction()) {
  my $ID =  $gene->seq_id . "_fgenesh_" . ++ $IDNUM;
  $gene->add_tag_value('ID', $ID);
  foreach ($gene->features) {
    $_->add_tag_value('Parent', $ID);
exit 0;
fgenesh.pl yourinput.txt > yourresult.gff

Please remember that this PERL script require the BIOPERL module use Bio::Tools::Fgenesh and Bio::Tools::GFF  So make sure that BIOPERL is installed on your computer.

  • How to install BIOPERL on Window 7 HERE
  • Easiest way to install BIOPERL module    HERE


  1. Hi,

    My name is James. I ran the program. It runs into the following error:

    MSG: Failed validation of sequence '1'. Invalid characters were: //400_:0601:03:002015:114008582:1021:+1,01:+1,0:11,:06051911+12337725233715():
    STACK: Error::throw
    STACK: Bio::Root::Root::throw /usr/local/share/perl/5.18.2/Bio/Root/Root.pm:486
    STACK: Bio::PrimarySeq::validate_seq /usr/local/share/perl/5.18.2/Bio/PrimarySeq.pm:338
    STACK: Bio::PrimarySeq::_set_seq_by_ref /usr/local/share/perl/5.18.2/Bio/PrimarySeq.pm:287
    STACK: Bio::PrimarySeq::seq /usr/local/share/perl/5.18.2/Bio/PrimarySeq.pm:272
    STACK: Bio::PrimarySeq::new /usr/local/share/perl/5.18.2/Bio/PrimarySeq.pm:229
    STACK: Bio::Tools::Fgenesh::next_prediction /usr/local/share/perl/5.18.2/Bio/Tools/Fgenesh.pm:246
    STACK: DAWGPAWS::fgenesh2gff FGENESH2gff.pl:253
    STACK: FGENESH2gff.pl:195

    1. Hi James,
      Thanks for testing this PERL script. Please make sure that you have installed the bioperl on your mechine


Have Problem ?? Drop a comments here!