|
Hi,
This piece of code:
- //making a sequence
Alphabet
dna = DNATools.getDNA();
SymbolTokenization dnaToke =
dna.getTokenization("token");
SymbolList seq0 = new SimpleSymbolList(dnaToke, "ACTGGACCTAAGG");
Sequence
sequence0 = new SimpleSequence(seq0, "test", "test", null);
//adding a feature with a between
location StrandedFeature.Template templ
= new
StrandedFeature.Template();
templ.annotation = Annotation.EMPTY_ANNOTATION;
templ.location = new
BetweenLocation(new
RangeLocation(7,8));
templ.source = "my
feature";
templ.strand = StrandedFeature.POSITIVE;
templ.type = "interesting motif";
sequence0.createFeature(templ);
Iterator
iter = sequence0.features();
while (iter.hasNext()) {
Feature feature
= (Feature)iter.next();
Location location
= feature.getLocation();
System.out.println("orginal feature location:
" + location.getClass());
}
//converting to a
simplegappedsequence SimpleGappedSequence _sequence =
new SimpleGappedSequence(sequence0);
iter
= _sequence.features();
while (iter.hasNext()) {
Feature feature
= (Feature)iter.next();
Location location
= feature.getLocation();
System.out.println("new feature location: " + location.getClass());
}
Gives me
the following output:
orginal feature
location class org.biojava.bio.symbol.BetweenLocation new
feature location: class org.biojava.bio.symbol.RangeLocation
Why is the feature location changed from BetweenLocation to
RangeLocation during the conversion ??
Any help would be appreciated,
David De Beule
|
_______________________________________________
Biojava-l mailing list - [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l