+ }
+
+ /**
+ * Constructor including a Status value
+ *
+ * @param type
+ * @param desc
+ * @param status
+ * @param begin
+ * @param end
+ * @param featureGroup
+ */
+ public SequenceFeature(String type, String desc, String status,
+ int begin, int end, String featureGroup)
+ {
+ this(type, desc, begin, end, featureGroup);
+ setStatus(status);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param type
+ * @param desc
+ * @param begin
+ * @param end
+ * @param featureGroup
+ */
+ SequenceFeature(String type, String desc, int begin, int end,
+ String featureGroup)
+ {
+ this.type = type;
+ this.description = desc;
+ this.begin = begin;
+ this.end = end;
+ this.featureGroup = featureGroup;
+ }
+
+ /**
+ * Constructor including a score value
+ *
+ * @param type
+ * @param desc
+ * @param begin
+ * @param end
+ * @param score
+ * @param featureGroup
+ */
+ public SequenceFeature(String type, String desc, int begin, int end,
+ float score, String featureGroup)
+ {
+ this(type, desc, begin, end, featureGroup);
+ this.score = score;
+ }
+
+ /**
+ * 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)
+ {
+ return equals(o, false);
+ }
+
+ /**
+ * Overloaded method allows the equality test to optionally ignore the
+ * 'Parent' attribute of a feature. This supports avoiding adding many
+ * superficially duplicate 'exon' or CDS features to genomic or protein
+ * sequence.
+ *
+ * @param o
+ * @param ignoreParent
+ * @return
+ */
+ public boolean equals(Object o, boolean ignoreParent)
+ {
+ if (o == null || !(o instanceof SequenceFeature))