hello all, here I have attached my code and the result am getting with the case of Blast
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"; } } } } } } }
The error that am getting with this case is here;
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.
Its dying at blastall and thus obviously couldn't get any results.
I have two files one the large file which contails 4KB(size of sequences)
And another File that contains set of small sequences (which may be around 4000 in number)
the large sequence's path is given as the database. Any help please, thanks in advance

In reply to Re^2: Aligning sequence by Anonymous Monk
in thread Aligning sequence by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.