-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Wrapper and meta-wrapper for rbt consensus reads #544
Conversation
…ers into consensus_meta
rule samtools_sort: | ||
input: | ||
"{path}/{sample}.bam", | ||
output: | ||
temp("{path}/{sample}.sorted.bam"), | ||
params: | ||
extra="-m 4G", | ||
tmp_dir="/tmp/", | ||
log: | ||
"{path}_{sample}.log", | ||
# Samtools takes additional threads through its option -@ | ||
threads: 8 # This value - 1 will be sent to -@. | ||
wrapper: | ||
"master/bio/samtools/sort" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not add such a generic rule to a meta-wrapper, as it can interfere with other sort rules in a workflow that uses the meta-wrapper. Rather make the rule very specific to the particular case you need here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to a fixed directory and set an appropriate rule name.
Previously, that rule was used two times. First ensuring that the initial input of the workflow gets sorted and another time later within the workflow of meta wrapper.
Now, I changed the wrapper in a way that the initial bam file is expected to be presorted as an unsorted bam-file would require the sorting rule to be generic.
Description
This adds two wrappers.
First a wrapper for rust-bio-tools consensus read calculation and second a meta wrapper which adds best practice post processing steps for consensus read calculation.
QC
For all wrappers added by this PR,
input:
andoutput:
file paths in the resulting rule can be changed arbitrarily,threads: x
statement withx
being a reasonable default,map_reads
for a step that maps reads),environment.yaml
specifications follow the respective best practices,input:
oroutput:
),Snakefile
s and their entries are explained via comments (input:
/output:
/params:
etc.),stderr
and/orstdout
are logged correctly (log:
), depending on the wrapped tool,tempfile.gettempdir()
points to (see here; this also means that using any Pythontempfile
default behavior works),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,