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

fix: fix excluding events from the report #332

Merged
merged 4 commits into from
Oct 23, 2024
Merged
Changes from 1 commit
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
15 changes: 1 addition & 14 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,7 @@ def get_final_output(wildcards):
expand(
"results/datavzrd-report/{batch}.{event}.{calling_type}.fdr-controlled",
batch=get_report_batches(calling_type),
event=get_calling_events(calling_type),
calling_type=calling_type,
)
)
else:
final_output.extend(
expand(
"results/final-calls/{group}.{event}.{calling_type}.fdr-controlled.bcf",
group=(
variants_groups
if calling_type == "variants"
else fusions_groups
),
event=get_calling_events(calling_type),
event=event,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Potential Issue with Event Parameter Usage in 'expand' Function

In the get_final_output function, the event parameter in the expand call has been changed to use the variable event directly. Ensure that event is correctly defined in this context and that it provides the expected values. Previously, a function call like get_calling_events(calling_type) might have provided a list of events, whereas event here may be a single value from the loop. This could affect the expanded outputs if not handled properly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove the use of this utility function here, maybe we can instead use it above, to replace this:

for event in config["calling"]["fdr-control"]["events"]:

with the function call like this:

for event in get_calling_events(calling_type):

This ensures, that the calling_type variable from the respective for-loop is also respected, fixing a potential bug.

calling_type=calling_type,
)
)
Expand Down
Loading