[BioRuby] Clustal ALN writer

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Wed Jan 6 03:31:25 UTC 2010


Hi,

On Tue, 5 Jan 2010 18:09:25 +0100
Pjotr Prins <pjotr.public14 at thebird.nl> wrote:

> On Tue, Jan 05, 2010 at 10:28:28PM +0900, Naohisa GOTO wrote:
> > Hi Pjotr,
> > 
> > There is already Bio::Alignment#output_clustal method.
> > It is implemented in Bio::Alignment::Output module.
> > 
> > http://bioruby.org/rdoc/classes/Bio/Alignment/Output.html#M000092
> 
> I missed that. Still it has no functionality for adding the
> match_line, nor for adding extra information lines. Can I modify this
> to give this method an optional parameter (list of String) for this?
>
> The Alignment class is not aware of 'imported' match lines (it is Clustal
> specific in Bioruby at this stage). 

The output_clustal method gets an argument named "options" as a Hash.
The match line can be altered by any given string with an option.

  alignment.output_clustal(:match_line => str)

I'm very sorry for incomplete documentation. It was first written
in 2003, and documents were added after 2005 but still incomplete.

Bio::Alignment#match_line method is the match line calculation 
method with the same algorithm as ClustalW.

> How do you suppose we can do this so I can generate the ALN with
> multiple match lines?

I'm afraid this is not regarded as Clustal format.
Of course, it is technically easy to add such function.

There may be many private extensions of Clustal format.
I think this is OK because Clustal format is rough,
although this makes hard to validate Clustal format.


Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org



More information about the BioRuby mailing list