<commit_before>package org.broadinstitute.hellbender.cmdline.GATKPlugin;

import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.hellbender.cmdline.ReadFilterArgumentDefinitions;

import java.util.*;

/**
 * Default {@link GATKReadFilterArgumentCollection} applied in GATK for optional read filters in the command line.
 * It contains arguments that allow the user to:
 *
 * - Provide a list of read filters to apply.
 * - Disable some and/or all read filters.
 *
 * @author <NAME> (magicDGS)
 */
public class DefaultGATKReadFilterArgumentCollection extends GATKReadFilterArgumentCollection {
    private static final long serialVersionUID = 1L;

    @Argument(fullName = ReadFilterArgumentDefinitions.READ_FILTER_LONG_NAME,
            shortName = ReadFilterArgumentDefinitions.READ_FILTER_SHORT_NAME,
            doc="Read filters to be applied before analysis", optional=true, common = true)
    public final List<String> userEnabledReadFilterNames = new ArrayList<>(); // preserve order

    @Argument(fullName = ReadFilterArgumentDefinitions.DISABLE_READ_FILTER_LONG_NAME,
            shortName = ReadFilterArgumentDefinitions.DISABLE_READ_FILTER_SHORT_NAME,
            doc="Read filters to be disabled before analysis", optional=true, common = true)
    public final List<String> userDisabledReadFilterNames = new ArrayList<>();

    @Argument(fullName = ReadFilterArgumentDefinitions.DISABLE_TOOL_DEFAULT_READ_FILTERS,
            shortName = ReadFilterArgumentDefinitions.DISABLE_TOOL_DEFAULT_READ_FILTERS,
            doc = "Disable all tool default read filters", common = true, optional = true)
    public boolean disableToolDefaultReadFilters = false;

    /** Returns the list with the read filters provided by the user, preserving the order. */
    @Override
    public List<String> getUserEnabledReadFilterNames() {
        return userEnabledReadFilterNames;
    }

    /** Returns the set of filters disabled by the user. */
    @Override
    public List<String> getUserDisabledReadFilterNames() {
        return userDisabledReadFilterNames;
    }

    /** {@inheritDoc}. */
    @Override
    public boolean getDisableToolDefaultReadFilters() {
        return disableToolDefaultReadFilters;
    }
<commit_msg>Mark --disable-tool-default-read-filters as advanced, and add a warning to its documentation string (#4671)<commit_after>package org.broadinstitute.hellbender.cmdline.GATKPlugin;

import org.broadinstitute.barclay.argparser.Advanced;
import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.hellbender.cmdline.ReadFilterArgumentDefinitions;

import java.util.*;

/**
 * Default {@link GATKReadFilterArgumentCollection} applied in GATK for optional read filters in the command line.
 * It contains arguments that allow the user to:
 *
 * - Provide a list of read filters to apply.
 * - Disable some and/or all read filters.
 *
 * @author <NAME> (magicDGS)
 */
public class DefaultGATKReadFilterArgumentCollection extends GATKReadFilterArgumentCollection {
    private static final long serialVersionUID = 1L;

    @Argument(fullName = ReadFilterArgumentDefinitions.READ_FILTER_LONG_NAME,
            shortName = ReadFilterArgumentDefinitions.READ_FILTER_SHORT_NAME,
            doc="Read filters to be applied before analysis", optional=true, common = true)
    public final List<String> userEnabledReadFilterNames = new ArrayList<>(); // preserve order

    @Argument(fullName = ReadFilterArgumentDefinitions.DISABLE_READ_FILTER_LONG_NAME,
            shortName = ReadFilterArgumentDefinitions.DISABLE_READ_FILTER_SHORT_NAME,
            doc="Read filters to be disabled before analysis", optional=true, common = true)
    public final List<String> userDisabledReadFilterNames = new ArrayList<>();

    @Advanced
    @Argument(fullName = ReadFilterArgumentDefinitions.DISABLE_TOOL_DEFAULT_READ_FILTERS,
            shortName = ReadFilterArgumentDefinitions.DISABLE_TOOL_DEFAULT_READ_FILTERS,
            doc = "Disable all tool default read filters (WARNING: many tools will not function correctly without their default read filters on)", common = true, optional = true)
    public boolean disableToolDefaultReadFilters = false;

    /** Returns the list with the read filters provided by the user, preserving the order. */
    @Override
    public List<String> getUserEnabledReadFilterNames() {
        return userEnabledReadFilterNames;
    }

    /** Returns the set of filters disabled by the user. */
    @Override
    public List<String> getUserDisabledReadFilterNames() {
        return userDisabledReadFilterNames;
    }

    /** {@inheritDoc}. */
    @Override
    public boolean getDisableToolDefaultReadFilters() {
        return disableToolDefaultReadFilters;
    }

{'fraction_non_alphanumeric': 0.07302188552188552, 'fraction_numerical': 0.0012626262626262627, 'mean_word_length': 4.275249722530521, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6445865', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1188, 'n_words': 350}