File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
biojava-core/src/main/java/org/biojava/nbio/core/alignment/template Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -142,4 +142,20 @@ enum Step { COMPOUND, GAP }
142142 */
143143 boolean isGap (int alignmentIndex );
144144
145+ /**
146+ * Returns number of gap positions (gap openings and extensions) in the sequence. This could be determined from the {@link Location}
147+ * information or from gap {@link Compound}s, which may not necessarily result in the same number.
148+ *
149+ * @return number of gap positions in the sequence
150+ */
151+ int getNumGapPositions ();
152+
153+ /**
154+ * Returns the coverage, as a fraction between 0 and 1, of this {@link AlignedSequence} with respect to the original sequence.
155+ * This is equivalent to ({@link #getLength()} - {@link #getNumGapPositions()}) / getOriginalSequence().getLength().
156+ *
157+ * @return coverage of the original sequence by the aligned sequence
158+ */
159+ double getCoverage ();
160+
145161}
You can’t perform that action at this time.
0 commit comments