[Biojava-dev] Problems with RichLocations
george waldon
gwaldon at geneinfinity.org
Thu Nov 2 15:47:28 UTC 2006
Hello,
I think I found some potential problems with RichLocation.
In RichLocation.Tools.construct(Collection members) the merging is apparently missing. Biojavax always calls merging before construct but the javadoc indicates logically that merging should be done inside the body of the method.
In CompoundRichLocation, blocIterator should return an iterator over contiguous blocs sorted in ascending order according to Location javadoc. It does not seem that the list of members is sorted.
In RichLocation.Tools.flatten(Collection members), members are checked for being instance of SimpleRichLocation. This does not sound correct. First, SimpleRichLocation is not an interface and therefore there is no contract with it and it should not be here; secondly compound members are probably instance of CompoundRichLocation which extends SimpleRichLocation and therefore these compound members are not flattened.
In RichLocation.Tools.modulateCircularLocation(int start, int end, int seqLength), end could be far up and we are probably missing something like
while (locationLength>=seqLength) locationLength-=seqLength;
Hope this helps.
Thanks,
George
More information about the biojava-dev
mailing list