Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Calculate the Number of Gap Positions in a Sequence Alignment (and Coverage) #491

Copy link
Copy link

Description

@lafita
Issue body actions

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
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationJavadoc relatedJavadoc relatedenhancementImprovement of existing code or methodImprovement of existing code or methodnew featureNew method or data structureNew method or data structure

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.