some additions for Seq.pm

Georg Fuellen fuellen@dali.mathematik.uni-bielefeld.de
Mon, 9 Dec 1996 17:46:54 +0000 (GMT)


Chris:

> Hi All,
> 
> I've been playing around with the Seq.pm module as found at:
> http://www.techfak.uni-bielefeld.de/bcd/Tec/Bioperl/Code/Bio/Seq.pm
> and have been experimenting with adding my own methods to it.
> 
> I'm self-taught at perl and new to OO-style programming so any comments on
> the enclosed code would be welcome, particularly in making it more
> productive/functional/elegant.
> 
> Enclosed are functions for:
> 
>  o outputing GCG format sequences
>  o translating RNA/DNA -> protein sequence
>  o reversing a sequence
>  o complementing a sequence
>  o reverse-complementing a sequence
>  o translating DNA->RNA
> 
> Most of the guts came from jong's molbio routines, mistakes are all mine :)
> 
> Regards,
> Chris Dagdigian

Just one comment; I'd suggest you should now proceed until you have
a Bio::Seq beta ready; there are just a few steps still missing :-) 

>  sub outGCG {
>  my($self) = @_;

I think this needs to be
my($self) = shift;

This means that @_ is shifted, and @_ then contains the remaining
arguments.

>  my($id,$comment,$len,$type,$seq);
>  my($cnt,$sum,$i,$j,$tmp,$offset);
>  my($c_t,@out);
> 
>    ## CD: The user should also be able to pass in an arbitrary date
>    ## CD: value to be used when formatting the output.
>    ## CD: The user should also be able to pass in a header string and
>    ## CD: maybe switches to control capitalization and line-spacing.
>    ## CD: None of these would be required, but if passed in they would
>    ## CD: overwrite any default behaviour.

Use @_ for this, it should be passed along by parse_unknown.

best wishes,
georg