Commit b195ab19 authored by peguerin's avatar peguerin
Browse files

rename path filter

parent 60295aef
### 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}'''
......@@ -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"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment