Skip to content
Open
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
3 changes: 3 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ reference:
build: GRCh38
# Ensembl release
release: 107
# flavor: "" # optional, e.g. chr_patch_hapl_scaff, see Ensembl FTP: https://ftp.ensembl.org/pub/release-107/gtf/homo_sapiens/
# branch: "" # optional

# for available downloads, please browse either of these views:
# * http://repeatmasker.org/genomicDatasets/RMGenomicDatasets.html
# * http://repeatmasker.org/genomicDatasets/RMGenomicDatasetsAlt.html
Expand Down
16 changes: 10 additions & 6 deletions workflow/rules/annotate.smk
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ rule cyrcular_annotate_graph:
graph="results/calling/graphs/{group}.graph",
gene_annotation="resources/gene_annotation.gff3.gz",
regulatory_annotation="resources/regulatory_annotation.gff3.gz",
repeat_annotation=lambda wc: "resources/repeat_masker.fa.out.gz"
if config["reference"].get("repeat_masker_download_link", "")
else "",
repeat_annotation=lambda wc: (
"resources/repeat_masker.fa.out.gz"
if config["reference"].get("repeat_masker_download_link", "")
else ""
),
output:
annotated="results/calling/graphs/{group}.annotated.graph",
threads: 1
Expand All @@ -39,9 +41,11 @@ rule cyrcular_annotate_graph:
conda:
"../envs/cyrcular.yaml"
params:
repeat_annotation=lambda wc, input: f" --repeat-annotation {input.repeat_annotation} "
if config["reference"].get("repeat_masker_download_link", "")
else "",
repeat_annotation=lambda wc, input: (
f" --repeat-annotation {input.repeat_annotation} "
if config["reference"].get("repeat_masker_download_link", "")
else ""
),
shell:
"cyrcular graph annotate "
" --reference {input.reference} "
Expand Down
10 changes: 6 additions & 4 deletions workflow/rules/map.smk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rule minimap2_bam:
params:
extra=get_minimap2_mapping_params, # optional
sorting="coordinate", # optional: Enable sorting. Possible values: 'none', 'queryname' or 'coordinate'
sort_extra=lambda wc, threads: f"-@ {min(threads, 4)}", # optional: extra arguments for samtools/picard
sort_extra=lambda wc, threads: f"-@ {min(threads , 4)}", # optional: extra arguments for samtools/picard
threads: workflow.cores // 2
wrapper:
"v1.25.0/bio/minimap2/aligner"
Expand All @@ -27,9 +27,11 @@ rule merge_fastqs:
wildcard_constraints:
read="single|R1|R2",
params:
cmd=lambda wc: "pigz -dc"
if (any(map(lambda f: f.endswith(".gz"), get_fastqs(wc))))
else "cat",
cmd=lambda wc: (
"pigz -dc"
if (any(map(lambda f: f.endswith(".gz"), get_fastqs(wc))))
else "cat"
),
conda:
"../envs/pigz.yaml"
shell:
Expand Down
10 changes: 2 additions & 8 deletions workflow/rules/ref.smk
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ rule minimap2_index:
),
log:
"logs/minimap2_index/genome.log",
benchmark:
"benchmarks/minimap2_index/genome.txt"
params:
extra="", # optional additional args
cache: True
Expand All @@ -65,8 +63,6 @@ rule download_regulatory_annotation:
"logs/download_regulatory_annotation.log",
params:
release=config["reference"].get("release", "107"),
benchmark:
"benchmarks/download_regulatory_annotation.txt"
cache: "omit-software" # save space and time with between workflow caching (see docs)
conda:
"../envs/wget.yaml"
Expand All @@ -81,8 +77,6 @@ rule download_repeatmasker_annotation:
"logs/download_repeatmasker_annotation.log",
params:
download_link=config["reference"].get("repeat_masker_download_link", ""),
benchmark:
"benchmarks/download_repeatmasker_annotation.txt"
cache: "omit-software" # save space and time with between workflow caching (see docs)
conda:
"../envs/wget.yaml"
Expand All @@ -97,8 +91,8 @@ rule download_gene_annotation:
species=config["reference"]["species"],
build=config["reference"]["build"],
release=config["reference"]["release"],
flavor="", # optional, e.g. chr_patch_hapl_scaff, see Ensembl FTP.
branch="", # optional: specify branch
flavor=config["reference"].get("flavor", ""), # optional, e.g. chr_patch_hapl_scaff, see Ensembl FTP.
branch=config["reference"].get("branch", ""), # optional: specify branch
log:
"logs/download_gene_annotation.log",
cache: "omit-software" # save space and time with between workflow caching (see docs)
Expand Down
13 changes: 11 additions & 2 deletions workflow/schemas/config.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ properties:
type: integer
build:
type: string
flavor:
type: string
branch:
type: string
repeat_masker_download_link:
type: string
required:
- species
- release
Expand Down Expand Up @@ -70,8 +76,11 @@ properties:
type: number
minimum: 0.0
maximum: 1.0
local:
type: boolean
mode:
type: array
items:
type: string
enum: ["local-smart", "local-strict", "global-smart", "global-strict"]
events:
$ref: "#/definitions/evententry"
description: "a map of <eventname: event> pairs"
Expand Down