Im trying to learn/think about OO programming as Im learning Java and port a Perl app into Java could you tell me if this sounds reasonable for writing some of my own classes!?
My application essentially defines sets of positions from an alignment - I call them CHARSETs as they are analogous to CHARSETs in the Nexus file format. I believe in Biojava the Locations object/interface (sorry, not familiar enough with correct terminology yet) is essentially the same sort of thing. In my app, the user can use several approaches to define a CHARSET e.g. a CHARSET containing just invariable sites, or a CHARSET containing sites above a given % identity. My question is this, if I were to create a class called Charset, and I create several subclasses called e.g. Invariable etc is this reasonable? Or should the class Charset contain many methods for creating a different type of CHARSET? In my app, a CHARSET needs to be associated with a particular alignment, and settings used to define the CHARSET, so my Charset class have variables such as an Alignment object, Locations objects etc. Id like to write a method that returns a subalignment based on the CHARSETs associated alignment object and Locations object but Im not sure how to do this. Thanks for any help/comments/corrections/critiques Nathan ---------------------------------------------------------------------------- ------ Dr. Nathan S. Haigh Bioinformatics PostDoctoral Research Associate Room B2 211 Tel: +44 (0)114 22 20112 Department of Animal and Plant Sciences Mob: +44 (0)7742 533 569 University of Sheffield Fax: +44 (0)114 22 20002 Western Bank Web: www.bioinf.shef.ac.uk Sheffield www.petraea.shef.ac.uk S10 2TN ---------------------------------------------------------------------------- ------ --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0615-2, 12/04/2006 Tested on: 27/04/2006 16:12:34 avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
