Quantcast
Channel: Post Feed
Viewing all articles
Browse latest Browse all 41826

Blast Runs In Unix Shell But Not Perl

$
0
0

I'm trying to run BLAST in Ubuntu 12.04, using a virtual box. It works fine in the command line, and produces the appropriate results using this blastn -query myfasta.fna -db nt -out output.out

When I try to run it in my Perl script I get the error "Command line argument error: Argument "query". File is not accessible." I stored all the fastas I want to run against the BLAST database in an array named @filestoblastagainst.

foreach my $i (@filestoblastagainst) {
        if ($i =~ m/(.*)\.sff\.fna$/) {
        my $fna = "/home/user/fastadir/".$i;
        my $out=  "/home/user/fastadir/".$1.".out";
        my $database = "/home/user/blast/nt";
        my $query = "blastn -query $fna -db $database -out $out";
        system($query);
        if ($?) {die "command: $query failed\n"};
        }
}

I have had errors before because I'm working in VirtualBox. Would that be the issue here?


Viewing all articles
Browse latest Browse all 41826

Trending Articles