public final class AssemblyRegion
extends java.lang.Object
implements htsjdk.samtools.util.Locatable
ActivityProfileState
with non-zero probability at site 400 and passes it to its ActivityProfile
.
The ActivityProfile
eventually produces an AssemblyRegion based on the AssemblyRegionArgumentCollection
parameters.
Let's suppose that this initial region has primary span 350-450 and padded span 100 - 700.
Next, the assembly engine assembles all reads that overlap the padded interval to find variant haplotypes and the variants
they contain. The AssemblyRegion is then trimmed down to a new primary interval bound by all assembled variants within the original primary interval
and a new padded interval. The amount of padding of the new padded interval around the variants depends on the needs of local realignment
and as such need not equal the original padding that was used for assembly.Constructor and Description |
---|
AssemblyRegion(SimpleInterval activeSpan,
boolean isActive,
int padding,
htsjdk.samtools.SAMFileHeader header)
Create a new AssemblyRegion containing no reads
|
AssemblyRegion(SimpleInterval activeSpan,
int padding,
htsjdk.samtools.SAMFileHeader header)
Simple interface to create an assembly region that isActive without any profile state
|
AssemblyRegion(SimpleInterval activeSpan,
SimpleInterval paddedSpan,
boolean isActive,
htsjdk.samtools.SAMFileHeader header)
Create a new AssemblyRegion containing no reads
|
Modifier and Type | Method and Description |
---|---|
void |
add(GATKRead read)
Add read to this region
Read must have alignment start >= than the last read currently in this active region.
|
void |
addAll(java.util.Collection<GATKRead> readsToAdd)
Add all readsToAdd to this region
|
void |
clearReads()
Clear all of the reads currently in this region
|
byte[] |
getAssemblyRegionReference(htsjdk.samtools.reference.ReferenceSequenceFile referenceReader)
See
getAssemblyRegionReference(htsjdk.samtools.reference.ReferenceSequenceFile) with padding == 0 |
byte[] |
getAssemblyRegionReference(htsjdk.samtools.reference.ReferenceSequenceFile referenceReader,
int padding)
Get the reference bases from referenceReader spanned by the padded span of this active region,
including additional padding bp on either side.
|
java.lang.String |
getContig() |
int |
getEnd() |
htsjdk.samtools.SAMFileHeader |
getHeader()
Returns the header for the reads in this region.
|
SimpleInterval |
getPaddedSpan()
Get the span of this assembly region including the padding value
|
java.util.List<GATKRead> |
getReads()
Get an unmodifiable copy of the list of reads currently in this assembly region.
|
SimpleInterval |
getSpan()
Get the raw span of this assembly region (excluding the padding)
|
int |
getStart() |
boolean |
isActive()
Does this region represent an active region (all isActiveProbs above threshold) or
an inactive region (all isActiveProbs below threshold)?
|
boolean |
isFinalized() |
void |
removeAll(java.util.Collection<GATKRead> readsToRemove)
Remove all of the reads in readsToRemove from this region
|
void |
setFinalized(boolean value) |
int |
size()
Get the number of reads currently in this region
|
java.lang.String |
toString() |
AssemblyRegion |
trim(SimpleInterval span,
int padding)
Trim this region to just the span, producing a new assembly region without any reads that has only
the extent of newExtend intersected with the current extent
|
AssemblyRegion |
trim(SimpleInterval span,
SimpleInterval paddedSpan)
Trim this region to no more than the span, producing a new assembly region with properly trimmed reads that
attempts to provide the best possible representation of this region covering the span.
|
public AssemblyRegion(SimpleInterval activeSpan, boolean isActive, int padding, htsjdk.samtools.SAMFileHeader header)
activeSpan
- the span of this active regionisActive
- indicates whether this is an active region, or an inactive onepadding
- the active region padding to use for this active regionpublic AssemblyRegion(SimpleInterval activeSpan, SimpleInterval paddedSpan, boolean isActive, htsjdk.samtools.SAMFileHeader header)
activeSpan
- the span of this active regionpaddedSpan
- the padded span of this active regionisActive
- indicates whether this is an active region, or an inactive onepublic AssemblyRegion(SimpleInterval activeSpan, int padding, htsjdk.samtools.SAMFileHeader header)
public java.lang.String getContig()
getContig
in interface htsjdk.samtools.util.Locatable
public int getStart()
getStart
in interface htsjdk.samtools.util.Locatable
public int getEnd()
getEnd
in interface htsjdk.samtools.util.Locatable
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isActive()
public SimpleInterval getPaddedSpan()
public SimpleInterval getSpan()
public java.util.List<GATKRead> getReads()
public htsjdk.samtools.SAMFileHeader getHeader()
public AssemblyRegion trim(SimpleInterval span, int padding)
span
- the new extend of the active region we wantpadding
- the padding size we want for the newly trimmed active regionpublic AssemblyRegion trim(SimpleInterval span, SimpleInterval paddedSpan)
span
- the new extend of the active region we wantpublic void add(GATKRead read)
read
- a non-null GATKReadjava.lang.IllegalArgumentException
- if read doesn't overlap the padded region of this active regionpublic int size()
public void clearReads()
public void removeAll(java.util.Collection<GATKRead> readsToRemove)
readsToRemove
- the set of reads we want to removepublic void addAll(java.util.Collection<GATKRead> readsToAdd)
readsToAdd
- a collection of readsToAdd to add to this active regionpublic byte[] getAssemblyRegionReference(htsjdk.samtools.reference.ReferenceSequenceFile referenceReader)
getAssemblyRegionReference(htsjdk.samtools.reference.ReferenceSequenceFile)
with padding == 0public byte[] getAssemblyRegionReference(htsjdk.samtools.reference.ReferenceSequenceFile referenceReader, int padding)
referenceReader
- the source of the reference genome basespadding
- the padding, in BP, we want to add to either side of this active region padded regionpublic void setFinalized(boolean value)
public boolean isFinalized()