[Bioperl-l] Alignment

Chris Fields cjfields at uiuc.edu
Wed Feb 21 08:36:02 EST 2007


On Feb 20, 2007, at 6:27 PM, Jay Hannah wrote:
...
>
> On Feb 20, 2007, at 9:30 AM, Albert Vilella wrote:
>> I think the SimpleAlign object contains a set of sequences, each of
>> which is a LocatableSeq object.
>
> Fascinating. In my BLAST-centric universe I went and rolled my own
> solution for SeqLab where I hold onto the Bio::Seq from the reference
> sequences and then hold onto the Bio::Search::HSP::GenericHSP objects
> for all my BLAST hits. From that dataset I can write whatever  
> reports I
> want and/or perform any subsequent actions. I wonder if I should have
> done that differently...
>
> What typically creates .pfam files?
>
> j
> seqlab.net
> http://www.bioperl.org/wiki/User:Jhannah

Pfam alignments come in two formats (pfam and stockholm) that can  
both be parsed into SimpleAlign objects via Bio::AlignIO:

my $alnin = Bio::AlignIO->new(-format => 'stockholm',
                               -file => 'dho.sto');

while (my $aln = $alnin->next_aln) {
    # do stuff to $aln SimpleAlign
}

Personally I stick with Stockholm as it's a richer format (with  
annotations and so on), but the parser was rewritten recently (by  
moi!) so may have some bugs still.

I'm a bit confused as to what you do with BLAST files.  You can  
generate a SimpleAlign right from the HSP for most SearchIO parsers:

http://www.bioperl.org/wiki/HOWTO:SearchIO#Using_the_methods

chris


More information about the Bioperl-l mailing list