Skip to content

Commit

Permalink
Don't popup information if size is < hidel small indel threshold. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Jul 26, 2024
1 parent cf9dc34 commit 0e6b0e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/broad/igv/sam/SAMAlignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static org.broad.igv.prefs.Constants.SAM_HIDE_SMALL_INDEL;

/**
* @author jrobinso
*/
Expand Down Expand Up @@ -690,12 +692,18 @@ public String getAlignmentValueString(double position, int mouseX, AlignmentTrac
buf.append("Dist: " + getClusterDistance() + "<br>");
}

boolean hideSmallIndels = renderOptions.isHideSmallIndels();
int smallIndelThreshold = renderOptions.getSmallIndelThreshold();

boolean atInsertion = false;
boolean atBaseMod = false;
// First check insertions. Position is zero based, block coords 1 based
if (this.insertions != null) {
for (AlignmentBlock block : this.insertions) {
if (block.containsPixel(mouseX)) {
if(hideSmallIndels && block.getBasesLength() < smallIndelThreshold) {
continue;
}
ByteSubarray bases = block.getBases();
if (bases == null) {
buf.append("Insertion: " + block.getLength() + " bases<br>");
Expand Down

0 comments on commit 0e6b0e8

Please sign in to comment.