Adding -type arguments of blastn in Bioperl
1
0
Entering edit mode
5.3 years ago

I need to run a blast for small query sequence in bioperl. The way to do it in blast standalone program is by adding

./blastn -db nt -remote -query test2.seq -task "blastn-short" -out test2.out

Is there a way to add -task arguments in BioPerl?

Thank you

alignment sequence • 1.2k views
ADD COMMENT
2
Entering edit mode
ADD COMMENT
0
Entering edit mode

Thank you sir for responding. I tried

$result = $fac->blastn( -query => 'myquery.fasta',
                          -task -> 'blastn-short'
                          -outfile => 'result01.txt',
                          -outformat => 9)

It does not work.

ADD REPLY
0
Entering edit mode

in case you copy/pasted this there's a typo after -task -> must be =>:

$result = $fac->blastn( -query => 'myquery.fasta', -task -> 'blastn-short' -outfile => 'result01.txt', -outformat => 9)
                                                         /\
ADD REPLY
0
Entering edit mode

Sorry about the typo. I didn't copy paste it, that's why. Anyway, it does not work with it.

ADD REPLY
1
Entering edit mode

from a short glimpse it seems that either you have to call it via blastn-short or specify task using method_args:

$result = $fac->blastn-short( -query => 'myquery.fasta', -outfile => 'result01.txt', -outformat => 9)

$result = $fac->blastn( -query => 'query_seqs.fas',
                    -outfile => 'query.bls',
                    -method_args => [ -task => "blastn-short"
                                      -num_alignments => 10,
                                      -evalue => 100 ]);

Bear in mind I'm only guessing

ADD REPLY
0
Entering edit mode

Thank you so much. It worked!

ADD REPLY
1
Entering edit mode

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they all work.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 1848 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