Skip to content

Commit

Permalink
Clip splice junction arcs at junction boundaries. Fix for Bezier curv…
Browse files Browse the repository at this point in the history
…e artifact that sometimes carries curve behond junction boundaries. Fixes #1535
  • Loading branch information
jrobinso committed Aug 12, 2024
1 parent fa87234 commit 7663069
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 315 deletions.
15 changes: 8 additions & 7 deletions src/main/java/org/broad/igv/feature/SpliceJunctionFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

package org.broad.igv.feature;

import htsjdk.tribble.Feature;
import org.broad.igv.track.WindowFunction;

import java.util.ArrayList;
Expand All @@ -45,8 +46,8 @@ public class SpliceJunctionFeature extends BasicFeature {
protected int junctionDepth = 0;

//start and end locations of the junction
protected int junctionStart = 0;
protected int junctionEnd = 0;
private int junctionStart = 0;
private int junctionEnd = 0;

int[] startFlankingRegionDepthArray, endFlankingRegionDepthArray;

Expand All @@ -69,11 +70,11 @@ public SpliceJunctionFeature(String chr, int start, int end, Strand strand) {
* @param otherFeature
* @return
*/
public boolean isSameJunction(SpliceJunctionFeature otherFeature) {
if (otherFeature.getJunctionStart() == getJunctionStart() &&
otherFeature.getJunctionEnd() == getJunctionEnd())
return true;
return false;
public boolean isSameJunction(Feature otherFeature) {
return (otherFeature != null &&
otherFeature instanceof SpliceJunctionFeature &&
((SpliceJunctionFeature) otherFeature).getJunctionStart() == getJunctionStart() &&
((SpliceJunctionFeature) otherFeature).getJunctionEnd() == getJunctionEnd());
}

/**
Expand Down
Loading

0 comments on commit 7663069

Please sign in to comment.