Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
edna
snakemake_only_obitools
Commits
b195ab19
Commit
b195ab19
authored
Nov 14, 2019
by
peguerin
Browse files
rename path filter
parent
60295aef
Changes
2
Hide whitespace changes
Inline
Side-by-side
00-rules/filtered.smk
View file @
b195ab19
### dereplicate reads into uniq sequences
rule dereplicate_samples:
input:
'
02-demultiplex/02-
01-raw/{sample}.fasta'
'01-raw/{sample}.fasta'
output:
'02-
demultiplex/02-02-
filtered/{sample}.uniq.fasta'
'02-filtered/{sample}.uniq.fasta'
log:
'log/dereplicate_samples/{sample}.log'
'
../99-
log/
05-
dereplicate_samples/{sample}.log'
shell:
'''obiuniq -m sample {input} > {output} 2> {log}'''
### only sequence more than 20bp with no ambiguity IUAPC with total coverage greater than 10 reads
rule goodlength_samples:
input:
'02-
demultiplex/02-02-
filtered/{sample}.uniq.fasta'
'02-filtered/{sample}.uniq.fasta'
output:
'02-
demultiplex/02-02-
filtered/{sample}.l.u.fasta'
'02-filtered/{sample}.l.u.fasta'
log:
'log/goodlength_samples/{sample}.log'
'
../99-
log/
06-
goodlength_samples/{sample}.log'
params:
count=config["good_length_samples"]["count"],
seq_length=config["good_length_samples"]["seq_length"]
...
...
@@ -26,11 +26,11 @@ rule goodlength_samples:
### Clean the sequences for PCR/sequencing errors (sequence variants)
rule clean_pcrerr_samples:
input:
'02-
demultiplex/02-02-
filtered/{sample}.l.u.fasta'
'02-filtered/{sample}.l.u.fasta'
output:
'02-
demultiplex/02-02-
filtered/{sample}.r.l.u.fasta'
'02-filtered/{sample}.r.l.u.fasta'
log:
'log/clean_pcrerr/{sample}.log'
'
../99-
log/
07-
clean_pcrerr/{sample}.log'
params:
r=config["clean_pcrerr_samples"]["r"]
shell:
...
...
@@ -39,11 +39,11 @@ rule clean_pcrerr_samples:
### Remove sequence which are classified as 'internal' by obiclean
rule rm_internal_samples:
input:
'02-
demultiplex/02-02-
filtered/{sample}.r.l.u.fasta'
'02-filtered/{sample}.r.l.u.fasta'
output:
'
02-demultiplex/02-
03-cleaned/{sample}.c.r.l.u.fasta'
'03-cleaned/{sample}.c.r.l.u.fasta'
log:
'log/rm_internal_samples/{sample}.log'
'
../99-
log/
08-
rm_internal_samples/{sample}.log'
shell:
'''obigrep -p 'obiclean_internalcount == 0' {input} > {output} 2> {log}'''
02-demultiplex/Snakefile
View file @
b195ab19
...
...
@@ -10,10 +10,10 @@ rule all:
expand('02-filtered/{sample}.l.u.fasta',sample=SAMPLES),
expand('02-filtered/{sample}.r.l.u.fasta',sample=SAMPLES),
expand('03-cleaned/{sample}.c.r.l.u.fasta',sample=SAMPLES),
expand('../99-log/dereplicate_samples/{sample}.log',sample=SAMPLES),
expand('../99-log/goodlength_samples/{sample}.log',sample=SAMPLES),
expand('../99-log/clean_pcrerr/{sample}.log',sample=SAMPLES),
expand('../99-log/rm_internal_samples/{sample}.log',sample=SAMPLES)
expand('../99-log/
05-
dereplicate_samples/{sample}.log',sample=SAMPLES),
expand('../99-log/
06-
goodlength_samples/{sample}.log',sample=SAMPLES),
expand('../99-log/
07-
clean_pcrerr/{sample}.log',sample=SAMPLES),
expand('../99-log/
08-
rm_internal_samples/{sample}.log',sample=SAMPLES)
include: "../00-rules/filtered.smk"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment