Skip to content

Commit

Permalink
remove toSimpleInterval()
Browse files Browse the repository at this point in the history
  • Loading branch information
SHuang-Broad committed Sep 5, 2018
1 parent 139e12d commit 28efdce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ private static class CigarQualityInfo {
private static double getGenomeIntervalsOverlap(final BreakpointEvidence evidence,
final FeatureDataSource<BEDFeature> genomeIntervals,
final ReadMetadata readMetadata) {
final SimpleInterval simpleInterval = evidence.getLocation().toSimpleInterval(readMetadata);
final SVInterval location = evidence.getLocation();
final SimpleInterval simpleInterval = new SimpleInterval(readMetadata.getContigName(location.getContig()),
location.getStart(),
location.getEnd() - 1); // "end - 1" because SimpleIntervals are closed on both ends
int overlap = 0;
for(final Iterator<BEDFeature> overlapperItr = genomeIntervals.query(simpleInterval); overlapperItr.hasNext();) {
final BEDFeature overlapper = overlapperItr.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ public final class SVInterval implements Comparable<SVInterval> {
private final int start;
private final int end;

/**
* Note: according to {@link #toBedString(ReadMetadata)} and {@link #toSimpleInterval(ReadMetadata)},
* {@code start} should be on a 1-based coordinate system, rather than 0-based.
*/
public SVInterval( final int contig, final int start, final int end ) {
this.contig = contig;
this.start = start;
Expand Down Expand Up @@ -153,11 +149,6 @@ public int compareTo( final SVInterval that ) {
return result;
}

public SimpleInterval toSimpleInterval(final ReadMetadata readMetadata) {
// "end - 1" because SimpleIntervals are closed on both ends
return new SimpleInterval(readMetadata.getContigName(contig), start, end - 1);
}

@Override
public String toString() { return Integer.toString(contig)+"["+start+":"+end+"]"; }

Expand Down

0 comments on commit 28efdce

Please sign in to comment.