Commit 701cd4be authored by Yujuan Gui's avatar Yujuan Gui
Browse files

rnaseq

parent 921cf82d
#!/bin/bash
#!/bin/bash -l
#SBATCH -J paleomix
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 12
#SBATCH --ntasks-per-node=1
#SBATCH --time=48:00:00
#SBATCH -p batch
#SBATCH --qos=qos-batch
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load
if [ -f /etc/profile ]; then
. /etc/profile
fi
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
module load tools/bzip2
## script
paleomix trim_pipeline run --max-threads=10 \
--progress-ui=summary --log-file=/work/projects/daneurogen/rnaseq_201910/script/201910.log \
--adapterremoval-max-threads=10 \
--destination /work/projects/daneurogen/rnaseq_201910/data/01_paleomix \
/work/projects/daneurogen/rnaseq_201910/script/01_paleomix.yaml
\ No newline at end of file
#!/bin/bash
#!/bin/bash -l
#SBATCH -J fastqc
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 14
#SBATCH --ntasks-per-node=1
#SBATCH --time=1:00:00
#SBATCH -p batch
#SBATCH --qos=qos-batch
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load
if [ -f /etc/profile ]; then
. /etc/profile
fi
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
module load swenv/default-env/v0.1-20170602-production
module load tools/bzip2
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/01_paleomix
# fastq
parallel -j 16 "fastqc -o /work/projects/daneurogen/rnaseq_201910/analysis/00_qc/01_paleomix" ::: *.truncated.gz
#!/bin/bash
#!/bin/bash -l
#SBATCH -J sortmerna
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 6
#SBATCH --ntasks-per-node=1
#SBATCH --time=48:00:00
#SBATCH -p batch
#SBATCH --qos=qos-batch
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load
if [ -f /etc/profile ]; then
. /etc/profile
fi
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
## script
## load CMake
module load devel/CMake
## command
cd /work/projects/daneurogen/rnaseq_201910/data/01_paleomix/
for i in `find . -name "*truncated.gz"`
do
sortmerna --ref \
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/silva-bac-16s-id90.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/silva-bac-16s-id90:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/silva-bac-23s-id98.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/silva-bac-23s-id98:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/silva-arc-16s-id95.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/silva-arc-16s-id95:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/silva-arc-23s-id98.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/silva-arc-23s-id98:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/silva-euk-18s-id95.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/silva-euk-18s-id95:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/silva-euk-28s-id98.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/silva-euk-28s-id98:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/rfam-5s-database-id98.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/rfam-5s-database-id98:\
/home/users/ygui/program/sortmerna-3.0.3/rRNA_databases/rfam-5.8s-database-id98.fasta,/home/users/ygui/program/sortmerna-3.0.3/idx/rfam-5.8s-database-id98 \
--reads-gz $i \
--aligned /work/projects/daneurogen/rnaseq_201910/data/02_sortmerna/ReadswrRNA/${i}_rRNA \
--other /work/projects/daneurogen/rnaseq_201910/data/02_sortmerna/ReadsworRNA/${i}_no_rRNA \
-d /work/projects/daneurogen/rnaseq_201910/data/02_sortmerna/kvdb/${i} \
--log -a 6 -v --fastx
done
#!/bin/bash
#!/bin/bash -l
#SBATCH -J fastqc
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 14
#SBATCH --ntasks-per-node=1
#SBATCH --time=1:00:00
#SBATCH -p batch
#SBATCH --qos=qos-besteffort
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load
if [ -f /etc/profile ]; then
. /etc/profile
fi
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
module load swenv/default-env/v0.1-20170602-production
module load tools/bzip2
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/02_sortmerna/ReadsworRNA
# fastq
parallel -j 14 "fastqc -o /work/projects/daneurogen/rnaseq_201910/analysis/00_qc/02_sortmerna" ::: *.fastq
#!/bin/bash
#SBATCH -J star
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 10
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH -p batch
#SBATCH --qos=qos-besteffort
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/02_sortmerna/ReadsworRNA
for i in *.fastq
do
STEM=$(basename "${i}" truncated.gz_no_rRNA.fastq)
STAR --genomeDir /work/projects/daneurogen/genome/mouseGenomemm10/genomeIndex.GRCm38.p5/ --runThreadN 10 \
--readFilesIn $i --outFileNamePrefix /work/projects/daneurogen/rnaseq_201910/data/03_star/"${STEM}" \
--twopassMode Basic --outSAMunmapped Within \
--limitOutSJcollapsed 1000000 --limitSjdbInsertNsj 1000000 --outFilterMultimapNmax 100 --outFilterMismatchNmax 33 \
--outFilterMismatchNoverLmax 0.3 --seedSearchStartLmax 12 --alignSJoverhangMin 15 --alignEndsType Local \
--outFilterMatchNminOverLread 0 --outFilterScoreMinOverLread 0.3 --winAnchorMultimapNmax 50 \
--alignSJDBoverhangMin 3 --outFilterType BySJout --outSAMtype BAM SortedByCoordinate
done
#!/bin/bash
#SBATCH -J picard
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 1
#SBATCH --ntasks-per-node=1
#SBATCH --time=1:00:00
#SBATCH -p batch
#SBATCH --qos=qos-besteffort
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
## validate BAM files with picard
if [ -f /etc/profile ]; then
. /etc/profile
fi
# load module
module load lang/Java
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/03_star
# command
for i in *.bam
do
java -jar /home/users/ygui/program/picard.jar ValidateSamFile \
I=$i O=/work/projects/daneurogen/rnaseq_201910/analysis/00_qc/03_star_picard/$i.validated \
IGNORE=MISSING_TAG_NM IGNORE=MISSING_READ_GROUP IGNORE=READ_GROUP_NOT_FOUND IGNORE_WARNINGS=TRUE
done
\ No newline at end of file
#!/bin/bash
#SBATCH -J star_samtools
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 1
#SBATCH --ntasks-per-node=1
#SBATCH --time=1:00:00
#SBATCH -p batch
#SBATCH --qos=qos-besteffort
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load module
module load tools/bzip2
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/03_star
# samtools
for i in *.bam
do
STEM=$(basename -s .out.bam "${i}")
samtools view -c -F 260 $i > /work/projects/daneurogen/rnaseq_201910/analysis/00_qc/03_star_samtools/"${STEM}"
done
\ No newline at end of file
#!/bin/bash
#SBATCH -J q30
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 1
#SBATCH --ntasks-per-node=1
#SBATCH --time=10:00:00
#SBATCH -p batch
#SBATCH --qos=qos-batch
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load module
module load tools/bzip2
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/03_star
# samtools
for i in *.bam
do
STEM=$(basename -s .out.bam "${i}")
samtools view -b -q 30 $i > /work/projects/daneurogen/rnaseq_201910/data/04_q30/"${STEM}".q30.bam
done
\ No newline at end of file
#!/bin/bash
#SBATCH -J q30_index
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 14
#SBATCH --ntasks-per-node=1
#SBATCH --time=1:00:00
#SBATCH -p batch
#SBATCH --qos=qos-besteffort
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load module
module load tools/bzip2
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/04_q30
# samtools
parallel -j 14 "samtools index -b {}" ::: *.bam
\ No newline at end of file
#!/bin/bash
#SBATCH -J q30_samtools
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=yujuan.gui@uni.lu
#SBATCH -N 1
#SBATCH -c 1
#SBATCH --ntasks-per-node=1
#SBATCH --time=1:00:00
#SBATCH -p batch
#SBATCH --qos=qos-besteffort
echo "== Starting run at $(date)"
echo "== Job ID: ${SLURM_JOBID}"
echo "== Node list: ${SLURM_NODELIST}"
echo "== Submit dir. : ${SLURM_SUBMIT_DIR}"
# load module
module load tools/bzip2
# cd directory
cd /work/projects/daneurogen/rnaseq_201910/data/04_q30
# samtools
for i in *.bam
do
STEM=$(basename -s .bam "${i}")
samtools view -c -F 260 $i > /work/projects/daneurogen/rnaseq_201910/analysis/00_qc/04_q30_samtools/"${STEM}"
done
\ No newline at end of file
Markdown is supported
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