Reverse Complement utility, Bio::Alg, return value problem

Steve A. Chervitz
Tue, 5 Aug 1997 20:40:05 -0700 (PDT)

Hi All,

I'm replying to the list as per SteveB's request.

On Tue, 5 Aug 1997, Steven E. Brenner wrote:

> On Tue, 5 Aug 1997, Georg Fuellen wrote:
> > 0) We should post a reply to
> >
> > -re- Reverse Complement utility sought
> > if Chris' code can be expected to solve the problem brought up there.
> Can you do this?  

It's not clear whether this user needs some stand-alone software or if 
he can use a web-based utility. If this user has a network connection we 
could provide this functionality via the web: whip up a simple cgi 
front-end to Bio::PreSeq that would take any DNA sequence and create its 
revcom. Luca Toldo has done a similar thing with his Java Molecular 
Biology Workbench:
but it is difficult to analyze long sequences given the sizes of his 
input/output text areas.

Actually, this sort of thing would be a great way to showcase Bioperl
modules. Allowing users to see first-hand what the modules can do 
(requiring minimal effort on their part) is a powerful advertisement.
(Would you want to buy a car without taking it out for a test ride?)
We could include the URL for the driver in the on-line poster,    
the module distribution site, and in the POD. The driver could 
illustrate new features as they are added to the package.

As for the format of the web driver, I'm envisioning a two-frame page 
where the upper panel contains a form for data input and parameter 
settings; the lower panel shows the results after hitting 'Submit'.  
Or the results could be shown on a new page. Nothing too fancy here, just 
enough to show basic functionality. 

I imagine some users (like the guy who posted the above request) will use 
the driver as-is to process their data. Others, impressed with the 
functionality, will choose to download the module and use it.

What do you think?

> > 2) Has anybody of you already got ideas about how a Bio::Alg module could
> > look like ? E.g. the algorithm could be ClustalW or HMMER for aligning
> > biosequences, and would handle parameters, calling, results parsing,
> > etc. I intent to post soon to vsns-bcd-perl about this.
> You mean something like, Bio::UnivAln::ExtAlg? :)  (I wouldn't want to put
> all external algorithms in one object, and probably want to put internal
> algorithms with external ones.) 
> Actually, I haven't thought about it much, but it should be fairly easy if
> you you make it restricted.  But if you want to be totally general, it
> could be tough.  Further, you need to do a lot of fix-ups at installation
> time (for directories, etc)

I've done a little work along these lines with a module I created 
for handling parameters needed to run various GCG programs. It's 
becomming a bit of a nightmare as the number of parameters required gets 
larger. One complication was that I started using the package as a 
general parameter setter for non-GCG things, so I'm trying to clean it up
now. I think a Bio::Alg object would be useful but agree with SteveB that 
installation would be complex.

You might want a different name than Bio::Alg, since this name to me 
implies that the module *provides* the algorithms rather than simply 
wraps around them. Perhaps AlgManager? AlgWrapper?

> > 3) Regarding return-values, pls let me know soon about your opinion.
> > Btw, in my post I should have used get_seq() instead of slice(), so that 
> > we have
> > $myseq->get_seq(seq($beg,$end))       returns modified object
> I'm confused.  Is seq an exported function?  
> When you say "returns modified object," do you mean modifies the current
> object or creates a new object and returns that?
> > $myseq->get_seq($beg,$end)            same as current get_seq() -- returns sequence
> > $myseq->get_seq(inplace($beg,$end))   modifies the object itself -- ithis saves time+space
> > 
> > And for revcom:
> > $myseq->revcom(seq($beg,$end))      returns modified object
> > $myseq->revcom($beg,$end)           same as current revcom() -- returns sequence
> > $myseq->revcom(inplace($beg,$end))  modifies the object itself -- this saves time+space
> > 

I'm also confused about how the seq() and inplace() calls within the 
get_seq() and revcom() calls are being used.  Either of these might be 
more obvious: