[Biojava-l] How handle genbank location like AC1234:790078..790119

Stephane Marcel stephane.marcel@lionbioscience.com
Fri, 18 Oct 2002 14:45:33 +0200


Hi,

I am a new user of biojava and a need help for a genBank parser.
My problem is when I try to get the location of my feature. If the location
is : join(790078..790119,791193..791337)
no problem... I can get the min, the max and both blocks.

But, if the location is : join(AC1234:790078..790119,791193..791337) the
first block describes a clone.
In this case, the first block is simply ignored and only the second block is
returned.

Here is the code I use to get this location:



while(seqI.hasNext()) {
       Sequence seq = seqI.nextSequence();
       this.extractFeatures(seq);
 }

public void extractFeatures(Sequence seq)
    throws Exception {
        for (Iterator i = ((FeatureHolder)seq).features(); i.hasNext(); ) {
            Feature f = (Feature) i.next();
		System.out.println((f.getLocation().toString());
	}

}


There is similar problems with locations like (123.567) or 123^567

It seems there is a class EmblLikeLocationParser which manages this kind of
location, but there is any public constructor and I do not know how handle
with it.

Any ideas how to get around this?

Best Regards.

Stephane.