brinkmanlab / islandpath

IslandPath standalone software
GNU General Public License v3.0
31 stars 4 forks source link

Bug report #2

Closed HaidYi closed 6 years ago

HaidYi commented 6 years ago

Hi maintainer, When the input filename has version information such as "NC_014253.1.gbk"

Then I use the following cmd "/Dimob.pl NC_014253.1.gbk result.txt"

here is the bug

keys on reference is experimental at /home/haidong/下载/islandpath_dimob_v1.0.0/lib/Dimob/Config.pm line 80.
Smartmatch is experimental at /home/haidong/下载/islandpath_dimob_v1.0.0/lib/GenomeUtils.pm line 666.
Smartmatch is experimental at /home/haidong/下载/islandpath_dimob_v1.0.0/lib/GenomeUtils.pm line 669.
Smartmatch is experimental at /home/haidong/下载/islandpath_dimob_v1.0.0/lib/GenomeUtils.pm line 844.
/home/haidong/下载/islandpath_dimob_v1.0.0/logger.conf2018/03/05 15:21:48 [main] Logging initialized
2018/03/05 15:21:48 [main] Creating temp directory with needed files
2018/03/05 15:21:48 [GenomeUtils] From filename /home/haidong/下载/islandpath_dimob_v1.0.0/dimob_tmpIx73HAhBZ8/NC_014253.1 got /home/haidong/下载/islandpath_dimob_v1.0.0/dimob_tmpIx73HAhBZ8/NC_014253, 1
2018/03/05 15:21:48 [GenomeUtils] Can't figure out if file is genbank (.gbk) or embl (.embl) [FILEFORMATERROR]
Can't figure out if file is genbank (.gbk) or embl (.embl) [FILEFORMATERROR] at /home/haidong/下载/islandpath_dimob_v1.0.0/lib/GenomeUtils.pm line 139

I think your code (line 102) in Dimob.pl should be revised:

my($filename, $dirs, $suffix) = fileparse($inputfile, qr/\.[^.]*/);

Please address this problem.

Thank you.

HaidYi commented 6 years ago

Thank you, but I found another problem: When I use NC_002754.1.gbk, there is an exception like this:

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: start [2991448] is greater than end [252]. 
If you want to truncated and reverse complement, 
you must call trunc followed by revcom. Sorry.
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/share/perl5/Bio/Root/Root.pm:449
STACK: Bio::PrimarySeqI::trunc /usr/share/perl5/Bio/PrimarySeqI.pm:456
STACK: GenomeUtils::read_and_convert /home/haidong/下载/islandpath_dimob_v1.0.0/lib/GenomeUtils.pm:422
STACK: ./Dimob.pl:130

I wonder whether it is the problem of code itself.

Thank you.

cbertell commented 6 years ago

Bioperl throws an error because it doesn't handle properly genes that cross the start of the sequence. Fixing this will take time. As a rapid solution for your analysis, I would suggest that you remove the coordinates of the first half of the first gene, so that the gene is located only at the beginning of the chromosome. For example, in your case:

gene            join(2991448..2992245,1..252)

Has to be transformed to

gene            1..252

And the same for the corresponding CDS.

I will close issue #2 that was solved with the first fix and open a new one for this problem.

avilaHugo commented 4 years ago

Bioperl throws an error because it doesn't handle properly genes that cross the start of the sequence. Fixing this will take time. As a rapid solution for your analysis, I would suggest that you remove the coordinates of the first half of the first gene, so that the gene is located only at the beginning of the chromosome. For example, in your case:

gene            join(2991448..2992245,1..252)

Has to be transformed to

gene            1..252

And the same for the corresponding CDS.

I will close issue #2 that was solved with the first fix and open a new one for this problem.

If there is any other user with the same problem, here is a quick solution. Edit the indicated islandpath module: https://github.com/brinkmanlab/islandpath/commit/7aa93b9