-
Notifications
You must be signed in to change notification settings - Fork 397
Description
I have not found a way to easily calculate the number of gap positions in a sequence alignment. I was using the function AlignedSequence.getNumGaps(), which is said to return the number of gaps in the sequence, but actually returns the number of gap openings (without taking the length of the gap into account), which I found it a bit confusing.
I think it could be useful to have a function AlignedSequence.getNumGapPositions() that returns the total number of gaps (with symbol -) in the aligned sequence and documents properly the differences with the other function.
The applications of such a function would be to calculate the coverage of the sequence alignment on one of the aligned sequences. I also could not find a function to calculate coverage, but it should be easily calculated from the original sequence length, the alignment length and the number of gap positions:
Coverage = ( alignment length - number of gap positions ) / sequence length