[Biococoa-dev] Using an untyped class sequence

Koen van der Drift kvddrift at earthlink.net
Tue Jul 5 18:35:44 EDT 2005

On Jul 5, 2005, at 12:32 PM, Charles Parnot wrote:

> My bottom line is the following:
> * it seems we should keep the subclass structure no matter what; and 
> because Koen's concern has been addressed, he might agree with that... 
> Koen? ;-)

My main reason for liking the single class so much is that it is easy 
to maintain and allows a high degree of modularity. Indeed the code 
duplication has been addressed in great extent and I am sure that 
everyone can agree that this makes maintenance of the sequence classes 
much easier. However, when adding stuff into the superclass, we always 
need to be aware of the fact that the code needs to be adapted for one 
or more subclasses.

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 

BCSequenceTool -> MW, ...
BCProteinTool -> pI, digest, ...
BCDNATool -> translate, ...
BCRNATool -> transcribe, ...

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, plus 
return a reasonable value. If we document this well, there shouldn't be 
a problem. These things can always happen, also when using typed 
sequences. I think it is fine if we leave some responsibility with the 
user of the framework. They don't want their program to misbehave so 
will be sure to catch these type of errors.

> * except me, it seems everybody is confused by the placeholder class 
> BCSequence; the idea was to try to have both options (BCSequence or 
> the bunch of typed sequences), and decide at some point to dump one of 
> the two or maybe keep both; it seems the consensus is now to dump one 
> of the two, and based on the above, it seems logical to dump 
> BCSequence; this is OK, there is very little code in there anyway, it 
> was not very much work; just please keep it around a little while, I 
> will archive it somewhere on my hard-drive (I don't want to rely only 
> on the CVS server!!). And if we ever want to switch back to a single 
> public class, it would not be very much work; the existing class 
> structure would be easily amenable to a class cluster.

So what will we be using instead then?

- Koen.

More information about the Biococoa-dev mailing list