forked from snakemake/snakemake-wrappers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in mbhall88/snakemake-wrappers/pyfastaq-replace_bases (pull re…
…quest snakemake#92) add pyfastaq replace_bases wrapper
- Loading branch information
Showing
6 changed files
with
44 additions
and
0 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,4 @@ | ||
channels: | ||
- bioconda | ||
dependencies: | ||
- pyfastaq ==3.17.0 |
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,4 @@ | ||
name: pyfastaq replace_bases | ||
description: Replaces all occurrences of one letter with another. | ||
authors: | ||
- Michael Hall |
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,12 @@ | ||
rule replace_bases: | ||
input: | ||
"{sample}.rna.fa" | ||
output: | ||
"{sample}.dna.fa", | ||
params: | ||
old_base = "U", | ||
new_base = "T", | ||
log: | ||
"logs/fastaq/replace_bases/test/{sample}.log" | ||
wrapper: | ||
"master/bio/pyfastaq/replace_bases" |
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,2 @@ | ||
>sample1 | ||
ACGU |
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,19 @@ | ||
__author__ = "Michael Hall" | ||
__copyright__ = "Copyright 2019, Michael Hall" | ||
__email__ = "[email protected]" | ||
__license__ = "MIT" | ||
|
||
|
||
from snakemake.shell import shell | ||
|
||
|
||
log = snakemake.log_fmt_shell(stdout=False, stderr=True) | ||
|
||
shell( | ||
"fastaq replace_bases" | ||
" {snakemake.input[0]}" | ||
" {snakemake.output[0]}" | ||
" {snakemake.params.old_base}" | ||
" {snakemake.params.new_base}" | ||
" {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