in reply to Re: Aligning sequence
in thread Aligning sequence
The error that am getting with this case is here;use strict; use Bio::SeqIO; use Bio::Tools::Run::StandAloneBlast; my %srna; my %genome; my $seqio_srna = Bio::SeqIO->new(- file=>'/home/jayakuma/script/graphi +cs/JH_TCV_lateSL.clones.filtered.23_1_2008.fa', -format=>'fasta') or die "cannot open file\n"; my $seqio_large = Bio::SeqIO->new(-file => '/home/jayakuma/script/grap +hics/TCV-jagger.fna', -format =>'fasta') or die " cannot opne the file\n"; while (my $large_seq = $seqio_large->next_seq()){ my $id = $large_seq->display_id; my $seq = $large_seq->seq; $genome{$id} = $seq; while (my $seq_srna = $seqio_srna->next_seq()){ my $display_id = $seq_srna->display_id; my $seq = $seq_srna->seq; $srna{$display_id} = $seq; #rint "seq: $seq\n"; } foreach my $seq_id (keys %srna){ my $srnas = $srna{$seq_id}; print "srnas: $srnas\n"; foreach($srnas){ my $blast = Bio::Tools::Run::StandAloneBlast->new(program=>'blastn +',database=>'/home/jayakuma/script/graphics/TCV-jagger.fna'); my $input = Bio::Seq->new(-seq=> $srnas); print $input->seq, "\n"; my $blast_report = $blast->blastall($input); while (my $result = $blast_report->next_result()){ my $query_length = $result->query_length(); while (my $hit = $result->next_hit()){ my $id = $hit->accession(); while (my $hsp = $hit->next_hsp()){ if($hsp->frac_identical ==1 && $hsp ->length ==$query_leng +th){ print "$srnas\t$id\n"; } } } } } } }
Its dying at blastall and thus obviously couldn't get any results.srnas: TTTGCAGTATTGGACAAGCC TTTGCAGTATTGGACAAGCC Use of uninitialized value in pattern match (m//) at /usr/share/perl5/ +Bio/SeqIO/fasta.pm line 193, <GEN0> line 81643. Use of uninitialized value in print at /usr/share/perl5/Bio/Root/IO.pm + line 407, <GEN0> line 81643. -------------------- WARNING --------------------- MSG: cannot find path to blastall --------------------------------------------------- Can't call method "next_result" on an undefined value at aligning.pl l +ine 34, <GEN0> line 81643.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Aligning sequence
by igelkott (Priest) on Feb 28, 2008 at 20:35 UTC | |
by Anonymous Monk on Feb 29, 2008 at 13:52 UTC | |
by igelkott (Priest) on Mar 01, 2008 at 11:46 UTC |