I
it_says_BALLS_on_your forehead
Rita said:No you all are giving me code for store data in 1 string or whatever
but my question is not for that, You guys are considering that i
already have value of start and end but I am getting that value from
loop and i want to store in different variable .
see my first posts.
as you all know that in my all programm i have 2 sequences
like
$seq1="AACTGACGACTTTATATACACTAAACTACAATTAAATGGAAGACAGATAATTTAAGAGAAAAAGATTCTTCATATGCATTCTAATTTAGGCAATTTAACATCTAGATCTCGACATAGAGATTGAC";
and
$seq2="CGAGCTGGCAGAGTTCACATGGACAAACAAGGATGCCTGGTTTCTTCATATGCATTCTTGCTGCCCTATACTGTTCAATCCATTCTGCTCAAACCACTATCGTCGACATAGAGATTGACT";
I write both sequences in temperary file called temp1 and temp 2 then
I aligned both sequence using Blast program then i use this code
my $in = Bio::SearchIO ->new(-format => 'blast',
-file => 'temp.blast');
#Print Starting and Ending Point of 1 Hsps-
my $result=$in->next_result;
my $hit =$result->next_hit;
my $hsp1 =$hit->next_hsp;
my$start1=$hsp1->query->start;
my $end1=$hsp1->query->end;
print "start First Hsp ",$start1,"\n";
print "End First Hsp ",$end1,"\n\n";
instead, you would do this:
print "start First Hsp ",$start[0],"\n";
print "End First Hsp ",$end[0],"\n\n";
print "start Second Hsp ",$start[1],"\n";#Print Starting and Ending Point of 2 Hsps-
my $hsp2 =$hit->next_hsp;
my$start2=$hsp2->query->start;
my $end2=$hsp2->query->end;
print "start Second Hsp ",$start2,"\n";
print "End Second Hsp ",$end2,"\n\n";
print "End Second Hsp ",$end[1],"\n\n";
....or you could start from a 1-indexed array if you so chose. i'm sure
you can figure out how to do that.