VirSorter icon indicating copy to clipboard operation
VirSorter copied to clipboard

Error in gene prediction

Open Xiaojun928 opened this issue 6 years ago • 9 comments

Hi Simon,

I'm getting errors running the gene prediction As no *_nett_filtered.fasta can be found, I ran Step1 independently. The command is: perl Step_1_contigs_cleaning_and_gene_prediction.pl VIRSorter ./fasta input_sequences.fna 2

but I got this output

Internal error in autodie/Fatal processing CORE::open: Unknown warnings category 'experimental::smartmatch' at (eval 50) line 6. BEGIN failed--compilation aborted at (eval 50) line 6. at Step_1_contigs_cleaning_and_gene_prediction.pl line 37.

I cannot find solutions by searching online. Your help is really appreciated!

Best, Xiaojun

Xiaojun928 avatar Aug 19 '19 02:08 Xiaojun928

Hi Xiaojun,

The error seems to be specifically with the "autodie" module from perl, maybe it would be worth installing it as part of the conda installation (https://anaconda.org/bioconda/perl-autodie) if you are running VirSorter in a conda environment ?

simroux avatar Aug 19 '19 21:08 simroux

Hi Simon,

Thanks for your reply! I've installed perl-autodie in the using conda. Here is a snapshot. image

But I got the same output

Internal error in autodie/Fatal processing CORE::open: Unknown warnings category 'experimental::smartmatch' at (eval 50) line 6. BEGIN failed--compilation aborted at (eval 50) line 6. at Step_1_contigs_cleaning_and_gene_prediction.pl line 37.

Is there something I am missing? Your help is really appreciated!

Best, Xiaojun

Xiaojun928 avatar Aug 20 '19 01:08 Xiaojun928

I just realized your error is thrown at l. 37, which is where the script tries to read the contig file. Does the file "input_sequences.fna" exists, and is readable by the script ?

simroux avatar Aug 20 '19 01:08 simroux

Yes, "input_sequences.fna" is in fasta/ directory, I also tried perl Step_1_contigs_cleaning_and_gene_prediction.pl VIRSorter ./fasta ./fasta/input_sequences.fna 2

And I got the same output.

Xiaojun928 avatar Aug 20 '19 01:08 Xiaojun928

It is readable too.

Xiaojun928 avatar Aug 20 '19 01:08 Xiaojun928

This is really weird.. was the file "input_sequences.fna" created by VirSorter ?

simroux avatar Aug 20 '19 02:08 simroux

I use part of scripts in wrapper_phage_contigs_sorter_iPlant.pl to generate "input_sequences.fna". Here are the scripts.

#!/usr/bin/perl -w 
use File::Spec::Functions;
use File::Path 'mkpath';

my $wdir = "./";
my $input_file = "/home-user/xjwang/Minglei/double_check190731/genome_info/Roseovarius_sp_xm-a-104.genome";
my $code_dataset    = 'VIRSorter';
my $fastadir = catdir($wdir, 'fasta');
if ( !-d $fastadir ) {
    mkpath($fastadir);
    my $fna_file = catfile($fastadir, 'input_sequences.fna');
    open my $fa, '<', $input_file;
    open my $s1, '>', $fna_file;

    while (<$fa>) {
        chomp($_);
        if ( $_ =~ /^>(.*)/ ) {
            my $id = $1;
            $id =~ s/[\/\.,\|\s?!\*%]/_/g;
            my $new_id = $code_dataset . "_" . $id;
            say $s1 ">$new_id";
        }
        else {
            say $s1 $_;
        }

    }
    close $fa;
    close $s1;
}

Xiaojun928 avatar Aug 20 '19 02:08 Xiaojun928

Interesting.. I've never seen anything like this, and no user ever reported this type of error, so I'm not sure what's going on, but it's likely specific to your system / the way VirSorter is run with these separate scripts.

simroux avatar Aug 20 '19 02:08 simroux

Ok, maybe I can try it on another system to see what happen. Thanks a lot!

Xiaojun928 avatar Aug 20 '19 02:08 Xiaojun928