Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a list of sequence exclusion files, instead of just one #977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions workflow/snakemake_rules/main_workflow.smk
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,16 @@ rule diagnostic:

def _collect_exclusion_files(wildcards):
# This rule creates a per-input exclude file for `rule filter`. This file contains one or both of the following:
# (1) a config-defined exclude file
# (1) a config-defined exclude file or list of such files
# (2) a dynamically created file (`rule diagnostic`) which scans the alignment for potential errors
# The second file is optional - it may be opted out via config → skip_diagnostics
exclude = config["files"]["exclude"]
if type(exclude) is not list:
exclude = [ exclude ]
if config["filter"].get("skip_diagnostics", False):
return [ config["files"]["exclude"] ]
return [ config["files"]["exclude"], f"results/{wildcards.build_name}/excluded_by_diagnostics.txt" ]
return exclude
else:
return exclude + [f"results/{wildcards.build_name}/excluded_by_diagnostics.txt"]

rule mask:
message:
Expand Down