From c109570f1afa182a327031ed4d4fc574b0ad3c82 Mon Sep 17 00:00:00 2001 From: jonca79 Date: Tue, 11 Jun 2024 15:04:10 +0200 Subject: [PATCH 1/4] feat: add cytobands to cnv report --- config/config.data.hg19.yaml | 1 + config/config.data.hg38.yaml | 1 + config/config.yaml | 4 +++- config/references/design_files.hg19.yaml | 7 +++++++ config/references/design_files.hg38.yaml | 7 +++++++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/config/config.data.hg19.yaml b/config/config.data.hg19.yaml index bb154743..7a08e41d 100644 --- a/config/config.data.hg19.yaml +++ b/config/config.data.hg19.yaml @@ -125,6 +125,7 @@ merge_cnv_json: annotations: - "{{PROJECT_DESIGN_DATA}}/GMS560/cnv/cnv_amp_genes_240307.bed" - "{{PROJECT_DESIGN_DATA}}/GMS560/cnv/cnv_loh_genes.bed" + cytobands: "{{PROJECT_DESIGN_DATA}}/GMS560/cnv/cytoBand.hg19.txt" mosdepth: extra: "--no-per-base --fast-mode" diff --git a/config/config.data.hg38.yaml b/config/config.data.hg38.yaml index 3d3546ea..21edc65d 100644 --- a/config/config.data.hg38.yaml +++ b/config/config.data.hg38.yaml @@ -125,6 +125,7 @@ merge_cnv_json: annotations: - "{{PROJECT_DESIGN_DATA}}/GMS560/cnv/cnv_amp_genes_hg38.bed" - "{{PROJECT_DESIGN_DATA}}/GMS560/cnv/cnv_loh_genes_hg38.bed" + cytobands: "{{PROJECT_DESIGN_DATA}}/GMS560/cnv/cytoBand.hg38.txt" mosdepth: extra: "--no-per-base --fast-mode" diff --git a/config/config.yaml b/config/config.yaml index b6602b4e..e5910a57 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -206,10 +206,12 @@ merge_cnv_json: filtered_cnv_vcfs: - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_amp_genes.filter.cnv_hard_filter_amp.vcf.gz - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_loh_genes_all.filter.cnv_hard_filter_loh.vcf.gz + germline_vcf: snv_indels/bcbio_variation_recall_ensemble/{sample}_{type}.ensembled.vep_annotated.filter.germline.exclude.blacklist.vcf.gz unfiltered_cnv_vcfs: - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_amp_genes.vcf.gz - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_loh_genes_all.vcf.gz - germline_vcf: snv_indels/bcbio_variation_recall_ensemble/{sample}_{type}.ensembled.vep_annotated.filter.germline.exclude.blacklist.vcf.gz + + mosdepth: container: "docker://hydragenetics/mosdepth:0.3.2" diff --git a/config/references/design_files.hg19.yaml b/config/references/design_files.hg19.yaml index dbf6f698..c000b17d 100644 --- a/config/references/design_files.hg19.yaml +++ b/config/references/design_files.hg19.yaml @@ -152,6 +152,13 @@ type: file url: https://github.com/genomic-medicine-sweden/Twist_Solid_pipeline_files/raw/v0.1.1/design/pool1_pool2.sort.merged.padded20.cnv200.hg19.split_fusion_genes.210608.bed.gz.tbi + merge_cnv_json: + cytobands: + checksum: 64de0499795484f1b70410a4cdd3d06f + path: GMS560/cnv/cytoBand.hg19.txt + type: file + url: https://github.com/genomic-medicine-sweden/Twist_Solid_pipeline_files/raw/v0.9.0/cnv/cytoBand.hg19.txt + purecn: intervals: checksum: 0857e05962696cd3c2e5a4ea94d0fb2c diff --git a/config/references/design_files.hg38.yaml b/config/references/design_files.hg38.yaml index dc2bc0e1..b34c5f95 100644 --- a/config/references/design_files.hg38.yaml +++ b/config/references/design_files.hg38.yaml @@ -145,6 +145,13 @@ type: file url: https://github.com/genomic-medicine-sweden/Twist_Solid_pipeline_files/raw/v0.5.0/design/pool1_pool2.sort.merged.padded20.cnv200.hg38.split_fusion_genes.reannotated.230222.bed.gz.tbi + merge_cnv_json: + cytobands: + checksum: 1b87bbfe572064c2a40d79683ea7a6ad + path: GMS560/cnv/cytoBand.hg38.txt + type: file + url: https://github.com/genomic-medicine-sweden/Twist_Solid_pipeline_files/raw/v0.9.0/cnv/cytoBand.hg38.txt + purecn: intervals: checksum: 868c8991360482315f820ae822108965 From 94678e60f7ba217dbca8af61f3467ad9f3815203 Mon Sep 17 00:00:00 2001 From: jonca79 <54137490+jonca79@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:16:15 +0200 Subject: [PATCH 2/4] fix: corrected cytoband config parameter --- config/config.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index e5910a57..de694164 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -73,7 +73,7 @@ cnvkit_scatter: cnv_html_report: show_table: true - show_cytobands: true + cytobands: true extra_tables: - name: Small CNVs and 1p19q description: > @@ -210,8 +210,6 @@ merge_cnv_json: unfiltered_cnv_vcfs: - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_amp_genes.vcf.gz - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_loh_genes_all.vcf.gz - - mosdepth: container: "docker://hydragenetics/mosdepth:0.3.2" From 8abad6a0db60034e5169139e478cab78485ffe04 Mon Sep 17 00:00:00 2001 From: jonca79 <54137490+jonca79@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:21:25 +0200 Subject: [PATCH 3/4] fix: update cnv_html_report rule --- workflow/Snakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index 188982f2..e6b6e718 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -639,11 +639,11 @@ use rule cnv_html_report from reports as reports_cnv_html_report with: tc_file=get_tc_file, extra_table_files=[t["path"] for t in config.get("cnv_html_report", {}).get("extra_tables", [])], params: + extra_tables=config.get("cnv_html_report", {}).get("extra_tables", []), include_table=config.get("cnv_html_report", {}).get("show_table", True), - include_cytobands=config.get("cnv_html_report", {}).get("show_cytobands", True), + include_cytobands=config.get("cnv_html_report", {}).get("cytobands", True), tc=get_tc, tc_method=lambda wildcards: wildcards.tc_method, - extra_tables=config.get("cnv_html_report", {}).get("extra_tables", []), module misc: From ff915c61a0189dab3bd9deb4261a4d741e618ede Mon Sep 17 00:00:00 2001 From: jonca79 Date: Wed, 12 Jun 2024 14:30:20 +0200 Subject: [PATCH 4/4] test: add cytoband test file and add to config --- .tests/integration/DATA/centromeres.bed | 2 ++ .tests/integration/config/config.yaml | 1 + 2 files changed, 3 insertions(+) create mode 100644 .tests/integration/DATA/centromeres.bed diff --git a/.tests/integration/DATA/centromeres.bed b/.tests/integration/DATA/centromeres.bed new file mode 100644 index 00000000..1a2b86fd --- /dev/null +++ b/.tests/integration/DATA/centromeres.bed @@ -0,0 +1,2 @@ +chrA 2500 2600 centromere +chrB 3450 3550 centromere diff --git a/.tests/integration/config/config.yaml b/.tests/integration/config/config.yaml index 0652ece1..fc4eba41 100644 --- a/.tests/integration/config/config.yaml +++ b/.tests/integration/config/config.yaml @@ -150,6 +150,7 @@ merge_cnv_json: - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_amp_genes.vcf.gz - cnv_sv/svdb_query/{sample}_{type}.{tc_method}.svdb_query.annotate_cnv.cnv_loh_genes_all.vcf.gz germline_vcf: snv_indels/bcbio_variation_recall_ensemble/{sample}_{type}.ensembled.vep_annotated.filter.germline.exclude.blacklist.vcf.gz + cytobands: "DATA/centromeres.bed" purecn: normaldb: "reference/purecn_dummy_normaldb.rds"