Skip to content

Commit

Permalink
fix: write out pedigrees was missing for sv_calling_wgs (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Feb 22, 2023
1 parent 6d95d88 commit 573c72f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
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

0 comments on commit 573c72f

Please sign in to comment.