Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added wrapper for bcftools stats (#201)
* added wrapper for bcftools stats * added test case, updated bcftools version * formatted wrapper with black * added bcftools stats test case * updated test output, added log * corrected name of input in bcftools_stats test wrapper Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
6b4d6a1
commit 2caecb9
Showing
6 changed files
with
46 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
dependencies: | ||
- bcftools ==1.12 |
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,9 @@ | ||
name: bcftools stats | ||
description: Generate VCF stats using bcftools stats. | ||
url: https://github.com/samtools/bcftools | ||
authors: | ||
- William Rowell | ||
input: | ||
- BCF, VCF, or VCF.gz input | ||
output: | ||
- stats text file |
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,11 @@ | ||
rule bcf_stats: | ||
input: | ||
"{prefix}" | ||
output: | ||
"{prefix}.stats.txt" | ||
log: | ||
"{prefix}.bcftools.stats.log" | ||
params: | ||
"" | ||
wrapper: | ||
"master/bio/bcftools/stats" |
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,18 @@ | ||
__author__ = "William Rowell" | ||
__copyright__ = "Copyright 2020, William Rowell" | ||
__email__ = "wrowell@pacb.com" | ||
__license__ = "MIT" | ||
|
||
|
||
from snakemake.shell import shell | ||
|
||
# bcftools takes additional decompression threads through --threads | ||
# Other threads are *additional* threads passed to the '--threads' argument | ||
threads = ( | ||
"" if snakemake.threads <= 1 else " --threads {} ".format(snakemake.threads - 1) | ||
) | ||
log = snakemake.log_fmt_shell(stdout=False, stderr=True) | ||
|
||
shell( | ||
"bcftools stats {threads} {snakemake.params} {snakemake.input} > {snakemake.output} {log}" | ||
) |
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