+ /**
+ * A copy constructor that allows the begin and end positions and group to be
+ * modified
+ *
+ * @param sf
+ * @param newBegin
+ * @param newEnd
+ * @param newGroup
+ */
+ public SequenceFeature(SequenceFeature sf, int newBegin, int newEnd,
+ String newGroup)
+ {
+ this(sf.getType(), newBegin, newEnd, newGroup);
+ }
+
+ /**
+ * Constructor that sets the final fields type, begin, end, group
+ *
+ * @param theType
+ * @param theBegin
+ * @param theEnd
+ * @param theGroup
+ */
+ private SequenceFeature(String theType, int theBegin, int theEnd,
+ String theGroup)
+ {
+ type = theType;
+ begin = theBegin;
+ end = theEnd;
+ featureGroup = theGroup;
+ }
+
+ /**
+ * Two features are considered equal if they have the same type, group,
+ * description, start, end, phase, strand, and (if present) 'Name', ID' and
+ * 'Parent' attributes.
+ *
+ * Note we need to check Parent to distinguish the same exon occurring in
+ * different transcripts (in Ensembl GFF). This allows assembly of transcript
+ * sequences from their component exon regions.
+ */
+ @Override
+ public boolean equals(Object o)