[Bioperl-l] Fwd: SimpleAlign object

Jason Stajich jason at bioperl.org
Fri May 22 16:23:12 UTC 2009


please keep your questions on the list.
I'm not sure what you want to do - please clarify or maybe someone on  
the list will help.

Begin forwarded message:

> From: Mgavi Brathwaite <lsbrath at gmail.com>
> Date: May 22, 2009 7:03:33 AM PDT
> To: Jason Stajich <jason at bioperl.org>
> Subject: Re: SimpleAlign object
>
> So, if I pass the alignment object to a database table field, when  
> that
> table.field is queried
> will it return the alignment or an object? I want the actual  
> alignment. I am
> a little confuse about this.
>
> Thanks for your time and help!
> LomSpace
>
>
> On Thu, May 21, 2009 at 11:51 PM, Jason Stajich <jason at bioperl.org>  
> wrote:
>
>> I'm not sure what you *want* to print in "alignment" section? you  
>> have the
>> "actual alignment" as an object. It looks like you already got that
>> alignment object with get_aln() from your HSP- did you look at the
>> documentation for that method?  You can also get the query/hit/ 
>> homology
>> strings with methods called on the HSP object.  The SearchIO HOWTO  
>> describes
>> this.
>> See Bio::SearchIO::Writer::TextResultWriter if you want to reformat  
>> a blast
>> report.
>>
>> Or if you want to write it out in a Multiple alignment format  
>> (multi-fasta,
>> clustalw, phylip, etc)  with Bio::AlignIO
>>
>> You can use IO::String to write the sequence into a string instead  
>> of to a
>> file/STDOUT if you want to format things in your script
>>
>> my $str = IO::String->new;
>> my $alnio = Bio::AlignIO->new(-format => 'clustalw', -fh => $str);
>> $alnio->write_aln($str);
>> The alignment formatted as a string is now in $str->string_ref so  
>> you can
>> access it from ${str->string_ref}
>>
>>
>> On May 21, 2009, at 8:38 PM, Mgavi Brathwaite wrote:
>>
>> Hello,
>>
>> I am parsing a blast report. My script is returning the following  
>> output
>> to file:
>>
>> Name: 13414|HD
>> Percent Identity:  100
>> Alignment:  Bio::SimpleAlign=HASH(0x40d0ac4)
>> How do I access " Bio::SimpleAlign=HASH(0x40d0ac4)" actual  
>> alignment for
>> this object?
>>
>> LomSpace
>>
>>
>> Jason Stajich
>> jason at bioperl.org
>>
>>
>>
>>
>>

Jason Stajich
jason at bioperl.org







More information about the Bioperl-l mailing list