Skip to content

Commit

Permalink
refactor: getting rid of general thread config. now using build in re…
Browse files Browse the repository at this point in the history
…sources/threads
  • Loading branch information
Max Schubach committed Jul 16, 2024
1 parent d637e1f commit 42e0e82
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 20 deletions.
1 change: 0 additions & 1 deletion config/example_assignment_bwa.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
global: # generall configs effecting one or multiple parts
threads: 1
assignments:
split_number: 1 # number of files fastq should be split for parallelization
assignments:
Expand Down
1 change: 0 additions & 1 deletion config/example_assignment_exact_lazy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
global: # generall configs effecting one or multiple parts
threads: 1
assignments:
split_number: 1 # number of files fastq should be split for parallelization
assignments:
Expand Down
1 change: 0 additions & 1 deletion config/example_assignment_exact_linker.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
global: # generall configs effecting one or multiple parts
threads: 1
assignments:
split_number: 1 # number of files fastq should be split for parallelization
assignments:
Expand Down
3 changes: 1 addition & 2 deletions config/example_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
global: # generall configs effecting one or multiple parts
threads: 1
assignments:
split_number: 1 # number of files fastq should be split for parallelization
assignments:
Expand Down Expand Up @@ -31,7 +30,7 @@ experiments:
exampleCount:
bc_length: 15
umi_length: 10
data_folder: resources/Count_Basic/data
data_folder: resources/count_basic/data
experiment_file: resources/example_experiment.csv
demultiplex: false
assignments:
Expand Down
15 changes: 15 additions & 0 deletions config/example_count.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
experiments:
exampleCount:
bc_length: 15
umi_length: 10
data_folder: resources/count_basic/data
experiment_file: resources/count_basic/experiment.csv
demultiplex: false
assignments:
fromFile:
type: file
assignment_file: resources/count_basic/SRR10800986_barcodes_to_coords.tsv.gz
design_file: resources/count_basic/design.fa
configs:
default: {} # name of an example filtering config
2 changes: 1 addition & 1 deletion docs/assignment_example1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ First we do a try run using snakemake :code:`-n` option. The MPRAsnakeflow comma
cd assoc_basic
conda activate mprasnakeflow
snakemake -c 1 --use-conda --snakefile /home/user/MPRAsnakeflow/workflow/Snakefile --configfile /home/user/MPRAsnakeflow/resources/assoc_basic/config.yml -n -q
snakemake -c 1 --sdm conda --snakefile /home/user/MPRAsnakeflow/workflow/Snakefile --configfile /home/user/MPRAsnakeflow/resources/assoc_basic/config.yml -n -q --set-threads assignment_mapping_bwa=10
You should see a list of rules that will be executed. This is the summary:

Expand Down
2 changes: 0 additions & 2 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ The general settings are located in the :code:`global` section. The following se
:start-after: start_global
:end-before: start_assignments

:threads:
Number of threads that are available to run a rule. Right now this is used for bwa mem in the assignment workflow. Be sure to set up the snakemake option :code:`-c` correctly when using larger number of possible threads. Default is set to 1.
:assignments:
Global parameters that hold for the assignment workflow.

Expand Down
1 change: 0 additions & 1 deletion resources/assoc_basic/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
global:
threads: 10
assignments:
split_number: 30
assignments:
Expand Down
1 change: 0 additions & 1 deletion resources/combined_basic/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
global:
threads: 10
assignments:
split_number: 30
assignments:
Expand Down
4 changes: 0 additions & 4 deletions resources/experiment_basic/experiment.csv

This file was deleted.

4 changes: 2 additions & 2 deletions workflow/rules/assignment/mapping_bwa.smk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rule assignment_mapping_bwa:
),
output:
bam=temp("results/assignment/{assignment}/bam/merge_split{split}.mapped.bam"),
threads: config["global"]["threads"]
threads: 1
log:
temp("results/logs/assignment/mapping.{assignment}.{split}.log"),
shell:
Expand Down Expand Up @@ -109,7 +109,7 @@ rule assignment_collect:
),
output:
"results/assignment/{assignment}/aligned_merged_reads.bam",
threads: config["global"]["threads"]
threads: 1
log:
temp("results/logs/assignment/collect.{assignment}.log"),
shell:
Expand Down
4 changes: 0 additions & 4 deletions workflow/schemas/config.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ properties:
global:
type: object
default:
threads: 1
assignments:
split_number: 1
properties:
Expand All @@ -25,9 +24,6 @@ properties:
type: integer
default: 1
additionalProperties: false
threads:
type: integer
default: 1
additionalProperties: false
# start_assignments
assignments:
Expand Down

0 comments on commit 42e0e82

Please sign in to comment.