Skip to content

Commit

Permalink
starting to respond to review comments"
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesemery committed Feb 23, 2022
1 parent 3e2785c commit 1c6dc21
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public AssemblyRegionIterator(final MultiIntervalShard<GATKRead> readShard,
this.readCachingIterator = new ReadCachingIterator(readShard.iterator());
this.readCache = new ArrayDeque<>();
this.activityProfile = new BandPassActivityProfile(assemblyRegionArgs.maxProbPropagationDistance, assemblyRegionArgs.activeProbThreshold, BandPassActivityProfile.MAX_FILTER_SIZE, BandPassActivityProfile.DEFAULT_SIGMA, readHeader);
this.pendingAlignmentData = trackPileups? new ArrayDeque<>(): null;
this.pendingAlignmentData = trackPileups ? new ArrayDeque<>() : null;

// We wrap our LocusIteratorByState inside an IntervalAlignmentContextIterator so that we get empty loci
// for uncovered locations. This is critical for reproducing GATK 3.x behavior!
Expand Down Expand Up @@ -218,7 +218,8 @@ private void fillNextAssemblyRegionWithReads( final AssemblyRegion region ) {
}

private void fillNextAssemblyRegionWithPileupData(final AssemblyRegion region){
if (pendingAlignmentData==null){
// Save ourselves the memory footprint and work of saving the pileups in the event they aren't needed for processing.
if (pendingAlignmentData == null){
return;
}
final List<AlignmentAndReferenceContext> overlappingAlignmentData = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public final class PileupDetectionArgumentCollection {
//TODO we currently don't see the same threshold from active region determination...
public static final String PILEUP_DETECTION_ACETIVE_REGION_LOD_THRESHOLD_LONG_NAME = "pileup-detection-active-region-lod-threshold";


// Arguments related to DRAGEN heuristics related to "read badness" intended to filter out false positives from the pileup detection code
public static final String PILEUP_DETECTION_BAD_READ_RATIO_LONG_NAME = "pileup-detection-bad-read-tolerance";
public static final String PILEUP_DETECTION_PROPER_PAIR_READ_BADNESS_LONG_NAME = "pileup-detection-proper-pair-read-badness";
Expand Down Expand Up @@ -57,10 +56,6 @@ public final class PileupDetectionArgumentCollection {
@Argument(fullName= "artifical-haplotype-filtering-kmer-size", doc = "Pileup Detection: Controls what size to kmerize reads to in order to select best supported artificial haplotypes", optional = true)
public int filteringKmerSize = 10;





/**
* Percentage of reads required to support the alt for a variant to be considered
*/
Expand All @@ -71,17 +66,13 @@ public final class PileupDetectionArgumentCollection {
@Argument(fullName= PILEUP_DETECTION_INDEL_THRESHOLD, doc = "Pileup Detection: Percentage of alt supporting reads in order to consider alt indel", optional = true)
public double indelThreshold = 0.5;


@Hidden
@Argument(fullName= PILEUP_DETECTION_ABSOLUTE_ALT_DEPTH, doc = "Pileup Detection: Absolute number of alt reads necessary to be included in pileup events", optional = true)
public double pileupAbsoluteDepth = 0;
@Hidden
@Argument(fullName= PILEUP_DETECTION_INDEL_SNP_BLOCKING_RANGE, doc = "Pileup Detection: Filters out pileup snps within this many bases of an assembled indel", optional = true)
public int snpAdajacentToAssemblyIndel = 5;




/**
* Arguments related to the "bad read filtering" where alleles that are supported primarily by reads that fail at least one of a number of heuristics will be filtered out
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,8 @@ public Object[][] filterPileupHaplotypesDataProvider() {
final Haplotype hapD = new Haplotype("ACCTGAA".getBytes());
final Haplotype hapF = new Haplotype("GAAGAAG".getBytes()); // testing repeated kmers

Map<Kmer, Integer> flatSupportAllKmers = new HashMap<Kmer, Integer>() { private static final long serialVersionUID = 0L; {
Map<Kmer, Integer> flatSupportAllKmers = new HashMap<Kmer, Integer>() {
private static final long serialVersionUID = 0L; {
put(new Kmer("ACC"), 1);
put(new Kmer("CCT"), 1);
put(new Kmer("CTG"), 1);
Expand All @@ -1405,7 +1406,8 @@ public Object[][] filterPileupHaplotypesDataProvider() {
put(new Kmer("AAG"), 1);
}};

Map<Kmer, Integer> hapDKmersHighSupport = new HashMap<Kmer, Integer>() { private static final long serialVersionUID = 0L;{
Map<Kmer, Integer> hapDKmersHighSupport = new HashMap<Kmer, Integer>() {
private static final long serialVersionUID = 0L;{
put(new Kmer("ACC"), 10);
put(new Kmer("CCT"), 10);
put(new Kmer("CTG"), 10);
Expand All @@ -1419,15 +1421,17 @@ public Object[][] filterPileupHaplotypesDataProvider() {
put(new Kmer("AAG"), 1);
}};

Map<Kmer, Integer> hapDKmers = new HashMap<Kmer, Integer>() { private static final long serialVersionUID = 0L; {
Map<Kmer, Integer> hapDKmers = new HashMap<Kmer, Integer>() {
private static final long serialVersionUID = 0L; {
put(new Kmer("ACC"), 10);
put(new Kmer("CCT"), 10);
put(new Kmer("CTG"), 10);
put(new Kmer("TGA"), 10);
put(new Kmer("GAA"), 10);
}};

Map<Kmer, Integer> hapFRepeatedKmers = new HashMap<Kmer, Integer>() { private static final long serialVersionUID = 0L; {
Map<Kmer, Integer> hapFRepeatedKmers = new HashMap<Kmer, Integer>() {
private static final long serialVersionUID = 0L; {
put(new Kmer("GAA"), 1);
}};

Expand All @@ -1439,7 +1443,7 @@ public Object[][] filterPileupHaplotypesDataProvider() {
new Object[]{Arrays.asList(hapA,hapB,hapC,hapD),flatSupportAllKmers,2,3,Arrays.asList(hapA,hapB)},
new Object[]{Arrays.asList(hapA,hapB,hapC,hapD),flatSupportAllKmers,3,3,Arrays.asList(hapA,hapB,hapC)},

// Repetative kmers in hapF don't get double counted
// Repetitive kmers in hapF don't get double counted
new Object[]{Arrays.asList(hapA,hapB,hapD,hapF),hapFRepeatedKmers,2,3,Arrays.asList(hapF,hapD)},
new Object[]{Arrays.asList(hapA,hapB,hapD,hapF),hapFRepeatedKmers,1,3,Arrays.asList(hapD)}, //currently repeated kmers only count as singular evidence

Expand Down

0 comments on commit 1c6dc21

Please sign in to comment.