-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use snakemake-wrapper-utils, allow more inputs * update bcftools version * update description * add wrapper-utils to environment * update test * snakefmt test * update tests * add parsing of extra params * add files necessary for subsetting test * make environment compliant * remove conda-forge dependency * add comments to Snakefile * readd conda-forge
- Loading branch information
Showing
7 changed files
with
116 additions
and
11 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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
name: bcftools view | ||
description: View vcf/bcf file in a different format. For more information see `BCFtools documentation <https://www.htslib.org/doc/bcftools.html#view>`_. | ||
description: View vcf/bcf file in a different format. | ||
authors: | ||
- Johannes Köster | ||
- Nikos Tsardakas Renhuldt | ||
input: | ||
- VCF/BCF file | ||
output: | ||
- Filtered VCF/BCF file | ||
notes: | | ||
* The `uncompressed_bcf` param allows to specify that a BCF output should be uncompressed (ignored otherwise). | ||
* The `bcftools_use_mem` param controls whether to pass the resources.mem_mb to bcftools | ||
* The `extra` param allows for additional program arguments (not `--threads, `-O/--output-type`, `-m/--max-mem`, or `-T/--temp-dir`). | ||
* For more information see, https://samtools.github.io/bcftools/bcftools.html |
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,11 +1,67 @@ | ||
rule bcf_to_vcf: | ||
rule bcf_view_sample_file: | ||
input: | ||
bcf="{prefix}.bcf" | ||
"{prefix}.bcf", # input bcf/vcf needs to be first input | ||
index="{prefix}.bcf.csi", # other inputs are optional | ||
samples="samples.txt", | ||
output: | ||
vcf="{prefix}.vcf" | ||
"{prefix}.view_sample.vcf", | ||
log: | ||
"log/{prefix}.view_sample.vcf.log", | ||
params: | ||
# optional extra parameters | ||
extra=lambda w, input: f"-S {input.samples}", | ||
wrapper: | ||
"master/bio/bcftools/view" | ||
|
||
|
||
rule bcf_view_o_vcf: | ||
input: | ||
"{prefix}.bcf", | ||
output: | ||
"{prefix}.view.vcf", | ||
log: | ||
"log/{prefix}.view.vcf.log", | ||
params: | ||
extra="", | ||
wrapper: | ||
"master/bio/bcftools/view" | ||
|
||
|
||
rule bcf_view_o_vcf_gz: | ||
input: | ||
"{prefix}.bcf", | ||
output: | ||
"{prefix}.view.vcf.gz", | ||
log: | ||
"log/{prefix}.view.vcf.gz.log", | ||
params: | ||
extra="", | ||
wrapper: | ||
"master/bio/bcftools/view" | ||
|
||
|
||
rule bcf_view_o_bcf: | ||
input: | ||
"{prefix}.bcf", | ||
output: | ||
"{prefix}.view.bcf", | ||
log: | ||
"log/{prefix}.view.bcf.log", | ||
params: | ||
"" # optional parameters for bcftools view (except -o) | ||
extra="", | ||
wrapper: | ||
"master/bio/bcftools/view" | ||
|
||
|
||
rule bcf_view_o_uncompressed_bcf: | ||
input: | ||
"{prefix}.bcf", | ||
output: | ||
"{prefix}.view.uncompressed.bcf", | ||
log: | ||
"logs/{prefix}.log" | ||
"log/{prefix}.view.uncompressed.bcf.log", | ||
params: | ||
uncompressed_bcf=True, | ||
extra="", | ||
wrapper: | ||
"master/bio/bcftools/view" |
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 @@ | ||
A |
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