Skip to content

Commit

Permalink
Merge pull request #96 from uab-cgds-worthey/testing-detect-fix
Browse files Browse the repository at this point in the history
adding testing detection function fix
  • Loading branch information
wilkb777 authored Jul 9, 2024
2 parents 2a01bad + d685e0e commit e4a8cdd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
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

0 comments on commit e4a8cdd

Please sign in to comment.