[Bioperl-l] Bio::SearchIO

Jason Stajich jason at bioperl.org
Fri Mar 12 10:44:35 EST 2010


I'm sure it does, that what it is supposed to do.

I don't know that there is any way to directly get what you want but the 
code since the format that you want is not a standard multiple-alignment 
output format.  You might consider clustalw format which shows the 
identical columns with '*' and you can keep the start/stop of the 
alignment embedded in the sequence names.

Or you can extract the code you need that does the writing out of the 
writer module so you can try and dig out what you need. You're asking 
for something that is a customized view that is not standard and the 
tools for it are in the existing code, so it means you need to roll your 
view own from it.  This would just mean another ResultWriter module that 
looks a lot like the existing one, but doesn't write the header and 
footer and hit table out - so those methods would just not do anything...

-jason

Janine Arloth wrote, On 3/12/10 12:40 AM:
> Hi,
> thanks...
> but
>
>    use Bio::SearchIO;
>    use Bio::SearchIO::Writer::TextResultWriter;
>
>    my $in = Bio::SearchIO->new(-format =>  'blast',
> 			     -file   =>  shift @ARGV);
>
>    my $writer = Bio::SearchIO::Writer::TextResultWriter->new();
>    my $out = Bio::SearchIO->new(-writer =>  $writer);
>    $out->write_result($in->next_result);
>
> gives me the whole result, but I only need the alignment ;(
> Am 09.03.2010 um 21:49 schrieb Jason Stajich:
>
>    
>> SearchIO writer ->  BLAST format. presumably something like Bio::SearchIO::Writer::TextResultWriter
>>
>> Janine Arloth wrote, On 3/5/10 1:43 AM:
>>      
>>> Hello,
>>> using the example from http://www.bioperl.org/wiki/HOWTO:SearchIO ->   Format msf I only got such an alignment:
>>>
>>>                   1                                                   50
>>> test/1-85             ATGTGTGCAT ACATGTGTAA TCATCCTTGC TCCCCAGCAT CAGAGAATGA
>>> lcl|3013/20-104       ATGTGTGCAT ACATGTGTAA TCATCCTTGC TCCCCAGCAT CAGAGAATGA
>>>
>>>
>>>                        51                                                 100
>>> test/1-85             TCTCTCCTTA TGGCCTTTTG TCTTTCTCCA AAGCA
>>> lcl|3013/20-104       TCTCTCCTTA TGGCCTTTTG TCTTTCTCCA AAGCA
>>>
>>>
>>>
>>> But I prefer this format:
>>>
>>>
>>>
>>> Query  1    ATGTGTGCATACATGTGTAATCATCCTTGCTCCCCAGCATCAGAGAATGATCTCTCCTTA  60
>>>              ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
>>> Sbjct  20   ATGTGTGCATACATGTGTAATCATCCTTGCTCCCCAGCATCAGAGAATGATCTCTCCTTA  79
>>>
>>> Query  61   TGGCCTTTTGTCTTTCTCCAAAGCA  85
>>>              |||||||||||||||||||||||||
>>> Sbjct  80   TGGCCTTTTGTCTTTCTCCAAAGCA  104
>>>
>>>
>>> How can I get this?
>>>
>>> Best Regards
>>> _______________________________________________
>>> 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