Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed GATK3 conda channel priorities and code reformat (#534)
<!-- Ensure that the PR title follows conventional commit style (<type>: <description>)--> <!-- Possible types are here: https://github.com/commitizen/conventional-commit-types/blob/master/index.json --> ### Description <!-- Add a description of your PR here--> Fixed conda channel priorities, plus some code clean-up ### QC <!-- Make sure that you can tick the boxes below. --> * [x] I confirm that: For all wrappers added by this PR, * there is a test case which covers any introduced changes, * `input:` and `output:` file paths in the resulting rule can be changed arbitrarily, * either the wrapper can only use a single core, or the example rule contains a `threads: x` statement with `x` being a reasonable default, * rule names in the test case are in [snake_case](https://en.wikipedia.org/wiki/Snake_case) and somehow tell what the rule is about or match the tools purpose or name (e.g., `map_reads` for a step that maps reads), * all `environment.yaml` specifications follow [the respective best practices](https://stackoverflow.com/a/64594513/2352071), * wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in `input:` or `output:`), * all fields of the example rules in the `Snakefile`s and their entries are explained via comments (`input:`/`output:`/`params:` etc.), * `stderr` and/or `stdout` are logged correctly (`log:`), depending on the wrapped tool, * temporary files are either written to a unique hidden folder in the working directory, or (better) stored where the Python function `tempfile.gettempdir()` points to (see [here](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir); this also means that using any Python `tempfile` default behavior works), * the `meta.yaml` contains a link to the documentation of the respective tool or command, * `Snakefile`s pass the linting (`snakemake --lint`), * `Snakefile`s are formatted with [snakefmt](https://github.com/snakemake/snakefmt), * Python wrapper scripts are formatted with [black](https://black.readthedocs.io). Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
c4ee12f
commit 43e5a16
Showing
65 changed files
with
366 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.4 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ channels: | |
dependencies: | ||
- gatk4 =4.2 | ||
- openjdk =8 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk4 =4.2 | ||
- snakemake-wrapper-utils =0.3 | ||
- snakemake-wrapper-utils =0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
rule baserecalibrator: | ||
input: | ||
bam="mapped/{sample}.bam", | ||
bam="{sample}.bam", | ||
bai="{sample}.bai", | ||
ref="genome.fasta", | ||
known="dbsnp.vcf.gz" | ||
fai="genome.fasta.fai", | ||
dict="genome.dict", | ||
known="dbsnp.vcf.gz", | ||
known_idx="dbsnp.vcf.gz.tbi", | ||
output: | ||
"{sample}.recal_data_table" | ||
recal_table="{sample}.recal_data_table", | ||
log: | ||
"logs/gatk3/bqsr/{sample}.log" | ||
"logs/gatk3/bqsr/{sample}.log", | ||
params: | ||
extra="" # optional | ||
extra="--defaultBaseQualities 20 --filter_reads_with_N_cigar", # optional | ||
resources: | ||
mem_mb = 1024 | ||
mem_mb=1024, | ||
threads: 16 | ||
wrapper: | ||
"bio/gatk/baserecalibrator" | ||
"master/bio/gatk3/baserecalibrator" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@HD VN:1.5 | ||
@SQ SN:ref LN:45 M5:7a66cae8ab14aef8d635bc80649e730b UR:file:/home/johannes/scms/snakemake-wrappers/bio/picard/createsequencedictionary/test/genome.fasta | ||
@SQ SN:ref2 LN:40 M5:1636753510ec27476fdd109a6684680e UR:file:/home/johannes/scms/snakemake-wrappers/bio/picard/createsequencedictionary/test/genome.fasta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
>ref | ||
AGCATGTTAGATAAGATAGCTGTGCTAGTAGGCAGTCAGCGCCAT | ||
>ref2 | ||
aggttttataaaacaattaagtctacagagcaactacgcg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ref 45 5 45 46 | ||
ref2 40 57 40 41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
rule indelrealigner: | ||
input: | ||
bam="mapped/{sample}.bam", | ||
bai="mapped/{sample}.bai", | ||
bam="{sample}.bam", | ||
bai="{sample}.bai", | ||
ref="genome.fasta", | ||
fai="genome.fasta.fai", | ||
dict="genome.dict", | ||
known="dbsnp.vcf.gz", | ||
known_idx="dbsnp.vcf.gz.tbi", | ||
target_intervals="{sample}.intervals" | ||
target_intervals="{sample}.intervals", | ||
output: | ||
bam="realigned/{sample}.bam", | ||
bai="realigned/{sample}.bai", | ||
java_temp=temp(directory("/tmp/gatk3_indelrealigner/{sample}")), | ||
bam="{sample}.realigned.bam", | ||
bai="{sample}.realigned.bai", | ||
log: | ||
"logs/gatk3/indelrealigner/{sample}.log" | ||
"logs/gatk3/indelrealigner/{sample}.log", | ||
params: | ||
extra="" # optional | ||
extra="--defaultBaseQualities 20 --filter_reads_with_N_cigar", # optional | ||
threads: 16 | ||
resources: | ||
mem_mb = 1024 | ||
mem_mb=1024, | ||
wrapper: | ||
"bio/gatk/indelrealigner" | ||
"master/bio/gatk3/indelrealigner" |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ref:14-19 | ||
ref2:14-15 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@HD VN:1.5 | ||
@SQ SN:ref LN:45 M5:7a66cae8ab14aef8d635bc80649e730b UR:file:/home/johannes/scms/snakemake-wrappers/bio/picard/createsequencedictionary/test/genome.fasta | ||
@SQ SN:ref2 LN:40 M5:1636753510ec27476fdd109a6684680e UR:file:/home/johannes/scms/snakemake-wrappers/bio/picard/createsequencedictionary/test/genome.fasta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
>ref | ||
AGCATGTTAGATAAGATAGCTGTGCTAGTAGGCAGTCAGCGCCAT | ||
>ref2 | ||
aggttttataaaacaattaagtctacagagcaactacgcg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ref 45 5 45 46 | ||
ref2 40 57 40 41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ channels: | |
- nodefaults | ||
dependencies: | ||
- gatk =3.8 | ||
- python >=3.10 | ||
- snakemake-wrapper-utils =0.5.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
rule printreads: | ||
input: | ||
bam="mapped/{sample}.bam", | ||
bam="{sample}.bam", | ||
bai="{sample}.bai", | ||
# recal_data="{sample}.recal_data_table", | ||
ref="genome.fasta", | ||
recal_data="{sample}.recal_data_table" | ||
fai="genome.fasta.fai", | ||
dict="genome.dict", | ||
output: | ||
"alignment/{sample}.bqsr.bam" | ||
bam="{sample}.bqsr.bam", | ||
bai="{sample}.bqsr.bai", | ||
log: | ||
"logs/gatk/bqsr/{sample}..log" | ||
"logs/gatk/bqsr/{sample}.log", | ||
params: | ||
extra="" # optional | ||
extra="--defaultBaseQualities 20 --filter_reads_with_N_cigar", # optional | ||
resources: | ||
mem_mb = 1024 | ||
mem_mb=1024, | ||
threads: 16 | ||
wrapper: | ||
"bio/gatk3/printreads" | ||
"master/bio/gatk3/printreads" |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.