This repository has been archived by the owner. It is now read-only.
-
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.
Exchanged prinseq for HTStream for QC
- Loading branch information
Showing
3 changed files
with
28 additions
and
14 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 |
---|---|---|
|
@@ -7,5 +7,5 @@ channels: | |
dependencies: | ||
- snakemake | ||
- salmon | ||
- prinseq | ||
#- htstream | ||
- fastq-multx |
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,16 +1,21 @@ | ||
def construct_htstream_partials(wildcards, log): | ||
template = 'hts_{prog} -L {log}/htstream/{sample}.txt {flags}' | ||
partials = [template.format(prog = k, log = log, flags = v, sample = wildcards.sample) for k, v in list(zip(config['htstream']['actions'], config['htstream']['flags']))] | ||
return(' | '.join(partials)) | ||
|
||
rule prinseq_clean_se_gz: | ||
rule htstream_clean_se_gz: | ||
version: "1.0" | ||
input: | ||
'{out}/{sample}.fastq.gz' | ||
output: | ||
clean = '{out}/{sample}.clean.fastq.gz', | ||
grubby = '{out}/{sample}.grubby.fastq.gz', | ||
'{out}/{sample}.clean.fastq.gz' | ||
params: | ||
flags = config['prinseq']['flags'] if 'flags' in config.get('prinseq', {}) else '' | ||
message: 'Cleaning {input} using prinseq-lite.' | ||
log: join(config['dirs']['log'], 'prinseq', 'clean-se.log') | ||
call = lambda wildcards: construct_htstream_partials(wildcards, config['dirs']['log']) | ||
message: 'Cleaning {input} using HTStream.' | ||
log: join(config['dirs']['log'], 'htstream', '{sample}.txt') | ||
threads: 4 | ||
shell: | ||
""" | ||
zcat {input} | prinseq-lite.pl -fastq -out_good {wildcards.out}/{wildcards.sample}.clean -out_bad {wildcards.out}/{wildcards.sample}.grubby -graph_data {log} {params.flags} | ||
hts_Stats -U {input} -L {log} -tO | {params.call} -p {wildcards.out}/{wildcards.sample} | ||
mv {wildcards.out}/{wildcards.sample}_SE.fastq.gz {output} | ||
""" |