Skip to content

Commit

Permalink
test(filter_evens.py,cpg_flow_test/stages.py): print inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
violetbrina committed Dec 13, 2024
1 parent 454b2a3 commit 9347dd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cpg_flow_test/jobs/filter_evens.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from typing import Any

from cpg_flow.stage import Stage, StageInput
from cpg_flow.targets.sequencing_group import SequencingGroup
from hailtop.batch import Batch
from hailtop.batch.job import Job


def filter_evens(
b: Batch,
inputs: StageInput,
previous_stage: Stage,
sequencing_groups: list[SequencingGroup],
input_files: dict[str, dict[str, Any]],
sg_outputs: dict[str, dict[str, Any]],
Expand All @@ -20,6 +23,7 @@ def filter_evens(
for sg in sequencing_groups: # type: ignore
job = b.new_job(name=title + ': ' + sg.id)
input_file_path = input_files[sg.id]['cumulative']
input_file_path = inputs.as_path(sg, previous_stage, 'cumulative')
no_evens_input_file = b.read_input(input_file_path)
no_evens_output_file_path = str(sg_outputs[sg.id])
sg_output_files.append(no_evens_output_file_path)
Expand Down
7 changes: 6 additions & 1 deletion cpg_flow_test/stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,14 @@ def queue_jobs(self, cohort: Cohort, inputs: StageInput) -> StageOutput | None:
input_files = inputs.as_dict_by_target(CumulativeCalc)
b = get_batch()

print('-----INPUTS-----')
print(inputs)

sg_outputs = self.expected_outputs(cohort)
no_evens_output_path = str(sg_outputs['no_evens'])
job_no_evens = filter_evens(b, cohort.get_sequencing_groups(), input_files, sg_outputs, no_evens_output_path)
job_no_evens = filter_evens(
b, inputs, CumulativeCalc, cohort.get_sequencing_groups(), input_files, sg_outputs, no_evens_output_path,
)

jobs = [job_no_evens]

Expand Down

0 comments on commit 9347dd2

Please sign in to comment.