[Bioperl-l] AlignIO

Chad Davis chad.a.davis at gmail.com
Tue Jun 21 17:23:06 UTC 2011


It sounds like your randomization procedure is breaking the alignment
format, such that the clustal parser can no longer read it. How are
you randomizing the file? An example might help.

Chad

On Tue, Jun 21, 2011 at 18:55, ashwoo <projectbasu at gmail.com> wrote:
> Dear All,
>              I have a script which parses the best HSP alignment out
> of BLAST result and writes it to a temporary file.
>
> my $aln = $hsp->get_aln;
> 1. my $out = Bio::AlignIO->new(-file => ">tmp.aln",
> 2.                                 -format => 'clustalw');
> 3. $out->write_aln($aln);
>
>
> I randomize the alignment within the "tmp.aln" file to generate a new
> file "mult_rand.aln" containing all randomized alignments in clustalw
> format.
> Now I want to read each alignment in the randomized file hence I use
>
> 4. my $in  = Bio::AlignIO->new(-file   => "mult_rand.aln",
> 5.                                           -format => 'clustalw');
> 6. while ( my $aln = $in->next_aln() ) {
> 7.   #"RUN RNAZ to check the conservedness of each randomized
> alignment"
> 8.   #NOT GETTING ANY VALUES HERE
> 9.   }
>
> But I am not able to access each alignment. When I open the randomized
> aln file with a separate script and same code in lines 4-9  it works
> fine. Is this happening due to my using AlignIO objects twice in the
> same script. Please Help.
>
> yours sincerely,
> Perl Novice
> _______________________________________________
> 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