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

feat: add triallelic_sites and variants with MaxDepth #1021

Merged
merged 5 commits into from
Nov 16, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ bcftools view {input.vcf} \

tabix -p vcf -f {output.vcf_filtered};

bcftools view -f PASS -o {output.vcf_pass_TNscope_umi}.temp -O z {output.vcf_filtered};
bcftools view -f PASS,triallelic_site -o {output.vcf_pass_TNscope_umi}.temp -O z {output.vcf_filtered};

python {params.edit_vcf_script} \
--input_vcf {output.vcf_pass_TNscope_umi}.temp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ bcftools view {input.vcf} \

tabix -p vcf -f {output.vcf_filtered};

bcftools view -f PASS -o {output.vcf_pass_TNscope_umi}.temp -O z {output.vcf_filtered};
bcftools view -f PASS,triallelic_site -o {output.vcf_pass_TNscope_umi}.temp -O z {output.vcf_filtered};

python {params.edit_vcf_script} \
--input_vcf {output.vcf_pass_TNscope_umi}.temp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rule bcftools_filter_sv_research:
"Filtering merged research structural and copy number variants using bcftools for {params.case_name}"
shell:
"""
bcftools view --threads {threads} -f .,PASS -o {output.vcf_pass_svdb_research} -O z {input.vcf_sv_research};
bcftools view --threads {threads} -f .,PASS,MaxDepth -o {output.vcf_pass_svdb_research} -O z {input.vcf_sv_research};

tabix -p vcf -f {output.vcf_pass_svdb_research};

Expand All @@ -48,7 +48,7 @@ rule bcftools_filter_sv_clinical:
"Filtering merged clinical structural and copy number variants using bcftools for {params.case_name}"
shell:
"""
bcftools view --threads {threads} -f .,PASS -o {output.vcf_pass_svdb_clinical} -O z {input.vcf_sv_clinical};
bcftools view --threads {threads} -f .,PASS,MaxDepth -o {output.vcf_pass_svdb_clinical} -O z {input.vcf_sv_clinical};

tabix -p vcf -f {output.vcf_pass_svdb_clinical};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rule bcftools_filter_tnscope_research_tumor_normal:
"""
bcftools view {input.vcf_snv_research} \
| bcftools filter --threads {threads} --include 'INFO/GNOMADAF_popmax <= {params.pop_freq[0]} || INFO/GNOMADAF_popmax == \".\"' --soft-filter '{params.pop_freq[1]}' --mode '+' \
| bcftools view -f PASS -o {output.vcf_pass_tnscope_research} -O z;
| bcftools view -f PASS,triallelic_site -o {output.vcf_pass_tnscope_research} -O z;

tabix -p vcf -f {output.vcf_pass_tnscope_research};

Expand Down Expand Up @@ -54,7 +54,7 @@ rule bcftools_filter_tnscope_clinical_tumor_normal:
shell:
"""
bcftools view {input.vcf_snv_clinical} \
| bcftools view -f PASS -o {output.vcf_pass_tnscope_clinical} -O z;
| bcftools view -f PASS,triallelic_site -o {output.vcf_pass_tnscope_clinical} -O z;

tabix -p vcf -f {output.vcf_pass_tnscope_clinical};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bcftools view -f PASS --threads {threads} --regions-file {input.wgs_calling_file
| bcftools filter --threads {threads} --include 'SUM(FORMAT/QSS)/SUM(FORMAT/AD) >= {params.qss[0]}' --soft-filter '{params.qss[1]}' --mode '+' \
| bcftools filter --threads {threads} --include 'FORMAT/ALT_F1R2 > {params.strand_reads[0]} && (FORMAT/ALT_F1R2 > 0 && FORMAT/ALT_F2R1 > {params.strand_reads[0]} && FORMAT/REF_F1R2 > {params.strand_reads[0]} && FORMAT/REF_F2R1 > {params.strand_reads[0]})' --soft-filter '{params.strand_reads[1]}' --mode '+' \
| bcftools filter --threads {threads} --include "INFO/SOR < {params.sor[0]}" --soft-filter '{params.sor[1]}' --mode '+' \
| bcftools view -f PASS -o {output.vcf_pass_tnscope_research} -O z;
| bcftools view -f PASS,triallelic_site -o {output.vcf_pass_tnscope_research} -O z;

tabix -p vcf -f {output.vcf_pass_tnscope_research};

Expand Down Expand Up @@ -73,7 +73,7 @@ rule bcftools_filter_tnscope_clinical_tumor_only:
grep -v '^@' {input.wgs_calling_file} > {input.wgs_calling_file}.bed

bcftools view -f PASS --threads {threads} --regions-file {input.wgs_calling_file}.bed {input.vcf_snv_clinical} \
| bcftools view -f PASS -o {output.vcf_pass_tnscope_clinical} -O z;
| bcftools view -f PASS,triallelic_site -o {output.vcf_pass_tnscope_clinical} -O z;

tabix -p vcf -f {output.vcf_pass_tnscope_clinical};

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Added:
* Annotation of snv_clinical_observations for somatic snv https://github.com/Clinical-Genomics/BALSAMIC/pull/1012
* Annotation of sv_clinical_observations for somatic sv and SV CNV filter rules https://github.com/Clinical-Genomics/BALSAMIC/pull/1013
* Swegen SNV and SV frequency database for WGS https://github.com/Clinical-Genomics/BALSAMIC/pull/1014
* triallelic_sites and variants with MaxDepth to the VCFs https://github.com/Clinical-Genomics/BALSAMIC/pull/1021

Changed:
^^^^^^^^
Expand All @@ -29,7 +30,7 @@ Changed:
Fixed:
^^^^^^
* Reverted `pandas` version (from `1.3.5` to `1.1.0`) https://github.com/Clinical-Genomics/BALSAMIC/pull/1018
* samtools command in merge bam and names in toml for vcfanno https://github.com/Clinical-Genomics/BALSAMIC/pull/10
* samtools command in merge bam and names in toml for vcfanno https://github.com/Clinical-Genomics/BALSAMIC/pull/1020

Removed:
^^^^^^^
Expand Down