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

adding testing detection function fix #96

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ YYYY-MM-DD John Doe
```
---

2024-07-08 Brandon Wilk

* Makes minor bug fix for issue #95 found in the test run detection logging function

2023-10-09 Manavalan Gajapathy

- Makes minor documentation updates - updating citation info, adding JOSS badge and updating zenodo badge to use generic
Expand Down
17 changes: 12 additions & 5 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,23 @@ def is_testing_mode():
"checks if testing dataset is used as input for the pipeline"

query = ".test"
isTesting = False
for sample in SAMPLES_CONFIG.values():
for fpath in sample.values():
if query in PurePath(fpath).parts:
logger.info(f"// WARNING: '{query}' present in at least one of the filepaths supplied via --sample_config. So testing mode is used.")
return True
for fvalue in sample.values():
if isinstance(fvalue, str) and query in PurePath(fvalue).parts:
isTesting = True
else:
for fpath in fvalue:
if query in PurePath(fpath).parts:
isTesting = True

if isTesting:
logger.info(f"// WARNING: '{query}' present in at least one of the filepaths supplied via --sample_config. So testing mode is used.")
return True

return None



def get_priorQC_filepaths(sample, samples_dict):
"""
Returns filepaths relevant to priorQC
Expand Down
Loading