Return-value for methods; seed funding
Steve A. Chervitz
sac@genome.stanford.edu
Wed, 30 Jul 1997 02:24:22 -0700 (PDT)
Georg,
> > $seq->revcom(seq($beg,$end)) returns modified object
> > $seq->revcom($beg,$end) same as current revcom() -- returns sequence
> > $seq->revcom(inplace($beg,$end)) modifies the object itself -- this saves time+space
> >
> > The implementation should be straightforward doing a pattern match
> > on the argument.
>
> The last sentence should read
> The implementation should be straightforward by setting an appropriate flag --
> the PDL module uses inplace() in such a way, as far as I remember.
In UnivAln, your documentation would suggest the following:
$seq->inplace(1);
$seq->revcom($beg,$end);
$seq->inplace(0);
This seems reasonable, since you could imagine having multiple
manipulations between the two calls to inplace().
As for other comments on the UnivAln.pm module, I would recommend
soliciting your users as much as possible. I haven't had much of a chance
to use it much (yet), so my input will be limited.
Here are a few observations:
1) In the "Object Manipulation" section:
line 69: if ($str =~ /[AaTtRr]+/) {return 1;} else {return 0;}
change to:
line 69: if ($str =~ /[AaGgRr]+/) {return 1;} else {return 0;}
Similarly for line 283 (in the "Access by Selector Function" section).
2) Also in the "Object Manipulation" section:
for the examples of the methods that can return a string or an array
(gap_free_sites, reverse, complement, revcom), it would be clearer to
have something like:
@alnSlice OR $alnString = $aln->reverse(1,3);
@alnSlice OR $alnString = $aln->complement(1,3);
etc...
It's not valid Perl but this is obvious and it gets the idea across.
3) Wording change on line 740 (in the Appendix):
'considered possibly dangerous' --> 'intended for internal use only'
4) When we decide on the best way to handle how reverse/complement/revcom
are to deal with slices, it would be nice for PreSeq and UnivAln to
employ the same strategy.
That's all for now. I too must sleep |^)
SteveC