+
+ public static Sequence newSequence(String Name, String Sequence, String Dictionary, int start, int end) {
+ //TODO: make hierarchy reflecting the SeqType object.
+ Sequence seq= new Sequence();
+ seq.setDictionary(Dictionary);
+ seq.setName(Name);
+ seq.setSequence(Sequence);
+ seq.setStart(start);
+ if (start<=end) {
+ if ((end-start)!=Sequence.length())
+ seq.setEnd(start+Sequence.length());
+ } else {
+ // reverse topology mapping. TODO: VAMSAS: decide if allowed to do start>end on Sequence object
+ if ((start-end)!=Sequence.length())
+ seq.setEnd(end+Sequence.length());
+ }
+ return seq;
+ }
+