Skip to content

Commit

Permalink
refactor!: No min max length for bbmap. default mapq is 30. (kircherl…
Browse files Browse the repository at this point in the history
…ab#131)

Changes for bbmap
* no min an max for sequence length and start. (like exact matching)
* using default of 30 mapq instead of 35
  • Loading branch information
visze authored Oct 28, 2024
1 parent 2d80faf commit 1e9157b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 52 deletions.
10 changes: 3 additions & 7 deletions config/example_assignment_bbmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ assignments:
alignment_tool:
tool: bbmap
configs:
min_mapping_quality: 35 # integer >=0. 35 is default
sequence_length: # sequence length of design excluding adapters.
min: 166
max: 175
alignment_start: # start of an alignment in the reference/design_file. Here using 15 bp adapters. Can be different when using adapter free approaches
min: 1 # integer
max: 3 # integer
min_mapping_quality: 30 # integer >=0. 30 is default for bbmap
sequence_length: 171 # sequence length of design excluding adapters.
alignment_start: 1 # start of an alignment in the reference/design_file. Here using 15 bp adapters. Can be different when using adapter free approaches
FW:
- resources/Assignment_BasiC/R1.fastq.gz
BC:
Expand Down
4 changes: 2 additions & 2 deletions config/example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ assignments:
exampleAssignment: # name of an example assignment (can be any string)
bc_length: 15
alignment_tool:
tool: exact # bbbmap, bwa or exact
tool: exact # bbmap, bwa or exact
configs:
sequence_length: 170 # sequence length of design excluding adapters.
sequence_length: 171 # sequence length of design excluding adapters.
alignment_start: 1 # start of the alignment in the reference/design_file
FW:
- resources/assoc_basic/data/SRR10800986_1.fastq.gz
Expand Down
8 changes: 2 additions & 6 deletions resources/assoc_basic/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ assignments:
alignment_tool:
tool: bbmap
configs:
sequence_length:
min: 166
max: 175
alignment_start:
min: 1
max: 3
sequence_length: 171
alignment_start: 1
FW:
- data/SRR10800986_1.fastq.gz
BC:
Expand Down
8 changes: 2 additions & 6 deletions resources/combined_basic/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ assignments:
alignment_tool:
tool: bbmap
configs:
sequence_length:
min: 166
max: 175
alignment_start:
min: 1
max: 3
sequence_length: 171
alignment_start: 1
FW:
- data/SRR10800986_1.fastq.gz
BC:
Expand Down
16 changes: 6 additions & 10 deletions workflow/rules/assignment.smk
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,24 @@ rule assignment_check_design:
start=lambda wc: (
config["assignments"][wc.assignment]["alignment_tool"]["configs"][
"alignment_start"
]
if config["assignments"][wc.assignment]["alignment_tool"]["tool"]
== "exact"
]["max"]
if config["assignments"][wc.assignment]["alignment_tool"]["tool"] == "bwa"
else config["assignments"][wc.assignment]["alignment_tool"]["configs"][
"alignment_start"
]["max"]
]
),
length=lambda wc: (
config["assignments"][wc.assignment]["alignment_tool"]["configs"][
"sequence_length"
]
if config["assignments"][wc.assignment]["alignment_tool"]["tool"]
== "exact"
]["min"]
if config["assignments"][wc.assignment]["alignment_tool"]["tool"] == "bwa"
else config["assignments"][wc.assignment]["alignment_tool"]["configs"][
"sequence_length"
]["min"]
]
),
fast_check=lambda wc: (
"--fast-dict"
if config["assignments"][wc.assignment]["design_check"]["fast"]
or config["assignments"][wc.assignment]["alignment_tool"]["tool"]
== "bbmap"
else "--slow-string-search"
),
check_sequence_collitions=lambda wc: (
Expand Down
26 changes: 5 additions & 21 deletions workflow/schemas/config.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,29 +99,13 @@ properties:
min_mapping_quality:
type: integer
minimum: 0
default: 35
default: 30
sequence_length:
type: object
properties:
min:
type: integer
max:
type: integer
additionalProperties: false
required:
- min
- max
type: integer
minimum: 1
alignment_start:
type: object
properties:
min:
type: integer
max:
type: integer
additionalProperties: false
required:
- min
- max
type: integer
minimum: 1
additionalProperties: false
required:
- min_mapping_quality
Expand Down

0 comments on commit 1e9157b

Please sign in to comment.