From 51abdcdb26e9da5b7d74b0f2626e56d3cbfa254d Mon Sep 17 00:00:00 2001 From: Jos van Nijnatten Date: Mon, 15 Feb 2021 16:48:39 +0100 Subject: [PATCH] Trimmomatic update (simplified) --- rnaseq/step2_trim/snippet.sh | 60 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/rnaseq/step2_trim/snippet.sh b/rnaseq/step2_trim/snippet.sh index 810c087..ebf0200 100644 --- a/rnaseq/step2_trim/snippet.sh +++ b/rnaseq/step2_trim/snippet.sh @@ -1,36 +1,36 @@ -## this script is to generate jobs of trimming for each samples on the cluster -## please run this script first and then submit the jobs for each samples -## reference: http://www.usadellab.org/cms/?page=trimmomatic - #!/bin/bash -# $1 indicates the path of raw samples. -# In the input folder, one sample has one independent folder with two pair-end f -astq files. -# The folder name should be the sample name. -# the fastq file should be sample_1.fastq and sample_2.fastq -# please prepare a sample.list that include file names for each sample -out="/ * your output folder * /" -input="/ * your input folder * /" -cat sample.list | while read line +# reference: http://www.usadellab.org/cms/?page=trimmomatic -do -sample=$(echo $line) -echo '#!/bin/bash' > rnaseq.${sample}.sh -echo "#SBATCH --job-name=RNAseq.${sample}" >> rnaseq.${sample}.sh -echo "#SBATCH --error=RNAseq.${sample}.err" >> rnaseq.${sample}.sh -echo "#SBATCH --output=RNAseq.${sample}.out" >> rnaseq.${sample}.sh -echo "#SBATCH --mem=15gb" >> rnaseq.${sample}.sh -echo "#SBATCH --time=6:00:00" >> rnaseq.${sample}.sh -echo "#SBATCH --cpus-per-task=6" >> rnaseq.${sample}.sh -echo "ml Java" >>rnaseq.${sample}.sh +module load Trimmomatic -echo "java -jar /* your folder of software */trimmomatic-0.36.jar PE \ - -phred33 /$input/${sample}\_1.fq.gz /$input/${sample}\_2.fq.gz \ - $out/trimmomatic/${sample}\_1_paired.fq $out/trimmomatic/${sample}\_1_unpaired.fq \ - $out/trimmomatic/${sample}\_2_paired.fq $out/trimmomatic/${sample}\_2_unpaired.fq \ - ILLUMINACLIP: TruSeq3-PE.fa:2:30:10 \ - LEADING:3 TRAILING:3 SLIDINGWINDOW:4:25 HEADCROP:8 MINLEN:50" >> rnaseq.${sample}.sh -done \ No newline at end of file +# (Example) Paired end +java -jar $EBROOTTRIMMOMATIC/trimmomatic.jar PE \ + -phred33 \ + input_forward.fq.gz \ + input_reverse.fq.gz \ + output_forward_paired.fq.gz \ + output_forward_unpaired.fq.gz \ + output_reverse_paired.fq.gz \ + output_reverse_unpaired.fq.gz \ + ILLUMINACLIP: TruSeq3-PE.fa:2:30:10 \ + LEADING:3 \ + TRAILING:3 \ + SLIDINGWINDOW:4:25 \ + HEADCROP:8 \ + MINLEN:50 + + +# (Example) Single end +java -jar $EBROOTTRIMMOMATIC/trimmomatic.jar SE \ + -phred33 \ + input.fq.gz \ + output.fq.gz \ + ILLUMINACLIP:TruSeq3-SE:2:30:10 \ + LEADING:3 \ + TRAILING:3 \ + SLIDINGWINDOW:4:15 \ + HEADCROP:8 \ + MINLEN:50