Open Xiaojun928 opened 4 years ago
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 ?
Hi Simon,
Thanks for your reply!
I've installed perl-autodie in the using conda. Here is a snapshot.
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
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 ?
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.
It is readable too.
This is really weird.. was the file "input_sequences.fna" created by VirSorter ?
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;
}
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.
Ok, maybe I can try it on another system to see what happen. Thanks a lot!
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
I cannot find solutions by searching online. Your help is really appreciated!
Best, Xiaojun