[Biojava-l] ComponentFeature.Template
Dr S.M. Huen
Dr S.M. Huen" <smh1008@cus.cam.ac.uk
Tue, 5 Jun 2001 13:12:14 +0100 (BST)
On Tue, 5 Jun 2001, Thomas Down wrote:
> On Mon, Jun 04, 2001 at 08:49:30PM +0100, Dr S.M. Huen wrote:
> > >From what I can discern from the specs and the sources, the component and
> > the sequence onto which it is mapped must be collinear (ie. same size
> > and sense). Have I understood that correctly?
>
> The requirements are that both location and componentLocation
> are contiguous and of equal length. I guess `colinear'
> probably isn't the right way to put this. I'll take a look.
>
> > I would like to propose an extension to allow the sequences to either be
> > parallel or antiparallel. This has utility where the components were
> > annotated prior to the sense of that component being determined on the
> > tiling path. Would there be objections to such an extension?
>
> That's already supported. If you look at ComponentFeature, it's
> a sub-interface of StrandedFeature. The `strand' property
> indicates whether or not the component is `flipped' in the
> assembly. You can see the support code for how this all works
> in AssembledSymbolList and ProjectedFeatureHolder.
>
> Does this do the sort of things you require?
>
Yes it is.
But the reason I gained the impression that strand wasn't supported was
from this part of AssembledSymbolList.java:-
public Symbol symbolAt(int pos) {
Location l = locationOfPoint(pos);
if (l != null) {
SymbolList syms = getComponentSymbols(l);
return syms.symbolAt(pos - l.getMin() + 1);
}
return N;
}
The symbol returned is always relative to the getMin end irrespective of
strand.
However, it appears that coordinate conversion happens at the
ProjectedFeatureHolder which you refer to. I'll read the source of this
thoroughly to see that I have understood it correctly.
Thanks,
David