@@ -231,7 +231,8 @@ public final class ModelSegments extends CommandLineProgram {
231
231
public static final String ALLELE_FRACTION_LEGACY_SEGMENTS_FILE_SUFFIX = ".af.igv" + SEGMENTS_FILE_SUFFIX ;
232
232
233
233
//het genotyping argument names
234
- public static final String MINIMUM_TOTAL_ALLELE_COUNT_LONG_NAME = "minimum-total-allele-count" ;
234
+ public static final String MINIMUM_TOTAL_ALLELE_COUNT_CASE_LONG_NAME = "minimum-total-allele-count-case" ;
235
+ public static final String MINIMUM_TOTAL_ALLELE_COUNT_NORMAL_LONG_NAME = "minimum-total-allele-count-normal" ;
235
236
public static final String GENOTYPING_HOMOZYGOUS_LOG_RATIO_THRESHOLD_LONG_NAME = "genotyping-homozygous-log-ratio-threshold" ;
236
237
public static final String GENOTYPING_BASE_ERROR_RATE_LONG_NAME = "genotyping-base-error-rate" ;
237
238
@@ -248,8 +249,8 @@ public final class ModelSegments extends CommandLineProgram {
248
249
public static final String MINOR_ALLELE_FRACTION_PRIOR_ALPHA_LONG_NAME = "minor-allele-fraction-prior-alpha" ;
249
250
public static final String NUMBER_OF_SAMPLES_COPY_RATIO_LONG_NAME = "number-of-samples-copy-ratio" ;
250
251
public static final String NUMBER_OF_BURN_IN_SAMPLES_COPY_RATIO_LONG_NAME = "number-of-burn-in-samples-copy-ratio" ;
251
- public static final String NUM_SAMPLES_ALLELE_FRACTION_LONG_NAME = "number-of-samples-allele-fraction" ;
252
- public static final String NUM_BURN_IN_ALLELE_FRACTION_LONG_NAME = "number-of-burn-in-samples-allele-fraction" ;
252
+ public static final String NUMBER_OF_SAMPLES_ALLELE_FRACTION_LONG_NAME = "number-of-samples-allele-fraction" ;
253
+ public static final String NUMBER_OF_BURN_IN_SAMPLES_ALLELE_FRACTION_LONG_NAME = "number-of-burn-in-samples-allele-fraction" ;
253
254
254
255
//smoothing argument names
255
256
public static final String SMOOTHING_CREDIBLE_INTERVAL_THRESHOLD_COPY_RATIO_LONG_NAME = "smoothing-credible-interval-threshold-copy-ratio" ;
@@ -292,12 +293,22 @@ public final class ModelSegments extends CommandLineProgram {
292
293
private String outputDir ;
293
294
294
295
@ Argument (
295
- doc = "Minimum total count for filtering allelic counts, if available." ,
296
- fullName = MINIMUM_TOTAL_ALLELE_COUNT_LONG_NAME ,
296
+ doc = "Minimum total count for filtering allelic counts in the case sample, if available. " +
297
+ "The default value of zero is appropriate for matched-normal mode; " +
298
+ "increase to an appropriate value for case-only mode." ,
299
+ fullName = MINIMUM_TOTAL_ALLELE_COUNT_CASE_LONG_NAME ,
297
300
minValue = 0 ,
298
301
optional = true
299
302
)
300
- private int minTotalAlleleCount = 30 ;
303
+ private int minTotalAlleleCountCase = 0 ;
304
+
305
+ @ Argument (
306
+ doc = "Minimum total count for filtering allelic counts in the matched-normal sample, if available." ,
307
+ fullName = MINIMUM_TOTAL_ALLELE_COUNT_NORMAL_LONG_NAME ,
308
+ minValue = 0 ,
309
+ optional = true
310
+ )
311
+ private int minTotalAlleleCountNormal = 30 ;
301
312
302
313
@ Argument (
303
314
doc = "Log-ratio threshold for genotyping and filtering homozygous allelic counts, if available. " +
@@ -414,15 +425,15 @@ public final class ModelSegments extends CommandLineProgram {
414
425
415
426
@ Argument (
416
427
doc = "Total number of MCMC samples for allele-fraction model." ,
417
- fullName = NUM_SAMPLES_ALLELE_FRACTION_LONG_NAME ,
428
+ fullName = NUMBER_OF_SAMPLES_ALLELE_FRACTION_LONG_NAME ,
418
429
optional = true ,
419
430
minValue = 1
420
431
)
421
432
private int numSamplesAlleleFraction = 100 ;
422
433
423
434
@ Argument (
424
435
doc = "Number of burn-in samples to discard for allele-fraction model." ,
425
- fullName = NUM_BURN_IN_ALLELE_FRACTION_LONG_NAME ,
436
+ fullName = NUMBER_OF_BURN_IN_SAMPLES_ALLELE_FRACTION_LONG_NAME ,
426
437
optional = true ,
427
438
minValue = 0
428
439
)
@@ -619,12 +630,14 @@ private AllelicCountCollection genotypeHets(final SampleLocatableMetadata metada
619
630
620
631
logger .info ("Genotyping heterozygous sites from available allelic counts..." );
621
632
633
+ AllelicCountCollection filteredAllelicCounts = allelicCounts ;
634
+
622
635
//filter on total count in case sample
623
- logger .info (String .format ("Filtering allelic counts with total count less than %d..." , minTotalAlleleCount ));
624
- AllelicCountCollection filteredAllelicCounts = new AllelicCountCollection (
636
+ logger .info (String .format ("Filtering allelic counts with total count less than %d..." , minTotalAlleleCountCase ));
637
+ filteredAllelicCounts = new AllelicCountCollection (
625
638
metadata ,
626
- allelicCounts .getRecords ().stream ()
627
- .filter (ac -> ac .getTotalReadCount () >= minTotalAlleleCount )
639
+ filteredAllelicCounts .getRecords ().stream ()
640
+ .filter (ac -> ac .getTotalReadCount () >= minTotalAlleleCountCase )
628
641
.collect (Collectors .toList ()));
629
642
logger .info (String .format ("Retained %d / %d sites after filtering on total count..." ,
630
643
filteredAllelicCounts .size (), allelicCounts .size ()));
@@ -645,6 +658,7 @@ private AllelicCountCollection genotypeHets(final SampleLocatableMetadata metada
645
658
if (normalAllelicCounts == null ) {
646
659
//filter on homozygosity in case sample
647
660
logger .info ("No matched normal was provided, not running in matched-normal mode..." );
661
+
648
662
logger .info ("Performing binomial testing and filtering homozygous allelic counts..." );
649
663
hetAllelicCounts = new AllelicCountCollection (
650
664
metadata ,
@@ -672,11 +686,11 @@ private AllelicCountCollection genotypeHets(final SampleLocatableMetadata metada
672
686
}
673
687
674
688
//filter on total count in matched normal
675
- logger .info (String .format ("Filtering allelic counts in matched normal with total count less than %d..." , minTotalAlleleCount ));
689
+ logger .info (String .format ("Filtering allelic counts in matched normal with total count less than %d..." , minTotalAlleleCountNormal ));
676
690
AllelicCountCollection filteredNormalAllelicCounts = new AllelicCountCollection (
677
691
normalMetadata ,
678
692
normalAllelicCounts .getRecords ().stream ()
679
- .filter (ac -> ac .getTotalReadCount () >= minTotalAlleleCount )
693
+ .filter (ac -> ac .getTotalReadCount () >= minTotalAlleleCountNormal )
680
694
.collect (Collectors .toList ()));
681
695
logger .info (String .format ("Retained %d / %d sites in matched normal after filtering on total count..." ,
682
696
filteredNormalAllelicCounts .size (), normalAllelicCounts .size ()));
0 commit comments