Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added samtools wrapper utils (#454)
* Added wrapper_utils, some tempdirs, extra doc, and code clean-up * Added IDX generation to test * Fixed missing import and log file * Added more log files to tests * Fixed log redirection * Added author
- Loading branch information
Showing
56 changed files
with
236 additions
and
179 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,7 @@ | ||
name: samtools calmd | ||
description: Calculates MD and NM tags. For more information see `SAMtools documentation <http://www.htslib.org/doc/samtools-calmd.html>`_. | ||
description: Calculates MD and NM tags. | ||
authors: | ||
- Filipe G. Vieira | ||
notes: | | ||
* The `extra` param allows for additional program arguments (not `-@/--threads` or `-O/--output-fmt`). | ||
* For more information see, http://www.htslib.org/doc/samtools-calmd.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,13 @@ | ||
rule samtools_calmd: | ||
input: | ||
aln = "{sample}.bam", # Can be 'sam', 'bam', or 'cram' | ||
ref = "genome.fasta" | ||
aln="{sample}.bam", # Can be 'sam', 'bam', or 'cram' | ||
ref="genome.fasta", | ||
output: | ||
"{sample}.calmd.bam" | ||
"{sample}.calmd.bam", | ||
log: | ||
"{sample}.calmd.log", | ||
params: | ||
"-E" # optional params string | ||
extra="-E", # optional params string | ||
threads: 2 | ||
wrapper: | ||
"master/bio/samtools/calmd" |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
name: samtools depth | ||
description: Compute the read depth at each position or region using samtools. For more information see `SAMtools documentation <http://www.htslib.org/doc/samtools-depth.html>`_. | ||
description: Compute the read depth at each position or region using samtools. | ||
authors: | ||
- Dayne Filer | ||
- Filipe G. Vieira | ||
notes: | | ||
* The `extra` param allows for additional program arguments (not `-@/--threads` or `-o`). | ||
* For more information see, http://www.htslib.org/doc/samtools-depth.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,13 @@ | ||
rule samtools_depth: | ||
input: | ||
bams=["mapped/A.bam", "mapped/B.bam"], | ||
bed="regionToCalcDepth.bed", # optional | ||
bed="regionToCalcDepth.bed", # optional | ||
output: | ||
"depth.txt" | ||
"depth.txt", | ||
log: | ||
"depth.log", | ||
params: | ||
# optional bed file passed to -b | ||
extra="" # optional additional parameters as string | ||
extra="", # optional additional parameters as string | ||
wrapper: | ||
"master/bio/samtools/depth" |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
name: samtools faidx | ||
description: index reference sequence in FASTA format from reference sequence. For more information see `SAMtools documentation <http://www.htslib.org/doc/samtools-faidx.html>`_. | ||
description: index reference sequence in FASTA format from reference sequence. | ||
authors: | ||
- Michael Chambers | ||
- Filipe G. Vieira | ||
input: | ||
- reference sequence file (.fa) | ||
output: | ||
- indexed reference sequence file (.fai) | ||
notes: | | ||
* The `extra` param allows for additional program arguments (not `-o`). | ||
* For more information see, http://www.htslib.org/doc/samtools-faidx.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,9 +1,11 @@ | ||
rule samtools_index: | ||
input: | ||
"{sample}.fa" | ||
"{sample}.fa", | ||
output: | ||
"{sample}.fa.fai" | ||
"{sample}.fa.fai", | ||
log: | ||
"{sample}.log", | ||
params: | ||
"" # optional params string | ||
extra="", # optional params string | ||
wrapper: | ||
"master/bio/samtools/faidx" |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ channels: | |
- bioconda | ||
dependencies: | ||
- samtools =1.14 | ||
- snakemake-wrapper-utils =0.3 |
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
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: | |
- conda-forge | ||
- defaults | ||
dependencies: | ||
- samtools==1.12 | ||
- samtools =1.14 | ||
- snakemake-wrapper-utils =0.3 |
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
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,8 +1,12 @@ | ||
name: samtools fixmate | ||
description: Use samtools to correct mate information after BWA mapping. For more information see `SAMtools documentation <http://www.htslib.org/doc/samtools-fixmate.html>`_. | ||
description: Use samtools to correct mate information after BWA mapping. | ||
authors: | ||
- Thibault Dayris | ||
- Filipe G. Vieira | ||
input: | ||
- bam or sam file (.bam,.sam) | ||
output: | ||
- bam or sam file (.bam,.sam) | ||
notes: | | ||
* The `extra` param allows for additional program arguments (not `-@/--threads` or `-O/--output-fmt`). | ||
* For more information see, http://www.htslib.org/doc/samtools-fixmate.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,13 +1,14 @@ | ||
rule samtools_fixmate: | ||
input: | ||
"mapped/{input}" | ||
"mapped/{input}", | ||
output: | ||
"fixed/{input}" | ||
"fixed/{input}", | ||
log: | ||
"{input}.log", | ||
message: | ||
"Fixing mate information in {wildcards.input}" | ||
threads: | ||
1 | ||
threads: 1 | ||
params: | ||
extra = "" | ||
extra="", | ||
wrapper: | ||
"master/bio/samtools/fixmate/" |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
name: samtools flagstat | ||
description: Use samtools to create a flagstat file from a bam or sam file. For more information see `SAMtools documentation <http://www.htslib.org/doc/samtools-flagstat.html>`_. | ||
description: Use samtools to create a flagstat file from a bam or sam file. | ||
authors: | ||
- Christopher Preusch | ||
- Filipe G. Vieira | ||
input: | ||
- bam or sam file (.bam,.sam) | ||
output: | ||
- flagstat file (.flagstat) | ||
notes: | | ||
* The `extra` param allows for additional program arguments (not `-@/--threads`). | ||
* For more information see, http://www.htslib.org/doc/samtools-flagstat.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,7 +1,11 @@ | ||
rule samtools_flagstat: | ||
input: | ||
"mapped/{sample}.bam" | ||
"mapped/{sample}.bam", | ||
output: | ||
"mapped/{sample}.bam.flagstat" | ||
"mapped/{sample}.bam.flagstat", | ||
log: | ||
"{sample}.log", | ||
params: | ||
extra="", # optional params string | ||
wrapper: | ||
"master/bio/samtools/flagstat" |
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
Oops, something went wrong.