About read filters

escaonescaon Limoges, FranceMember

I did read the latest worksheet/tutorial for somatic variant calling with Mutect2.

In this tutorial, Mutect2 version is "GATK 4.0.2.0" and the following option is used :
--disable-read-filter MateOnSameContigOrNoMappedMateReadFilter
The explanation is : "we disabled the read filter called
MateOnSameContigOrNoMappedMateReadFilter, which keeps only reads whose mate maps to
the same contig or is unmapped
"
My understanding is that the "MateOnSameContigOrNoMappedMateReadFilter" is by default turned on for Mutect2 (i.e., --read-filter MateOnSameContigOrNoMappedMateReadFilter).

For our analysis (using amplicon data), we want to make sure that duplicate filter is disabled within Mutect2 (otherwise we lose 95% of our data).
However, with my local installation :
java -jar gatk-package-4.0.5.1-local.jar Mutect2 -h
--read-filter,-RF:String Read filters to be applied before analysis This argument may be specified 0 or more
times. Default value: null.
--disable-read-filter,-DF:String
Read filters to be disabled before analysis This argument may be specified 0 or more
times. Default value: null.
It seems that no read-filter is turned on by default with version 4.0.5.1, is that correct ? Should I still use --disable-read-filter within Mutect2 to make sure we keep duplicates for our analysis ?

Best regards

Best Answer

Answers

  • escaonescaon Limoges, FranceMember

    After downloading version 4.0.2.0, I checked the --read-filter status for Mutect2 :
    java -jar gatk-package-4.0.5.1-local.jar Mutect2 -h
    --read-filter,-RF:String Read filters to be applied before analysis This argument may be specified 0 or more
    times. Default value: null
    --disable-read-filter,-DF:String
    Read filters to be disabled before analysis This argument may be specified 0 or more
    times. Default value: null.

    I still don't get why it was needed to use "--disable-read-filter MateOnSameContigOrNoMappedMateReadFilter" in the tutorial, given that default value for --read-filter is "null".

  • escaonescaon Limoges, FranceMember

    @Sheila, thanks for you answer.
    We empirically found this behavior with Mutect2 (4.0.5.1) tests, toying with option --disable-read-filter.

    Run without --disable-read-filter (verbose output) :
    3094010 read(s) filtered by: ((((((((((MappingQualityReadFilter AND MappingQualityAvailableReadFilter) AND MappingQualityNotZeroReadFilter) AND MappedReadFilter) AND NotSecondaryAlignmentReadFilter) AND NotDuplicateReadFilter) AND PassesVendorQualityCheckReadFilter) AND NonZeroReferenceLengthAlignmentReadFilter) AND ReadLengthReadFilter) AND GoodCigarReadFilter) AND WellformedReadFilter)
    17843 read(s) filtered by: MappingQualityReadFilter
    30724 read(s) filtered by: NotSecondaryAlignmentReadFilter
    3045443 read(s) filtered by: NotDuplicateReadFilter
    3045443+30724+17843 => 3094010

    Run with --disable-read-filter NotDuplicateReadFilter :
    48567 read(s) filtered by: (((((((((MappingQualityReadFilter AND MappingQualityAvailableReadFilter) AND MappingQualityNotZeroReadFilter) AND MappedReadFilter) AND NotSecondaryAlignmentReadFilter) AND PassesVendorQualityCheckReadFilter) AND NonZeroReferenceLengthAlignmentReadFilter) AND ReadLengthReadFilter) AND GoodCigarReadFilter) AND WellformedReadFilter)
    17843 read(s) filtered by: MappingQualityReadFilter
    30724 read(s) filtered by: NotSecondaryAlignmentReadFilter
    30724+17843 => 48567

    Looking forward to see it noticed within the tool documentation (If I understand this correctly, Mutect2 has by default : "--read-filter MappingQualityReadFilter MappingQualityAvailableReadFilter MappingQualityNotZeroReadFilter MappedReadFilter NotSecondaryAlignmentReadFilter PassesVendorQualityCheckReadFilter NonZeroReferenceLengthAlignmentReadFilter ReadLengthReadFilter GoodCigarReadFilter WellformedReadFilter NotDuplicateReadFilter").
    Best regards

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @escaon
    Hi,

    Looking forward to see it noticed within the tool documentation (If I understand this correctly, Mutect2 has by default : "--read-filter MappingQualityReadFilter MappingQualityAvailableReadFilter MappingQualityNotZeroReadFilter MappedReadFilter NotSecondaryAlignmentReadFilter PassesVendorQualityCheckReadFilter NonZeroReferenceLengthAlignmentReadFilter ReadLengthReadFilter GoodCigarReadFilter WellformedReadFilter NotDuplicateReadFilter").

    Yes, those are the default filters the tool applies :smile:

    -Sheila

  • dario_romagnolidario_romagnoli Member
    edited December 2018

    So if I understood correctly, with the latest versions of GATK (say >4.0.11) there's no need to use --disable-read-filter MateOnSameContigOrNoMappedMateReadFilter anymore because it's disabled by default. Right?

  • AdelaideRAdelaideR Unconfirmed, Member, Broadie, Moderator admin

    There is more information here about running Mutect2 that might be of help.

    So now the option is to disable the default which disables the read filter. There is a warning that this may cause problems:

    --disable-tool-default-read-filters / -disable-tool-default-read-filters Disable all tool default read filters (WARNING: many tools will not function correctly without their default read filters on)

Sign In or Register to comment.