Skip to content

Commit

Permalink
sufix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoqing Fang committed Jan 21, 2020
1 parent 0b4d57f commit dcbfee2
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ workdir: "/home/fangzq/projects/bulk"
scripts: "/home/fangzq/github/snakeflow/scripts"

# Full path to a folder that holds all of your FASTQ files
fastq_dir: "/home/mwang024/ARPKD/Data/bulk"
fastq_dir: "/data/bases/shared/bulk_RNA_seq/30_225476525_trim"



Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions rules/fastp.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
rule trim_galore:
input:
r1=join(FASTQ_RAW,"{sample}_R1.fastq.gz"),
r2=join(FASTQ_RAW,"{sample}_R2.fastq.gz"),
output:
r1=join(FASTQ_CLEAN, "{sample}_R1_val_1.fastq.gz"),
r2=join(FASTQ_CLEAN, "{sample}_R2_val_2.fastq.gz"),

log: "logs/trim-galore/${sample}.trimgalore.log"
params:
outdir="fastq_clean",
fastqc_outdir="qc/fastqc_clean"
shell:
"trim_galore -q 20 --phred33 --stringency 1 -e 0.1 --length 50 --paired "
"-o {params.outdir} {input.r1} {input.r2} > {log}"

rule trimmonatic:
input:
r1=join(FASTQ_RAW, "{sample}_R1.fastq.gz"),
r2=join(FASTQ_RAW, "{sample}_R2.fastq.gz"),
adap=config['adaptors']['illumina']
output:
r1=join(FASTQ_CLEAN, "{sample}_R1_val_1.fastq.gz"),
r2=join(FASTQ_CLEAN, "{sample}_R2_val_2.fastq.gz"),
r1up=join(FASTQ_CLEAN, "{sample}_R1_val_upparied_1.fastq.gz"),
r2up=join(FASTQ_CLEAN, "{sample}_R1_val_upparied_2.fastq.gz)"
log: "logs/trimmonatic/${sample}.trimmonatic.log"
thread: 8
shell:
"trimmomatic PE -threads {thread} -phred33 {output.r1} {ouput.upr1} {output.r2} {ouput.upr2} "
"LLUMINACLIP:{input.adap}:2:30:10 LEADING:10 TRAILING:20 SLIDINGWINDOW:4:25 MINLEN:50 "
"| tee {log} "

rule fastp:
input:
r1=join(FASTQ_RAW, "{sample}_R1.fastq.gz"),
r2=join(FASTQ_RAW, "{sample}_R2.fastq.gz"),
output:
r1=join(FASTQ_CLEAN, "{sample}_R1.fastq.gz"),
r2=join(FASTQ_CLEAN, "{sample}_R2.fastq.gz"),
tread: 8
params:
log: "logs/fastp/${sample}.fastp.log"
shell:
"fastp -q 20 --thread {thread} -i {input.r1} -I {input.r2} -o {output.r1} -O {output.r2} --html {wildcards.sample}.html 2> {log}"
14 changes: 13 additions & 1 deletion rules/trim_reads.rules
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,16 @@ rule trimmonatic:
shell:
"trimmomatic PE -threads {thread} -phred33 {output.r1} {ouput.upr1} {output.r2} {ouput.upr2} "
"LLUMINACLIP:{input.adap}:2:30:10 LEADING:10 TRAILING:20 SLIDINGWINDOW:4:25 MINLEN:50 "
"| tee {log} "
"| tee {log} "

rule fastp:
input:
r1=join(FASTQ_RAW, "{sample}_R1.fastq.gz"),
r2=join(FASTQ_RAW, "{sample}_R2.fastq.gz"),
output:
r1=join(FASTQ_CLEAN,"{sample}_R1.fastq.gz"),
r2=join(FASTQ_CLEAN,"{sample}_R2.fastq.gz"),
tread: 8
log: "logs/fastp/${sample}.fastp.log"
shell:
"fastp -q 20 --thread {thread} -i {input.r1} -I {input.r2} -o {output.r1} -O {output.r2} 2> {log}"
File renamed without changes.
File renamed without changes.

0 comments on commit dcbfee2

Please sign in to comment.