Ensure that active region extensions stay on contig
This commit is contained in:
parent
dcb7735d3c
commit
c515175313
|
|
@ -287,6 +287,11 @@ public final class GenomeLocParser {
|
|||
return new GenomeLoc(contig, index, start, stop);
|
||||
}
|
||||
|
||||
public GenomeLoc createGenomeLocOnContig(final String contig, final int start, final int stop) {
|
||||
GenomeLoc contigLoc = createOverEntireContig(contig);
|
||||
return new GenomeLoc(contig, getContigIndex(contig), start, stop).intersect(contigLoc);
|
||||
}
|
||||
|
||||
/**
|
||||
* validate a position or interval on the genome as valid
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class ActiveRegion implements HasGenomeLocation {
|
|||
this.isActive = isActive;
|
||||
this.genomeLocParser = genomeLocParser;
|
||||
this.extension = extension;
|
||||
extendedLoc = genomeLocParser.createGenomeLoc(activeRegionLoc.getContig(), activeRegionLoc.getStart() - extension, activeRegionLoc.getStop() + extension);
|
||||
extendedLoc = genomeLocParser.createGenomeLocOnContig(activeRegionLoc.getContig(), activeRegionLoc.getStart() - extension, activeRegionLoc.getStop() + extension);
|
||||
fullExtentReferenceLoc = extendedLoc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue