[Biojava-l] Managing Ranks?

Michael Joss mjoss at bio.mq.edu.au
Fri Aug 4 01:16:39 UTC 2006


Hi all,
         Perhaps this is more of a Java/Programming/BioSQL question
rather than a BioJavaX question in particular but I was wondering what
people thought the best way to manage Ranks in Features and Locations
was? Seems to me that iterating through every feature and location and
adjusting their ranks everytime I add or remove a feature is a risky
business. I can just see it getting out of hand and messy very quickly.
Also I notice that the Genbank parsing etc does not set a rank initially
for features or locations. Is there a reason for this since the file
clearly places the features in rank order? 
I guess to explain a little more fully, I come from a database
background, I have some experience with OO programming but not a whole
heap so the object models are a little alien to me. Is there someway I
could order a featureset by the minposition of each feaures location
forinstance? Is the FeatureSet actually ordered by a whole number of
things, or just Feature.rank? I can see the importance of rank for
producing an arbritary order but if I wanted to keep things more rigid
how would I go about adjusting the order of the set returned from
RichSequence.getFeatureSet() to be ordered by
feature.location.minposition? Am I thinking about this all the wrong
way, I just keep wanting to query the database and get a nice ordered
result set rather than working with objects as the information stored in
them seems to be so arbritarily ordered. Admittedly most of this is
unimportant except for display purposes but still it seems like a mental
leap I am just not making. Thanks in advance for any help you can offer.

Cheers 
Joss

As an aside some explanation of what brings me here. Essentially what I
am trying to do overall is use BioJavaX to make a JSP front end for a
BioSQL Database. Just be able to add sequences, and annotations, and
search them via a web interface, then visualise the data, sequence data,
protein translations etc. Will be adding a whole lot more later, but
thats the starting plan. 
I had done all this for a database structure I had come up with but
decided that the framework set up in BioSQL and The tools in BioJava
would make my info a whole lot more transferrable and maintainable in
the long run. Hence here I am.



More information about the Biojava-l mailing list