Assemblathon Perl script Error
3
1
Entering edit mode
7.4 years ago

Trying to run assemblathon_stats.pl to calculate many of the basic contig- and scaffold-level statistics but getting error,

Screenshot below

Assembly genome • 2.8k views
ADD COMMENT
0
Entering edit mode

which version of perl is it?

ADD REPLY
0
Entering edit mode

This is perl 5, version 18, subversion 2 (v5.18.2)

ADD REPLY
0
Entering edit mode

could you try using perl -s assemblathon... and report whether the same errors occur please

ADD REPLY
0
Entering edit mode

same errors occur..........

ADD REPLY
0
Entering edit mode

actually, ignore that, it sounds like the script was written non-strict but it's running under 'use strict'. Im not sure how to set no strict from the command line. You could modify the scriptand add no strict; just after the shebang line

ADD REPLY
0
Entering edit mode

solved by installing perl version 5.10.0 This script does not work under the latest Perl version, need to install an older version (Perl 5.10.0).

ADD REPLY
0
Entering edit mode

Were you running the most recent version of assemblathon_stats from https://github.com/KorfLab/Assemblathon/blob/master/assemblathon_stats.pl ? I can only assume you aren't since that script seems to be written strictly. Try downloading it again and running it under perl 5.18. Installing loads of different versions of perl on your system doesn't strike me as any kind of solution.

ADD REPLY
0
Entering edit mode

please don't post screenshots of console outputs when a simple copy/paste into the question window using code markup would work.

ADD REPLY
1
Entering edit mode
7.4 years ago

solved by installing perl version 5.10.0 This script does not work under the latest Perl version, need to install an older version (Perl 5.10.0).

ADD COMMENT
0
Entering edit mode
7.4 years ago
Michael 54k

Where did you get that script from? Please post the link to download the script or the complete script. Did you change anything?

These are syntax errors thrown when the author of a script forgets to declare a variable, like so:

 use strict;
 use warnings;
 my @seqs = (0, 1, 2, 3); # ok, declared @seqs
 foreach $matches (@seqs) { # not ok, need to declare with my! ICICIC
      $count++ if ($matches > 0); # same here, $count undeclared! ICICIC
 }

This is just an example, nothing to do with the actual script. If you show us the script, we can check what's the best way to fix that.

ADD COMMENT
0
Entering edit mode
6.0 years ago
joanwwong • 0

There is a fix for perl v5.18.2 https://github.com/ucdavis-bioinformatics/assemblathon2-analysis/pull/1/commits

You can fix it yourself by putting parentheses around the qw() in lines 301 and 428:

[original] foreach my $base qw(A C G T N){

[edited] foreach my $base (qw(A C G T N)){

ADD COMMENT

Login before adding your answer.

Traffic: 2392 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6