Added ignore all filters options to VQSR walkers
This commit is contained in:
parent
31cea25c36
commit
48252897b4
|
|
@ -146,6 +146,8 @@ public class ApplyRecalibration extends RodWalker<Integer, Integer> implements T
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="ignore_filter", shortName="ignoreFilter", doc="If specified, the recalibration will be applied to variants marked as filtered by the specified filter name in the input VCF file", required=false)
|
@Argument(fullName="ignore_filter", shortName="ignoreFilter", doc="If specified, the recalibration will be applied to variants marked as filtered by the specified filter name in the input VCF file", required=false)
|
||||||
private String[] IGNORE_INPUT_FILTERS = null;
|
private String[] IGNORE_INPUT_FILTERS = null;
|
||||||
|
@Argument(fullName="ignore_all_filters", shortName="ignoreAllFilters", doc="If specified, the variant recalibrator will ignore all input filters. Useful to rerun the VQSR from a filtered output file.", required=false)
|
||||||
|
private boolean IGNORE_ALL_FILTERS = false;
|
||||||
@Argument(fullName="excludeFiltered", shortName="ef", doc="Don't output filtered loci after applying the recalibration", required=false)
|
@Argument(fullName="excludeFiltered", shortName="ef", doc="Don't output filtered loci after applying the recalibration", required=false)
|
||||||
protected boolean EXCLUDE_FILTERED = false;
|
protected boolean EXCLUDE_FILTERED = false;
|
||||||
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ: 1.) SNP for recalibrating only SNPs (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both SNPs and indels simultaneously.", required = false)
|
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ: 1.) SNP for recalibrating only SNPs (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both SNPs and indels simultaneously.", required = false)
|
||||||
|
|
@ -246,7 +248,7 @@ public class ApplyRecalibration extends RodWalker<Integer, Integer> implements T
|
||||||
|
|
||||||
for( final VariantContext vc : VCs ) {
|
for( final VariantContext vc : VCs ) {
|
||||||
|
|
||||||
if( VariantDataManager.checkVariationClass( vc, MODE ) && (vc.isNotFiltered() || ignoreInputFilterSet.containsAll(vc.getFilters())) ) {
|
if( VariantDataManager.checkVariationClass( vc, MODE ) && (IGNORE_ALL_FILTERS || vc.isNotFiltered() || ignoreInputFilterSet.containsAll(vc.getFilters())) ) {
|
||||||
|
|
||||||
final VariantContext recalDatum = getMatchingRecalVC(vc, recals);
|
final VariantContext recalDatum = getMatchingRecalVC(vc, recals);
|
||||||
if( recalDatum == null ) {
|
if( recalDatum == null ) {
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,8 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="ignore_filter", shortName="ignoreFilter", doc="If specified, the variant recalibrator will also use variants marked as filtered by the specified filter name in the input VCF file", required=false)
|
@Argument(fullName="ignore_filter", shortName="ignoreFilter", doc="If specified, the variant recalibrator will also use variants marked as filtered by the specified filter name in the input VCF file", required=false)
|
||||||
private String[] IGNORE_INPUT_FILTERS = null;
|
private String[] IGNORE_INPUT_FILTERS = null;
|
||||||
|
@Argument(fullName="ignore_all_filters", shortName="ignoreAllFilters", doc="If specified, the variant recalibrator will ignore all input filters. Useful to rerun the VQSR from a filtered output file.", required=false)
|
||||||
|
private boolean IGNORE_ALL_FILTERS = false;
|
||||||
@Output(fullName="rscript_file", shortName="rscriptFile", doc="The output rscript file generated by the VQSR to aid in visualization of the input data and learned model", required=false, defaultToStdout=false)
|
@Output(fullName="rscript_file", shortName="rscriptFile", doc="The output rscript file generated by the VQSR to aid in visualization of the input data and learned model", required=false, defaultToStdout=false)
|
||||||
private File RSCRIPT_FILE = null;
|
private File RSCRIPT_FILE = null;
|
||||||
|
|
||||||
|
|
@ -323,7 +325,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
||||||
final ExpandingArrayList<VariantDatum> variants = new ExpandingArrayList<>();
|
final ExpandingArrayList<VariantDatum> variants = new ExpandingArrayList<>();
|
||||||
|
|
||||||
for( final VariantContext vc : tracker.getValues(rods, context.getLocation()) ) {
|
for( final VariantContext vc : tracker.getValues(rods, context.getLocation()) ) {
|
||||||
if( vc != null && ( vc.isNotFiltered() || ignoreInputFilterSet.containsAll(vc.getFilters()) ) ) {
|
if( vc != null && ( IGNORE_ALL_FILTERS || vc.isNotFiltered() || ignoreInputFilterSet.containsAll(vc.getFilters()) ) ) {
|
||||||
if( VariantDataManager.checkVariationClass( vc, VRAC.MODE ) ) {
|
if( VariantDataManager.checkVariationClass( vc, VRAC.MODE ) ) {
|
||||||
final VariantDatum datum = new VariantDatum();
|
final VariantDatum datum = new VariantDatum();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue