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: write out pedigrees was missing for sv_calling_wgs #379

Merged
merged 3 commits into from
Feb 22, 2023
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
6 changes: 6 additions & 0 deletions snappy_pipeline/workflows/common/gcnv/gcnv_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ def _get_input_files_contig_ploidy(self, wildcards: Wildcards):
name_pattern = f"{wildcards.mapper}.gcnv_coverage.{lib}"
tsvs.append(f"work/{name_pattern}/out/{name_pattern}.{ext}")
yield ext, tsvs
# Yield path to pedigree file
peds = []
for library_name in sorted(self.index_ngs_library_to_pedigree):
name_pattern = f"write_pedigree.{library_name}"
peds.append(f"work/{name_pattern}/out/{library_name}.ped")
yield "ped", peds

@dictify
def _get_output_files_contig_ploidy(self):
Expand Down
5 changes: 5 additions & 0 deletions snappy_pipeline/workflows/sv_calling_wgs/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ wf = SvCallingWgsWorkflow(workflow, config, lookup_paths, config_paths, os.getcw
# Rules =======================================================================


localrules:
# Writing out pedigrees can be done locally
sv_calling_wgs_write_pedigree_run,


rule all:
input:
wf.get_result_files(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,13 @@ def test_gcnv_contig_ploidy_step_part_get_input_files(sv_calling_targeted_workfl
"work/bwa.gcnv_coverage.P00{i}-N1-DNA1-WGS1/out/bwa.gcnv_coverage.P00{i}-N1-DNA1-WGS1.tsv"
)
tsv_list_out = [tsv_pattern.format(i=i) for i in range(1, 7)] # P001 - P006
expected = {"tsv": tsv_list_out}
expected = {
"tsv": tsv_list_out,
"ped": [
"work/write_pedigree.P001-N1-DNA1-WGS1/out/P001-N1-DNA1-WGS1.ped",
"work/write_pedigree.P004-N1-DNA1-WGS1/out/P004-N1-DNA1-WGS1.ped",
],
}
# Get actual
wildcards = Wildcards(
fromdict={"mapper": "bwa", "library_kit": "Agilent_SureSelect_Human_All_Exon_V6"}
Expand Down