Skip to content

Commit

Permalink
fix: check whether gCNV is enabled correctly (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Jan 18, 2023
1 parent 3bec36b commit e5ec1b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion snappy_pipeline/workflows/common/gcnv/gcnv_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ def get_result_files(self):
The function will skip pedigrees where samples have inconsistent library kits and print a warning.
"""
if "gcnv" not in self.config["tools"] and "gcnv" not in self.config["tools"].get("dna", {}):
if "gcnv" not in self.config["tools"] and not (
hasattr(self.config["tools"], "get") and "gcnv" in self.config["tools"].get("dna", {})
):
return

# Get list with all result path template strings.
Expand Down
3 changes: 2 additions & 1 deletion snappy_pipeline/workflows/common/sv_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def get_result_files(self):
returned by ``self.get_output_files()`` for all actions in ``self.actions``.
"""
if self.name not in self.config["tools"] and not (
hasattr(self.config, "tools") and self.name in self.config["tools"].get("dna", {})
hasattr(self.config["tools"], "get")
and self.name in self.config["tools"].get("dna", {})
):
return # tool not enabled, no result files

Expand Down

0 comments on commit e5ec1b3

Please sign in to comment.