Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
342 commits
Select commit Hold shift + click to select a range
2fe65d3
revert
mathiasbio Mar 28, 2025
024042f
Revert "Merge branch 'change_submit_method' of github.com:Clinical-Ge…
mathiasbio Mar 28, 2025
08146b7
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Mar 28, 2025
4d1ac80
revert snakemake
mathiasbio Mar 28, 2025
90e7890
REVERT DAG
mathiasbio Mar 28, 2025
4ee48fd
fix
mathiasbio Mar 28, 2025
6e94598
restore config
mathiasbio Mar 28, 2025
234cc80
add slurm yaml
mathiasbio Mar 28, 2025
975ff62
worth a try
mathiasbio Mar 28, 2025
198dbb0
move mem to dynamic resource
mathiasbio Mar 28, 2025
05c48ef
fix
mathiasbio Mar 28, 2025
e17a41f
increase mem
mathiasbio Mar 28, 2025
19f9b1b
refactor
mathiasbio Mar 28, 2025
a66485b
mem
mathiasbio Mar 28, 2025
2f87f71
increase mem
mathiasbio Mar 28, 2025
d3782b0
mem wgs align
mathiasbio Mar 28, 2025
d9a2d68
add init
mathiasbio Apr 8, 2025
8196874
clean up
mathiasbio Apr 8, 2025
8f6ad56
remove cluster env
mathiasbio Apr 9, 2025
153b688
refactor code
mathiasbio Apr 9, 2025
8fd0823
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Apr 14, 2025
74a75e4
Merge branch 'develop' into change_submit_method
mathiasbio Apr 14, 2025
a756d2f
mem fix
mathiasbio Apr 14, 2025
799d057
change mem according to benchmark files
mathiasbio Apr 14, 2025
dbd6e37
add r
mathiasbio Apr 15, 2025
53bafbd
update threads
mathiasbio Apr 16, 2025
42b7d74
test adding mail func
mathiasbio Apr 17, 2025
baaa087
test
mathiasbio Apr 17, 2025
7807e94
remove email functionality
mathiasbio Apr 17, 2025
4dc3a66
clean up
mathiasbio Apr 17, 2025
81fca1b
clean
mathiasbio Apr 17, 2025
8a33122
fix
mathiasbio Apr 17, 2025
4fb4795
clean up
mathiasbio Apr 22, 2025
17c75a1
fix pytests
mathiasbio Apr 24, 2025
82c3e26
fix pytests
mathiasbio Apr 24, 2025
e9a42ac
black
mathiasbio Apr 24, 2025
0a12ec2
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Apr 24, 2025
8931641
Merge branch 'develop' into change_submit_method
mathiasbio Apr 24, 2025
89bd073
Merge develop and changelog
mathiasbio Apr 24, 2025
16f63ae
add logger test
mathiasbio Apr 25, 2025
9bf65e0
add sbatch pytest
mathiasbio Apr 25, 2025
3a1b100
add somatic loqusdb snv for panel arguments and filters
mathiasbio Apr 28, 2025
def606e
clean up
mathiasbio Apr 28, 2025
ea0bf39
test
mathiasbio Apr 30, 2025
b3812b9
cap mem
mathiasbio May 5, 2025
a2529bf
fix
mathiasbio May 5, 2025
e9626a1
restore resources
mathiasbio May 6, 2025
978599d
adjust mem and time
mathiasbio May 7, 2025
108add1
add partition core
mathiasbio May 8, 2025
ec8ae7f
remove test
mathiasbio May 12, 2025
2c6d18c
black
mathiasbio May 12, 2025
ed36c56
test
mathiasbio May 12, 2025
a8fb39f
test
mathiasbio May 12, 2025
d882d02
nothing
mathiasbio May 12, 2025
1615e9f
black
mathiasbio May 12, 2025
7dc87e1
fix
mathiasbio May 12, 2025
0738dd7
add logs
mathiasbio May 12, 2025
c1b76c0
black
mathiasbio May 12, 2025
846cf7d
remove test
mathiasbio May 12, 2025
0eef24d
black
mathiasbio May 12, 2025
c003549
add analysis status check to snakemake master job
mathiasbio May 15, 2025
b0199d5
fix variable
mathiasbio May 15, 2025
cea15bc
add success status check
mathiasbio May 23, 2025
80be77b
add resources
mathiasbio May 23, 2025
37267d3
change resources
mathiasbio May 26, 2025
0c9aeea
fix
mathiasbio May 26, 2025
aa722c0
add job status check
mathiasbio May 27, 2025
cf4bd51
black
mathiasbio May 27, 2025
1097cba
add to init
mathiasbio May 27, 2025
7dbb730
add cancel check state
mathiasbio May 28, 2025
997ad63
fix test
mathiasbio May 28, 2025
6b5b9ea
refactor code
mathiasbio May 28, 2025
aa63863
black
mathiasbio May 28, 2025
2d3e34b
remove retries
mathiasbio May 28, 2025
011a6a0
remove shell true
mathiasbio May 28, 2025
c03d9a7
black
mathiasbio May 28, 2025
ad6aa04
add description
mathiasbio May 28, 2025
8b64154
fix pytest
mathiasbio Jun 2, 2025
2b0a65d
fix pytests
mathiasbio Jun 2, 2025
4a77c5b
add qc error to status
mathiasbio Jun 2, 2025
edb3a83
fix
mathiasbio Jun 2, 2025
3ffca6d
append write statusfile
mathiasbio Jun 2, 2025
19f84d6
restore
mathiasbio Jun 2, 2025
ec403e8
test new options
mathiasbio Jun 2, 2025
0e4e6bd
mem
mathiasbio Jun 2, 2025
ba66a56
testing logs
mathiasbio Jun 2, 2025
bd0ed50
fix
mathiasbio Jun 2, 2025
16b4378
add cluster status script
mathiasbio Jun 3, 2025
b9ec70c
remove
mathiasbio Jun 3, 2025
9f77377
fix
mathiasbio Jun 3, 2025
947ffbd
fix
mathiasbio Jun 3, 2025
a8d1b59
fix
mathiasbio Jun 3, 2025
8fc8743
update state check
mathiasbio Jun 3, 2025
91ddb69
mem
mathiasbio Jun 3, 2025
d15050c
fix permission after install
mathiasbio Jun 3, 2025
658335a
fix
mathiasbio Jun 3, 2025
95df709
fix bug
mathiasbio Jun 4, 2025
00fb129
fix pytest
mathiasbio Jun 4, 2025
94f8a86
increase mem
mathiasbio Jun 4, 2025
b897400
increase mem
mathiasbio Jun 4, 2025
70ec4ab
fix codefactor issues
mathiasbio Jun 4, 2025
63e0ff4
increase mem
mathiasbio Jun 11, 2025
b51a6b8
increase mem
mathiasbio Jun 11, 2025
36c6969
add 1 retry
mathiasbio Jun 12, 2025
6403b4d
fix delly
mathiasbio Jun 16, 2025
9379ba8
merge
mathiasbio Jun 16, 2025
2dc57b2
clean up
mathiasbio Jul 9, 2025
bff6a7f
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Jul 9, 2025
f7b4ec2
clean up merge conflict and add to changelog
mathiasbio Jul 9, 2025
9620b21
add logging pytest
mathiasbio Jul 9, 2025
5275373
increase to 30%
mathiasbio Jul 11, 2025
9702a8d
add whitelist arg
mathiasbio Jul 11, 2025
b1da329
format
mathiasbio Jul 11, 2025
55e5948
fix
mathiasbio Jul 11, 2025
118ac79
fix bug
mathiasbio Jul 11, 2025
bde6728
fix key
mathiasbio Jul 14, 2025
ac63e42
increase mem
mathiasbio Jul 14, 2025
a8e40d9
trying to fix a mystery
mathiasbio Jul 14, 2025
5206b88
add whitelist script
mathiasbio Jul 16, 2025
71458f6
add whitelist to clinical rules
mathiasbio Jul 17, 2025
0d87922
fix
mathiasbio Jul 17, 2025
7ef0a0e
fix
mathiasbio Jul 17, 2025
16d0051
fix
mathiasbio Jul 17, 2025
1363b4c
fix
mathiasbio Jul 17, 2025
bceb699
bugfix
mathiasbio Jul 17, 2025
5e1b282
refactor
mathiasbio Jul 17, 2025
a912b96
increase mem
mathiasbio Jul 23, 2025
4525c3b
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Jul 24, 2025
d7d65fd
black
mathiasbio Jul 25, 2025
c15dca3
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Jul 25, 2025
dac6206
refactor script
mathiasbio Jul 28, 2025
0e3bad9
refactor
mathiasbio Jul 28, 2025
473651b
changelog
mathiasbio Jul 28, 2025
60dfa1b
fix pytest
mathiasbio Jul 28, 2025
699da2d
add pytests for whitelist script
mathiasbio Jul 28, 2025
ce6f343
increase mem
mathiasbio Jul 29, 2025
2967bc0
whitelist more filters
mathiasbio Aug 1, 2025
5ca40b8
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 1, 2025
444aca2
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 1, 2025
138e047
add post qual gnomad filtration
mathiasbio Aug 1, 2025
4c4abed
fix
mathiasbio Aug 4, 2025
be944f4
changelog
mathiasbio Aug 4, 2025
e2f3c23
increase time and mem
mathiasbio Aug 5, 2025
601b497
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 5, 2025
dfedf90
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 5, 2025
2ad49e0
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 5, 2025
54c65d9
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 5, 2025
37bbf4b
increase mem
mathiasbio Aug 5, 2025
782569d
fix
mathiasbio Aug 5, 2025
8336d19
refactor observation dicts
mathiasbio Aug 6, 2025
e2cf11d
remove func
mathiasbio Aug 6, 2025
94fab39
fix
mathiasbio Aug 6, 2025
60ea5a7
fix
mathiasbio Aug 6, 2025
ad08def
fix
mathiasbio Aug 6, 2025
ec3d046
fix
mathiasbio Aug 6, 2025
3050357
revert to dict
mathiasbio Aug 6, 2025
986f1b5
refactor input paths
mathiasbio Aug 6, 2025
ab479ef
fix
mathiasbio Aug 6, 2025
180a26d
fix
mathiasbio Aug 6, 2025
5c06f59
fix
mathiasbio Aug 6, 2025
1fedcce
refactor again
mathiasbio Aug 6, 2025
5a4415e
fix bug
mathiasbio Aug 6, 2025
ccc8361
fix
mathiasbio Aug 6, 2025
61b64b2
removing accidental tuples
mathiasbio Aug 6, 2025
4ac3bbe
fix
mathiasbio Aug 6, 2025
37c2c5f
fix
mathiasbio Aug 6, 2025
44432d1
fix
mathiasbio Aug 6, 2025
0017b8c
fix
mathiasbio Aug 6, 2025
ffdb38b
fix
mathiasbio Aug 6, 2025
4940d2f
make panel loqusdb optional
mathiasbio Aug 6, 2025
a2896b2
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 6, 2025
d7e6939
fix conflict
mathiasbio Aug 6, 2025
0376ae8
fix pytests
mathiasbio Aug 6, 2025
75bd7da
fix pytest
mathiasbio Aug 6, 2025
2d207c4
add new pytests
mathiasbio Aug 6, 2025
d59f07c
fix pytests
mathiasbio Aug 6, 2025
1630f34
fix pytests
mathiasbio Aug 6, 2025
8debd90
fix
mathiasbio Aug 7, 2025
eb70b7c
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 7, 2025
3d121b0
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 7, 2025
4c1756b
fix
mathiasbio Aug 7, 2025
46e39a3
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 7, 2025
8f51bc5
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 7, 2025
73f44a8
black
mathiasbio Aug 7, 2025
4e54daf
fix pon
mathiasbio Aug 7, 2025
f01b18c
black
mathiasbio Aug 7, 2025
1dc07f7
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 7, 2025
2cb5226
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 7, 2025
0d38b69
fix
mathiasbio Aug 7, 2025
38fad63
fix pon
mathiasbio Aug 7, 2025
0b6821d
fix
mathiasbio Aug 8, 2025
6b6abff
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 8, 2025
63a1fbf
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 8, 2025
0e00b77
add dynamic mem to dedup
mathiasbio Aug 8, 2025
9f30c72
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 8, 2025
9950c25
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 8, 2025
215c821
increase mem
mathiasbio Aug 8, 2025
8a28ca8
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Aug 8, 2025
4a9fd1c
fix merge conflict
mathiasbio Aug 8, 2025
591fccf
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 8, 2025
2e4ff75
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 8, 2025
fc16af7
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 8, 2025
adc5bf8
fix merge conflict
mathiasbio Aug 8, 2025
0a29e15
fix
mathiasbio Aug 11, 2025
3715a5c
increase mem
mathiasbio Aug 11, 2025
a8abdee
update script
mathiasbio Aug 11, 2025
3648345
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 11, 2025
e8865b8
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 11, 2025
be5d3ab
increase mem
mathiasbio Aug 11, 2025
20478a3
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 11, 2025
6e1f850
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 11, 2025
8a5566f
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 11, 2025
e180f20
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 11, 2025
f91e1ab
increase mem
mathiasbio Aug 11, 2025
d6c348c
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 11, 2025
16095d6
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 11, 2025
ea1c70b
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 11, 2025
556882a
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 11, 2025
b951a37
increase mem
mathiasbio Aug 12, 2025
1281b82
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 12, 2025
035fb34
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 12, 2025
24d90ef
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 12, 2025
cd771b7
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 12, 2025
f55e7a0
mem
mathiasbio Aug 13, 2025
bab71f6
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 13, 2025
c477e65
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 13, 2025
7771841
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 13, 2025
3ba7a87
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 13, 2025
e4f1244
increase mem
mathiasbio Aug 13, 2025
9b8982d
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 13, 2025
249cfcd
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 13, 2025
e519938
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 13, 2025
5bd4900
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 13, 2025
b051bad
remove index column from whitelist
mathiasbio Aug 13, 2025
4027da2
increase mem
mathiasbio Aug 13, 2025
722754f
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Aug 13, 2025
8110236
Merge branch 'change_submit_method' into add_somatic_panel_loqusdb
mathiasbio Aug 13, 2025
ddd1c92
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 13, 2025
afeac66
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 13, 2025
76c64aa
update docs
mathiasbio Aug 13, 2025
aa047e5
lower to 10%
mathiasbio Aug 14, 2025
8b77a9b
Merge branch 'add_somatic_panel_loqusdb' of github.com:Clinical-Genom…
mathiasbio Aug 14, 2025
eeb4983
Merge branch 'add_somatic_panel_loqusdb' into post_qual_popfiltration
mathiasbio Aug 14, 2025
54ef7a2
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Sep 15, 2025
4429bb4
Merge branch 'develop' into post_qual_popfiltration
mathiasbio Sep 15, 2025
24cd9b0
fix threads
mathiasbio Sep 15, 2025
407c352
Merge branch 'post_qual_popfiltration' of github.com:Clinical-Genomic…
mathiasbio Sep 15, 2025
557f4af
clean up
mathiasbio Sep 15, 2025
00d1a25
fix merge issues
mathiasbio Sep 15, 2025
6f9f452
clean up
mathiasbio Sep 15, 2025
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
1 change: 0 additions & 1 deletion BALSAMIC/commands/run/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import os
import subprocess
import shlex
import sys
from pathlib import Path
from typing import List
Expand Down
28 changes: 17 additions & 11 deletions BALSAMIC/constants/variant_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class BaseSNVFilters:
@classmethod
def filter_criteria(
cls,
category: Literal["clinical", "research", "quality"],
category: Literal["clinical", "research", "post_quality", "quality"],
analysis_type: Optional[Enum] = None,
variant_caller: Optional[Enum] = None,
exclude_variantcaller_filters: Optional[bool] = False,
Expand All @@ -169,7 +169,7 @@ def filter_criteria(
Shared filtering logic to get filters based on criteria.

Args:
category (Literal["clinical", "research", "quality"]): The filter category to use.
category (Literal["clinical", "research", "post_quality", "quality"]): The filter category to use.
analysis_type (Optional[Enum]): Filter based on analysis type (default: None).
variant_caller (Optional[Enum]): Filter based on variant caller (default: None).
exclude_variantcaller_filters (Optional[bool]): If True, excludes the variantcaller filters.
Expand Down Expand Up @@ -208,7 +208,7 @@ def filter_matches(f: VCFFilter) -> bool:
@classmethod
def get_bcftools_filter_string(
cls,
category: Literal["clinical", "research", "quality"],
category: Literal["clinical", "research", "post_quality", "quality"],
analysis_type: Optional[Enum] = None,
variant_caller: Optional[Enum] = None,
soft_filter_normals: Optional[bool] = None,
Expand All @@ -218,7 +218,7 @@ def get_bcftools_filter_string(
Get a set of filter names based on various attributes.

Args:
category (Literal["clinical", "research", "quality"]): The filter category to use.
category (Literal["clinical", "research", "post_quality", "quality"]): The filter category to use.
analysis_type (Optional[Enum]): Filter based on analysis type (default: None).
variant_caller (Optional[Enum]): Filter based on variant caller (default: None).
soft_filter_normals (Optional[bool]): If True, removes filters in MATCHED_NORMAL_FILTER_NAMES.
Expand Down Expand Up @@ -256,7 +256,7 @@ def get_bcftools_filter_string(
@classmethod
def get_filters(
cls,
category: Literal["clinical", "research", "quality"],
category: Literal["clinical", "research", "post_quality", "quality"],
analysis_type: Optional[Enum] = None,
variant_caller: Optional[Enum] = None,
exclude_variantcaller_filters: Optional[bool] = True,
Expand All @@ -266,7 +266,7 @@ def get_filters(
Get a list of filters matching the specified attributes.

Args:
category (Literal["clinical", "research", "quality"]): The filter category to use.
category (Literal["clinical", "research",, "post_quality", "quality"]): The filter category to use.
analysis_type (Optional[Enum]): Filter based on analysis type (default: None).
variant_caller (Optional[Enum]): Filter based on variant caller (default: None).
exclude_variantcaller_filters (Optional[bool]): If True, excludes the variantcaller filters.
Expand All @@ -285,12 +285,15 @@ def get_filters(


class WgsSNVFilters(BaseSNVFilters):
post_quality = [
VCFFilter(tag_value=0.1, filter_name="gnomad_hard_threshold", field="INFO"),
]
research = [
VCFFilter(tag_value=0.01, filter_name="SWEGENAF", field="INFO"),
VCFFilter(tag_value=0.001, filter_name="balsamic_high_pop_freq", field="INFO"),
]
clinical = research + [
VCFFilter(tag_value=0.007, filter_name="Frq", field="INFO"),
VCFFilter(tag_value=0.005, filter_name="Frq", field="INFO"),
VCFFilter(tag_value=0.1, filter_name="ArtefactFrq", field="INFO"),
]
quality = [
Expand Down Expand Up @@ -331,15 +334,18 @@ class WgsSNVFilters(BaseSNVFilters):


class TgaSNVFilters(BaseSNVFilters):
post_quality = [
VCFFilter(tag_value=0.1, filter_name="gnomad_hard_threshold", field="INFO"),
]
research = [
VCFFilter(
filter_name="MERGED", Description="SNV Merged with neighboring variants"
),
VCFFilter(tag_value=0.01, filter_name="SWEGENAF", field="INFO"),
VCFFilter(tag_value=0.005, filter_name="balsamic_high_pop_freq", field="INFO"),
VCFFilter(tag_value=0.001, filter_name="balsamic_high_pop_freq", field="INFO"),
]
clinical = research + [
VCFFilter(tag_value=0.01, filter_name="Frq", field="INFO"),
VCFFilter(tag_value=0.005, filter_name="Frq", field="INFO"),
VCFFilter(tag_value=0.1, filter_name="ArtefactFrq", field="INFO"),
VCFFilter(tag_value=0.3, filter_name="HighOccurrenceFrq", field="INFO"),
]
Expand Down Expand Up @@ -403,10 +409,10 @@ class TgaSNVFilters(BaseSNVFilters):
class TgaUmiSNVFilters(BaseSNVFilters):
research = [
VCFFilter(tag_value=0.01, filter_name="SWEGENAF", field="INFO"),
VCFFilter(tag_value=0.02, filter_name="balsamic_high_pop_freq", field="INFO"),
VCFFilter(tag_value=0.001, filter_name="balsamic_high_pop_freq", field="INFO"),
]
clinical = research + [
VCFFilter(tag_value=0.01, filter_name="Frq", field="INFO"),
VCFFilter(tag_value=0.005, filter_name="Frq", field="INFO"),
VCFFilter(tag_value=0.1, filter_name="ArtefactFrq", field="INFO"),
]
quality = [
Expand Down
32 changes: 30 additions & 2 deletions BALSAMIC/snakemake_rules/annotation/somatic_snv_annotation.rule
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,37 @@
# coding: utf-8
# Somatic SNV annotation module.

rule snv_gnomad_annotation_and_filtration:
input:
vcf_snv_research = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.research.vcf.gz",
output:
research_gnomadfiltered = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.research_gnomadfiltered.vcf.gz",
vcfanno_gnomad_annotation_toml = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.vcfanno_gnomadsnv.toml"
benchmark:
Path(benchmark_dir, "snv_gnomad_annotation_and_filtration.{case_name}.{var_caller}.tsv").as_posix()
singularity:
Path(singularity_image, config["bioinfo_tools"].get("ensembl-vep") + ".sif").as_posix()
params:
pop_freq = get_tag_and_filtername(snv_post_quality_filters, "gnomad_hard_threshold"),
gnomad_annotation = config_model.retrieve_annotations_toml(category=AnnotationCategory.POST_QUALITY),
tmpdir = tempfile.mkdtemp(prefix=tmp_dir)
message:
"Annotating and filtering based on gnomad frequencies on SNVs and INDELs"
shell:
"""
echo \'{params.gnomad_annotation}\' > {output.vcfanno_gnomad_annotation_toml};

vcfanno -p {threads} {output.vcfanno_gnomad_annotation_toml} {input.vcf_snv_research} \
| bcftools view --threads {threads} -O z -o {params.tmpdir}/SNV.somatic.research.gnomad_annotated.vcf.gz ;

bcftools filter --threads {threads} --include 'INFO/GNOMADAF_popmax <= {params.pop_freq[0]} || INFO/GNOMADAF_popmax == \".\"' -O z -o {output.research_gnomadfiltered} {params.tmpdir}/SNV.somatic.research.gnomad_annotated.vcf.gz

tabix -p vcf -f {output.research_gnomadfiltered};
"""

rule bcftools_get_somaticINDEL_research:
input:
vcf_research = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.research.vcf.gz",
vcf_research = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.research_gnomadfiltered.vcf.gz",
output:
vcf_indel_research = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.indel.research.vcf.gz",
benchmark:
Expand Down Expand Up @@ -43,7 +71,7 @@ CADD.sh -g GRCh37 -o {output.cadd_indel_research} {input.vcf_indel_research}

rule bcftools_annotate_somaticINDEL_research:
input:
vcf_research = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.research.vcf.gz",
vcf_research = vcf_dir + "SNV.somatic.{case_name}.{var_caller}.research_gnomadfiltered.vcf.gz",
cadd_indel_research = vep_dir + "SNV.somatic.{case_name}.{var_caller}.cadd_indel.research.tsv.gz",
output:
vcf_indel_research = vep_dir + "SNV.somatic.{case_name}.{var_caller}.cadd_indel.research.vcf.gz",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ rule svdb_annotate_somatic_research_sv:
shell:
"""
if [[ -f "{params.swegen_sv_frequency}" ]]; then
svdb --query --bnd_distance 5000 --overlap 0.80 \
svdb --query --bnd_distance 1000 --overlap 0.80 \
--in_occ OCC --out_occ swegen_obs --in_frq FRQ --out_frq SWEGENAF \
--db {params.swegen_sv_frequency} --query_vcf {input.vcf_sv_research_vep} > {params.tmp_vcf};
bgzip -l 9 -c {params.tmp_vcf} > {output.vcf_research};
Expand Down Expand Up @@ -86,7 +86,7 @@ rule svdb_annotate_clinical_obs_somatic_clinical_sv:
shell:
"""
if [[ -f "{params.clinical_sv_observations}" ]]; then
svdb --query --bnd_distance 10000 --overlap 0.80 \
svdb --query --bnd_distance 1000 --overlap 0.80 \
--in_occ Obs --out_occ clin_obs --in_frq Frq --out_frq Frq \
--db {params.clinical_sv_observations} --query_vcf {input.vcf_sv_research} > {params.vcf_clinical_obs}
bgzip -l 9 -c {params.vcf_clinical_obs} > {output.vcf_sv_clinical_obs};
Expand Down Expand Up @@ -118,7 +118,7 @@ rule svdb_annotate_somatic_obs_somatic_clinical_sv:
shell:
"""
if [[ -f "{params.somatic_sv_observations}" ]]; then
svdb --query --bnd_distance 10000 --overlap 0.80 \
svdb --query --bnd_distance 1000 --overlap 0.80 \
--in_occ Obs --out_occ Cancer_Somatic_Obs --in_frq Frq --out_frq Cancer_Somatic_Frq \
--db {params.somatic_sv_observations} --query_vcf {input.vcf_sv_clinical_obs} > {params.vcf_somatic_obs}
bgzip -l 9 -c {params.vcf_somatic_obs} > {output.vcf_sv_clinical};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,5 @@ python {params.rescue_script} --vcf {params.tmpdir}/clinical.filtered.pass_befor

bcftools view --threads {threads} --exclude '{params.hard_filters}' -O z -o {output.vcf_pass_tnscope} {params.tmpdir}/clinical.filtered.pass_after_rescue.vcf;

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

bcftools +counts {output.vcf_pass_tnscope} > {output.bcftools_counts_clinical};
"""
2 changes: 2 additions & 0 deletions BALSAMIC/workflows/balsamic.smk
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ else:
if sequencing_type == "targeted":
exome = config_model.panel.exome
snv_quality_filters = SNV_FILTERS.get_filters(category="quality", analysis_type=analysis_type, exome=exome)
snv_post_quality_filters = SNV_FILTERS.get_filters(category="post_quality", analysis_type=analysis_type, exome=exome)
snv_research_filters = SNV_FILTERS.get_filters(category="research", analysis_type=analysis_type, exome=exome)
snv_clinical_filters = SNV_FILTERS.get_filters(category="clinical", analysis_type=analysis_type, exome=exome)
else:
snv_quality_filters = SNV_FILTERS.get_filters(category="quality", analysis_type=analysis_type)
snv_post_quality_filters = SNV_FILTERS.get_filters(category="post_quality",analysis_type=analysis_type)
snv_research_filters = SNV_FILTERS.get_filters(category="research", analysis_type=analysis_type)
snv_clinical_filters = SNV_FILTERS.get_filters(category="clinical", analysis_type=analysis_type)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Fixed:
^^^^^^



[17.0.1]
--------

Expand Down
Loading