Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/gatk_callers
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwini06 authored Apr 28, 2022
2 parents c0fcdd6 + 23773a5 commit a6d98ef
Show file tree
Hide file tree
Showing 44 changed files with 221 additions and 99 deletions.
6 changes: 5 additions & 1 deletion BALSAMIC/config/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@
"mutation": "somatic",
"type": "SNV"
},
"delly":{
"dellysv":{
"mutation": "somatic",
"type": "SV"
},
"dellycnv":{
"mutation": "somatic",
"type": "CNV"
},
"ascat": {
"mutation": "somatic",
"type": "SV"
Expand Down
48 changes: 48 additions & 0 deletions BALSAMIC/constants/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,30 @@
"output_file": "delly_exclusion.tsv",
"output_path": "genome",
},
"delly_mappability": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/86aab2d10c5ffc009bc8c68ad077ab7283d8fe06/cancer/references/GRCh38.delly.blacklist.gz",
"file_type": "text",
"gzip": False,
"genome_version": "hg38",
"output_file": "delly_mappability.gz",
"output_path": "genome",
},
"delly_mappability_gindex": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/86aab2d10c5ffc009bc8c68ad077ab7283d8fe06/cancer/references/GRCh38.delly.blacklist.gz.gzi",
"file_type": "text",
"gzip": False,
"genome_version": "hg38",
"output_file": "delly_mappability.gz.gzi",
"output_path": "genome",
},
"delly_mappability_findex": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/86aab2d10c5ffc009bc8c68ad077ab7283d8fe06/cancer/references/GRCh38.delly.blacklist.gz.fai",
"file_type": "text",
"gzip": False,
"genome_version": "hg38",
"output_file": "delly_mappability.gz.fai",
"output_path": "genome",
},
"ascat_gccorrection": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/35465e2644f76f2d59427a9b379d34ecea71f259/cancer/references/hg38_SnpGcCorrections.tsv.gz",
"file_type": "text",
Expand Down Expand Up @@ -287,6 +311,30 @@
"output_file": "delly_exclusion.tsv",
"output_path": "genome",
},
"delly_mappability": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/86aab2d10c5ffc009bc8c68ad077ab7283d8fe06/cancer/references/GRCh37.delly.blacklist.gz",
"file_type": "text",
"gzip": False,
"genome_version": "hg19",
"output_file": "delly_mappability.gz",
"output_path": "genome",
},
"delly_mappability_gindex": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/86aab2d10c5ffc009bc8c68ad077ab7283d8fe06/cancer/references/GRCh37.delly.blacklist.gz.gzi",
"file_type": "text",
"gzip": False,
"genome_version": "hg19",
"output_file": "delly_mappability.gz.gzi",
"output_path": "genome",
},
"delly_mappability_findex": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/86aab2d10c5ffc009bc8c68ad077ab7283d8fe06/cancer/references/GRCh37.delly.blacklist.gz.fai",
"file_type": "text",
"gzip": False,
"genome_version": "hg19",
"output_file": "delly_mappability.gz.fai",
"output_path": "genome",
},
"ascat_gccorrection": {
"url": "https://raw.githubusercontent.com/Clinical-Genomics/reference-files/12a6c760fd542c02de2cda286b6245e46f4b6a97/cancer/references/GRCh37_SnpGcCorrections.tsv.gz",
"file_type": "text",
Expand Down
16 changes: 15 additions & 1 deletion BALSAMIC/constants/workflow_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,27 @@
"sequencing_type": ["targeted", "wgs"],
"workflow_solution": ["BALSAMIC"],
},
"delly": {
"haplotypecaller": {
"mutation": "germline",
"type": "SNV",
"analysis_type": ["paired", "single"],
"sequencing_type": ["targeted"],
"workflow_solution": ["BALSAMIC"],
},
"dellysv": {
"mutation": "somatic",
"type": "SV",
"analysis_type": ["paired", "single"],
"sequencing_type": ["targeted", "wgs"],
"workflow_solution": ["BALSAMIC"],
},
"dellycnv": {
"mutation": "somatic",
"type": "CNV",
"analysis_type": ["single"],
"sequencing_type": ["targeted", "wgs"],
"workflow_solution": ["BALSAMIC"],
},
"ascat": {
"mutation": "somatic",
"type": "CNV",
Expand Down
4 changes: 2 additions & 2 deletions BALSAMIC/snakemake_rules/annotation/rankscore.rule
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ rule genmod_score_vardict:
threads:
get_threads(cluster_config, 'genmod_score_vardict')
message:
("Score annotated vardict variants using genmod"
"and compress vcf using bcftools on {params.case_name}")
("Scoring annotated vardict variants using genmod for {params.case_name}")
shell:
"""
genmod score -r -c {input.rankscore} {input.vcf} | \
bcftools view -o {output.vcf_pass} -O z;
tabix -p vcf -f {output.vcf_pass};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rule bcftools_filter_vardict_tumor_normal:
threads:
get_threads(cluster_config, 'bcftools_filter_vardict_tumor_normal')
message:
"Filtering vardict tumor-normal annotated variants using bcftools on {params.case_name}"
"Filtering vardict tumor-normal annotated variants using bcftools for {params.case_name}"
shell:
"""
bcftools view {input.vcf} \
Expand Down Expand Up @@ -68,7 +68,7 @@ rule bcftools_filter_tnhaplotyper_tumor_normal:
threads:
get_threads(cluster_config, 'bcftools_filter_tnhaplotyper_tumor_normal')
message:
"Filtering tnhaplotyper tumor-normal annotated variants using bcftools on {params.case_name}"
"Filtering tnhaplotyper tumor-normal annotated variants using bcftools for {params.case_name}"
shell:
"""
bcftools view {input.vcf} \
Expand Down Expand Up @@ -102,7 +102,7 @@ rule bcftools_filter_TNscope_umi_tumor_normal:
threads:
get_threads(cluster_config, 'bcftools_filter_TNscope_umi_tumor_normal')
message:
"Filtering TNscope_umi tumor-normal annotated variants using bcftools on {params.case_name}"
"Filtering TNscope_umi tumor-normal annotated variants using bcftools for {params.case_name}"
shell:
"""
bcftools view {input.vcf} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rule bcftools_filter_tnhaplotyper_tumor_only:
threads:
get_threads(cluster_config, 'bcftools_filter_tnhaplotyper_tumor_only')
message:
"Filtering tnhaplotyper tumor-only annotated variants using bcftools on {params.case_name}"
"Filtering tnhaplotyper tumor-only annotated variants using bcftools for {params.case_name}"
shell:
"""
bcftools view {input.vcf} \
Expand Down Expand Up @@ -100,7 +100,7 @@ rule bcftools_filter_TNscope_umi_tumor_only:
threads:
get_threads(cluster_config, 'bcftools_filter_TNscope_umi_tumor_only')
message:
"Filtering TNscope_umi tumor-only annotated variants using bcftools on {params.case_name}"
"Filtering TNscope_umi tumor-only annotated variants using bcftools for {params.case_name}"
shell:
"""
bcftools view {input.vcf} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rule bcftools_filter_svdb:
threads:
get_threads(cluster_config, "bcftools_filter_svdb")
message:
"Filtering svdb merged Manta and Delly results for PASS variants using bcftools for sample '{params.case_name}' "
"Filtering merged structural and copy number variants using bcftools for {params.case_name}"
shell:
"""
bcftools view --threads {threads} -f .,PASS -o {output.vcf_pass_svdb} -O z {input.vcf};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rule bcftools_filter_tnscope_tumor_normal:
threads:
get_threads(cluster_config, 'bcftools_filter_tnscope_tumor_normal')
message:
"Filtering wgs tumor-normal tnscope annotated variants using bcftools on {params.case_name}"
"Filtering WGS tumor-normal tnscope annotated variants using bcftools for {params.case_name}"
shell:
"""
bcftools view {input.vcf} \
Expand Down Expand Up @@ -65,7 +65,7 @@ rule bcftools_filter_tnhaplotyper_tumor_normal:
threads:
get_threads(cluster_config, 'bcftools_filter_tnhaplotyper_tumor_normal')
message:
"Filtering wgs tumor-normal tnhaplotyper annotated variants using bcftools on {params.case_name}"
"Filtering WGS tumor-normal tnhaplotyper annotated variants using bcftools for {params.case_name}"
shell:
"""
grep -v '^@' {input.wgs_calling_file} > {input.wgs_calling_file}.bed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rule bcftools_filter_tnscope_tumor_only:
threads:
get_threads(cluster_config, 'bcftools_filter_tnscope_tumor_only')
message:
"Filtering wgs tumor-only tnscope annotated variants using bcftools on {params.case_name}"
"Filtering WGS tumor-only tnscope annotated variants using bcftools for {params.case_name}"
shell:
"""
grep -v '^@' {input.wgs_calling_file} > {input.wgs_calling_file}.bed
Expand Down Expand Up @@ -72,7 +72,7 @@ rule bcftools_filter_tnhaplotyper_tumor_only:
threads:
get_threads(cluster_config, 'bcftools_filter_tnhaplotyper_tumor_only')
message:
"Filtering wgs tumor-only tnhaplotyper annotated variants using bcftools on {params.case_name}"
"Filtering WGS tumor-only tnhaplotyper annotated variants using bcftools for {params.case_name}"
shell:
"""
grep -v '^@' {input.wgs_calling_file} > {input.wgs_calling_file}.bed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rule vcf2cytosure_convert:
params:
case_name = config["analysis"]["case_id"],
housekeeper_id = {"id": config["analysis"]["case_id"], "tags": "cnv-somatic"},
message: "Convert VCF file with CNVs to the .CGH format using vcf2cytosure for sample {params.case_name}"
message: "Converting CNVs from VCF to the CGH format using vcf2cytosure for {params.case_name}"
shell:
"""
vcf2cytosure --vcf {input.cnv_vcf} --cn {input.cnv_cnr} --out {output.cgh_file} --bins 1
Expand Down
8 changes: 4 additions & 4 deletions BALSAMIC/snakemake_rules/annotation/vep.rule
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rule vep_somatic_snv:
threads:
get_threads(cluster_config, "vep_somatic_snv")
message:
"Running vep annotation on {params.message_text}"
"Running vep annotation for single nuceotide variants on {params.message_text}"
shell:
"""
vep_path=$(dirname $(readlink -f $(which vep)));
Expand Down Expand Up @@ -69,7 +69,7 @@ rule vep_somatic_sv:
threads:
get_threads(cluster_config, "vep_somatic_sv")
message:
"Running vep annotation on {params.message_text}"
"Running vep annotation for structural and copy number variants on {params.message_text}"
shell:
"""
vep_path=$(dirname $(readlink -f $(which vep)));
Expand Down Expand Up @@ -106,7 +106,7 @@ rule tmb_calculation:
threads:
get_threads(cluster_config, "vep")
message:
"Calculating TMB for {params.message_text}"
"Calculating TMB score for {params.message_text}"
shell:
"""
mkdir -p {params.tmpdir};
Expand Down Expand Up @@ -163,7 +163,7 @@ rule vep_germline:
threads:
get_threads(cluster_config, 'vep_germline')
message:
"Running vep annotation on {params.sample}"
"Running vep annotation on germline variants for {params.sample}"
shell:
"""
vep_path=$(dirname $(readlink -f $(which vep)));
Expand Down
2 changes: 1 addition & 1 deletion BALSAMIC/snakemake_rules/umi/generate_AF_tables.rule
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rule bcftools_query_generatebackgroundaf_umitable:
threads:
get_threads(cluster_config, "bcftools_query_generatebackgroundaf_umitable")
message:
"Creating Allelic frequency table from VCF file for sample {params.case_name}"
"Creating Allelic frequency table from VCF file for {params.case_name}"
shell:
"""
bcftools query \
Expand Down
6 changes: 4 additions & 2 deletions BALSAMIC/snakemake_rules/umi/mergetype_normal_umi.rule
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ rule mergeBam_normal_umiconsensus:
threads:
get_threads(cluster_config, "mergeBam_normal_umiconsensus")
message:
("Replace ReadGroups using picard for normal sample {params.sample} "
"and convert bam to cram format")
("Replacing ReadGroups using picard and converting from bam to cram format for {params.sample}")
shell:
"""
picard AddOrReplaceReadGroups {params.picard} INPUT={input.bam} OUTPUT={output.bam};
samtools index {output.bam};
samtools view -h -T {input.fasta} --threads {threads} -C -o {output.cram} {output.bam};
samtools index {output.cram};
"""
3 changes: 1 addition & 2 deletions BALSAMIC/snakemake_rules/umi/mergetype_tumor_umi.rule
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ rule mergeBam_tumor_umiconsensus:
threads:
get_threads(cluster_config, "mergeBam_tumor_umiconsensus")
message:
("Replace ReadGroups using picard for tumor sample {params.sample} "
"and convert bam to cram")
("Replacing ReadGroups using picard and converting from bam to cram for {params.sample}")
shell:
"""
picard AddOrReplaceReadGroups {params.picard} INPUT={input.bam} OUTPUT={output.bam};
Expand Down
4 changes: 2 additions & 2 deletions BALSAMIC/snakemake_rules/umi/qc_umi.rule
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rule picard_umiaware:
threads:
get_threads(cluster_config, "picard_umiaware")
message:
"Picard Umiaware mark dups for sample {params.sample_id}"
"Marking duplicates using Picardtools with UmiAware for {params.sample_id}"
shell:
"""
picard UmiAwareMarkDuplicatesWithMateCigar \
Expand Down Expand Up @@ -47,7 +47,7 @@ rule picard_collecthsmetrics_umi:
threads:
get_threads(cluster_config, "CollectHsMetrics")
message:
"Collect HSmetrics using Picardtools for {params.sample_id}"
"Collecting HSmetrics using Picardtools for {params.sample_id}"
shell:
"""
picard BedToIntervalList \
Expand Down
6 changes: 3 additions & 3 deletions BALSAMIC/snakemake_rules/umi/sentieon_consensuscall.rule
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rule sentieon_consensuscall_umi:
threads:
get_threads(cluster_config, "sentieon_consensuscall_umi")
message:
"Consensus molecule creation using sentieon for sample {params.sample_id}"
"Calling consensus molecules using sentieon for {params.sample_id}"
shell:
"""
export LD_PRELOAD={params.sentieon_install_dir}/lib/libjemalloc.so.1
Expand Down Expand Up @@ -63,7 +63,7 @@ rule sentieon_bwa_umiconsensus:
threads:
get_threads(cluster_config, "sentieon_bwa_umiconsensus")
message:
"Mapping of consensus reads with the sentieon bwa mem, sorting for sample {params.sample_id}"
"Mapping consensus reads and sorting using sentieon bwa-mem for {params.sample_id}"
shell:
"""
export LD_PRELOAD={params.sentieon_install_dir}/lib/libjemalloc.so.1
Expand Down Expand Up @@ -106,7 +106,7 @@ rule sentieon_consensusfilter_umi:
threads:
get_threads(cluster_config, "sentieon_consensusfilter_umi")
message:
"Filtering consensus reads based on XZ tag for sample {params.sample_id}"
"Filtering consensus reads based on XZ tag for {params.sample_id}"
shell:
"""
samtools view -h {input} | \
Expand Down
4 changes: 2 additions & 2 deletions BALSAMIC/snakemake_rules/umi/sentieon_umiextract.rule
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rule sentieon_umiextract:
threads:
get_threads(cluster_config, "sentieon_umiextract")
message:
"UMI tag extraction using sentieon for sample {params.sample_id}"
"Extracing UMI tags using sentieon for {params.sample_id}"
shell:
"""
export LD_PRELOAD={params.sentieon_install_dir}/lib/libjemalloc.so.1
Expand Down Expand Up @@ -59,7 +59,7 @@ rule sentieon_bwa_umiextract:
threads:
get_threads(cluster_config, "sentieon_bwa_umiextract")
message:
"Aligning of UMI extracted reads with sentieon bwa mem, sorting for sample {params.sample_id}"
"Aligning UMI extracted reads and sorting using sentieon bwa-mem for {params.sample_id}"
shell:
"""
export LD_PRELOAD={params.sentieon_install_dir}/lib/libjemalloc.so.1
Expand Down
2 changes: 1 addition & 1 deletion BALSAMIC/snakemake_rules/umi/sentieon_varcall_tnscope.rule
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rule sentieon_tnscope_umi:
threads:
get_threads(cluster_config, "sentieon_tnscope_umi")
message:
"Calling SNVs using TNscope for sample {params.tumor}"
"Calling single nucleotide variants using TNscope for {params.tumor}"
shell:
"""
mkdir -p {params.tmpdir};
Expand Down
6 changes: 3 additions & 3 deletions BALSAMIC/snakemake_rules/umi/sentieon_varcall_tnscope_tn.rule
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ rule sentieon_tnscope_umi_tn:
pcr_model = params.common.pcr_model,
padding = params.tnscope_umi.padding,
tumor = "TUMOR",
normal = "NORMAL"
normal = "NORMAL",
case_name= config["analysis"]["case_id"]
threads:
get_threads(cluster_config, "sentieon_tnscope_umi")
message:
"Calling SNVs using TNscope for sample: {params.tumor}"
" versus sample {params.normal}"
"Calling single nucleotide variants using TNscope for {params.case_name}"
shell:
"""
mkdir -p {params.tmpdir};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ rule cnvkit_paired:
sample_id = "TUMOR",
genome = GENOME_VERSION
message:
"Run CNVkit pipeline for sample {params.case_name} while tumor purity/ploidy calculated using PureCN"
"Calling CNVs using CNVkit and calculating tumor purity/ploidy using PureCN for {params.case_name}"
shell:
"""
mkdir -p {params.tmpdir};
Expand Down
3 changes: 1 addition & 2 deletions BALSAMIC/snakemake_rules/variant_calling/cnvkit_single.rule
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ rule cnvkit_single:
genome_version = GENOME_VERSION,
pon = " " if get_pon_cnn(config) is None else get_pon_cnn(config)
message:
("Run CNVkit pipeline for sample {params.case_name},"
"while tumor purity/ploidy calculated using PureCN")
("Calling CNVs using CNVkit and calculating tumor purity/ploidy using PureCN for {params.case_name}")
shell:
"""
mkdir -p {params.tmpdir};
Expand Down
Loading

0 comments on commit a6d98ef

Please sign in to comment.