Trimmomatic update (simplified)

This commit is contained in:
Jos van Nijnatten 2021-02-15 16:48:39 +01:00
parent 4c52527340
commit 51abdcdb26
1 changed files with 30 additions and 30 deletions

View File

@ -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
# (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