Skip to content

Commit

Permalink
fix: umi coverage qc (#1490)
Browse files Browse the repository at this point in the history
#### Changed

- Renamed UMI bamfile in order for the sample id to be unique un multiqc_data.json and not overwritten by hsmetrics.
  • Loading branch information
mathiasbio authored Oct 17, 2024
1 parent 0743161 commit d3dc977
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions BALSAMIC/snakemake_rules/umi/qc_umi.rule
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

rule picard_umiaware:
input:
bam = umi_dir + "{sample_type}.{sample}.consensusfiltered_umi.bam"
bam = umi_dir + "{sample_type}.{sample}_consensusfiltered_umi.bam"
output:
bam = umi_qc_dir + "{sample_type}.{sample}.picard.umiaware.bam",
duplicates = umi_qc_dir + "{sample_type}.{sample}.umi.duplicatemetrics.txt",
Expand Down Expand Up @@ -36,7 +36,7 @@ UMI_METRICS={output.umimetrics};

rule picard_collecthsmetrics_umi:
input:
bam = umi_dir + "{sample_type}.{sample}.consensusfiltered_umi.bam",
bam = umi_dir + "{sample_type}.{sample}_consensusfiltered_umi.bam",
bed = config["panel"]["capture_kit"],
fa = config["reference"]["reference_genome"],
fadict = (config["reference"]["reference_genome"]).replace(".fasta",".dict"),
Expand Down Expand Up @@ -78,7 +78,7 @@ METRIC_ACCUMULATION_LEVEL=ALL_READS;

rule samtools_view_calculatemeanfamilydepth_umi:
input:
bam = umi_dir + "{sample_type}.{sample}.consensusfiltered_umi.bam"
bam = umi_dir + "{sample_type}.{sample}_consensusfiltered_umi.bam"
output:
temp_fl = temp (umi_qc_dir + "{sample_type}.{sample}.umi.temp.fl"),
totalsum = umi_qc_dir + "{sample_type}.{sample}.umi.mean_family_depth"
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 @@ -92,7 +92,7 @@ rule sentieon_consensusfilter_umi:
input:
umi_dir + "{sample_type}.{sample}.consensuscalled_umi.bam"
output:
umi_dir + "{sample_type}.{sample}.consensusfiltered_umi.bam"
umi_dir + "{sample_type}.{sample}_consensusfiltered_umi.bam"
benchmark:
Path(benchmark_dir, "sentieon_consensusfilter_umi_{sample_type}_{sample}.tsv").as_posix()
singularity:
Expand All @@ -119,7 +119,7 @@ samtools index {output};

rule bam_compress_tumor_umi:
input:
bam = umi_dir + "tumor.{sample}.consensusfiltered_umi.bam",
bam = umi_dir + "tumor.{sample}_consensusfiltered_umi.bam",
fasta = config_model.reference["reference_genome"]
output:
cram = umi_dir + "tumor.{sample}.consensusfiltered_umi.cram",
Expand All @@ -143,7 +143,7 @@ samtools index {output.cram};
if config['analysis']['analysis_type'] == "paired":
rule bam_compress_normal_umi:
input:
bam = umi_dir + "normal.{sample}.consensusfiltered_umi.bam",
bam = umi_dir + "normal.{sample}_consensusfiltered_umi.bam",
fasta = config_model.reference["reference_genome"]
output:
cram = umi_dir + "normal.{sample}.consensusfiltered_umi.cram"
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 @@ -7,7 +7,7 @@

rule sentieon_tnscope_umi:
input:
bam = expand(umi_dir + "tumor.{sample}.consensusfiltered_umi.bam", sample=tumor_sample),
bam = expand(umi_dir + "tumor.{sample}_consensusfiltered_umi.bam", sample=tumor_sample),
ref_fa = config["reference"]["reference_genome"],
bed = config["panel"]["capture_kit"],
dbsnp = config["reference"]["dbsnp"]
Expand Down
4 changes: 2 additions & 2 deletions BALSAMIC/snakemake_rules/umi/sentieon_varcall_tnscope_tn.rule
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

rule sentieon_tnscope_umi_tn:
input:
bamT = expand(umi_dir + "tumor.{sample}.consensusfiltered_umi.bam", sample=tumor_sample),
bamN = expand(umi_dir + "normal.{sample}.consensusfiltered_umi.bam", sample=normal_sample),
bamT = expand(umi_dir + "tumor.{sample}_consensusfiltered_umi.bam", sample=tumor_sample),
bamN = expand(umi_dir + "normal.{sample}_consensusfiltered_umi.bam", sample=normal_sample),
ref_fa = config["reference"]["reference_genome"],
bed = config["panel"]["capture_kit"],
dbsnp = config["reference"]["dbsnp"]
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Changed:
* Lowered maximal SOR for TNscope in TGA tumor only cases from 3 to 2.7 https://github.com/Clinical-Genomics/BALSAMIC/pull/1475
* Fixed TNscope research VCF filters to either PASS or triallelic site https://github.com/Clinical-Genomics/BALSAMIC/pull/1475
* Increased maximal amount of redirects for lychee test following links in docs to 10 https://github.com/Clinical-Genomics/BALSAMIC/pull/1488
* Renamed UMI consensusfiltered bamfile to be picked up by multiqc https://github.com/Clinical-Genomics/BALSAMIC/pull/1490

Removed:
^^^^^^^^
Expand Down

0 comments on commit d3dc977

Please sign in to comment.