[Biococoa-dev] Using an untyped class sequence

Philipp Seibel biococoa at bioworxx.com
Wed Jul 6 03:54:46 EDT 2005


> What I also like a lot is that most functionality is kept is small  
> 'Tools' classes. We already made a start with that and it seems to  
> work nice (at least for me ;-)
> Now there are (at least) two ways to call the tools classes:
> 1. We put sequence-specific wrappers in the subclasses (more or  
> less our current approach)
> 2. We create a general tools class for DNA, RNA, Protein, that  
> contains wrappers to various tools classes, again sequence-specific  
> (biojava approach):
> BCSequenceTool -> MW, ...
> BCProteinTool -> pI, digest, ...
> BCDNATool -> translate, ...
> BCRNATool -> transcribe, ...

This is for sure a possible clean solution.

> So for instance, [BCSequenceTools translation] does not exist, so  
> will never compile. In these cases, call BCDNATools to take care of  
> the operation. Another example, BCProteinTool should only contain  
> wrappers that calls the specific tool., so eg:
> pI = [BCProteinTool isoElectricPoint forSequence: mySeq]
> Now if mySeq is not a protein, then display a console message

A exception would be much better, to allow the program or the  
programmer to react.

> , plus return a reasonable value.

Is there a reasonable value ?

> If we document this well, there shouldn't be a problem.

I don't like to legalize hacks, because of documenting them.


More information about the Biococoa-dev mailing list