[Bioperl-l] Problem with blast_sequence()
Smithies, Russell
Russell.Smithies at agresearch.co.nz
Sun Dec 8 18:31:19 UTC 2013
We're unable and unwilling to do your homework so I guess you'll be getting an 'F' on this assignment :- (
If this was homework for a programming class I suspect you'd also get an 'F' for the lack of useful commenting and failing to read the documentation.
But it's not all bad - you'd get marks for "use strict" and "use warnings", although I suspect that was an accidental result of the copy/paste.
>From the lack of comments it's a little difficult to tell what you're trying to do, re-phrase your question and give us a bit more of _your_ code and we might assist.
It looks a bit like you're trying to read in a fasta file and run a remote blast against each sequence but I don't see where you create the remoteblast object and set the parameters such as database, program, e_value etc...
Take a look at http://www.bioperl.org/wiki/Module:Bio::Tools::Run::RemoteBlast and http://search.cpan.org/~cjfields/BioPerl-1.6.922/Bio/Tools/Run/RemoteBlast.pm
If you were particularly brave you could copy and paste the example from CPAN and hope your instructor doesn't notice.
You might also want to look at http://www.bioperl.org/wiki/HOWTO:SeqIO for reading your fasta and http://www.bioperl.org/wiki/HOWTO:SearchIO for parsing your blast results.
--Russell
-----Original Message-----
From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of selvi
Sent: Thursday, 5 December 2013 2:22 p.m.
To: Bioperl-l at lists.open-bio.org
Subject: [Bioperl-l] Problem with blast_sequence()
I am new to bioperl. I ran the code below. and I did get the output. It shows some html codes and output file is empty.
I searched this site .but not able to get the answer.( i tried the solutions
given)
I am using active perl(v.5.14.2) and bioperl-1.6.0
Please help me to get the solution.
Its urgent. I have to submit my assignmentdue by today.
use Bio::Perl;
use Bio::Tools::Run::RemoteBlast;
use Bio::SearchIO;
use warnings;
use strict;
# This is the 'easy' way for reading all sequences as Bio::Seq objects # into array (we take file name from the first command line argument here):
my @seq_array = read_all_sequences($ARGV[0],'fasta');
my $c=@seq_array;
for(my $i=0;$i<$c;$i++)
{
print "\n",$seq_array[$i]->seq;
}
print"\n__________________________\n";
#Here we'll fetch a sequence:
foreach my $seq_object (@seq_array) {
my $blast_result="";
$blast_result= blast_sequence($seq_object); my @s=split('.',$ARGV[0]); my @v=split('|',$seq_object->display_id);
my $f_name=$s[0].$v[2];
print "\n***********************\n",$blast_result;
write_blast(">myblastreport123.txt", $blast_result); }
--
View this message in context: http://bioperl.996286.n3.nabble.com/Problem-with-blast-sequence-tp17250.html
Sent from the Bioperl-L mailing list archive at Nabble.com.
_______________________________________________
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list