Closed RaymondS1 closed 4 years ago
Trimming
for f1 in /staton/projects/alternative_splicing/peach/raw_reads/FastqGZ/*_R1_001.fastq
do
f2=`sed 's/_R1/_R2/' <(echo $f1)`
BASE1=$( basename $f1 | sed 's/.fastq*//g')
BASE2=$( basename $f2 | sed 's/.fastq*//g')
echo "f1 $f1"
echo "f2 $f2"
echo "BASE1 $BASE1"
echo "BASE2 $BASE2"
module load java/jdk8u181
java -jar /staton/software/Trimmomatic-0.38/trimmomatic-0.38.jar PE -phred33 $f1 $f2 $BASE1.paired.trim.fastq $BASE1.unpaired.trim.fastq $BASE2.paired.trim.fastq $BASE2.unpaired.trim.fastq ILLUMINACLIP:/staton/software/Trimmomatic-0.38/adapters/all.fa:2:40:15 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36
done
HISAT
/staton/software/hisat2-2.1.0/hisat2 -p 8 --dta -x /staton/projects/alternative_splicing/peach/raw_reads/Prunus_persica_v2.0.a1_scaffolds.fasta -1
/staton/projects/alternative_splicing/peach/skewer/D7-1_CCGTCC_L007_R1_001.fastq-trimmed-pair1.fastq -2 /staton/projects/alternative_splicing/peach/skewer/D7-1_CCGTCC_L007_R1_001.fastq-trimmed-pair2.fastq -S ERR188044_chrX.sam$
HISAT2
for f1 in /staton/projects/alternative_splicing/peach/skewer/*-pair1.fastq
do
f2=$(echo $f1 | sed 's/pair1/pair2/g')
prefix=$( basename $f1 | sed 's/-pair1.fastq//g')
echo "f1 $f1"
echo "f2 $f2"
echo "base $prefix"
/staton/software/hisat2-2.1.0/hisat2 \
-p 8 \
-x /staton/projects/alternative_splicing/peach/HISAT \
--dta \
-1 $f1 \
-2 $f2 \
-S ./4_AS_HISAT/$prefix.sam \
>& ./4_AS_HISAT/$prefix.output
done
SAM to BAM
for SAMPLE in *sam
do
prefix=$( basename $SAMPLE | sed 's/-trimmed.sam//g')
echo "sam $SAMPLE"
echo "sample $prefix"
samtools sort \
-@ 8 \
-o sorted_bam/$prefix.bam \
$SAMPLE
done
StringTie
for file in /staton/projects/alternative_splicing/peach/HISAT/4_AS_HISAT/sorted_bam/*.bam
do
prefix=$( basename $file | sed 's/.chr1.bam//g')
echo "sample $prefix"
/staton/software/stringtie-2.0.6.Linux_x86_64/stringtie \
-p 8 \
-G /staton/projects/alternative_splicing/peach/HISAT/Prunus_persica_v2.0.a1.gene.gtf \
-o StringTie/$prefix.chr1.gtf \
-l $prefix \
$file
done
staton/software/stringtie-2.0.6.Linux_x86_64/stringtie --merge -p 8 -G /staton/projects/alternative_splicing/peach/HISAT/Prunus_persica_v2.0.a1.gene.gtf -o stringtie_merged.gtf mergelist.txt
Count Tables
for file in /staton/projects/alternative_splicing/peach/HISAT/4_AS_HISAT/sorted_bam/*.bam
do
prefix=$( basename $file | sed 's/.chr1.bam//g')
echo "sample $prefix"
/staton/software/stringtie-2.0.6.Linux_x86_64/stringtie -e -B -p 8 -G /staton/projects/alternative_splicing/peach/StringTie/StringTie/stringtie_merged.gtf -o ./$prefix.count.gtf $file
done
suppa.py generateEvents -i stringtie_merged.gtf -o events/T3-1/T3-1 -f ioe -e SE SS MX RI FL
/staton/software/STAR-2.6.1a/bin/Linux_x86_64/STAR \
--runMode genomeGenerate \
--genomeDir /staton/projects/alternative_splicing/peach_STAR_test/raw_reads \
--genomeFastaFiles /staton/projects/alternative_splicing/peach_STAR_test/raw_reads/Prunus_persica_v2.0.a1_scaffolds.fasta \
--sjdbGTFfile /staton/projects/alternative_splicing/peach_STAR_test/raw_reads/Prunus_persica_v2.0.a1.gene.gff3 \
--sjdbGTFtagExonParentTranscript Parent \
--sjdbGTFfeatureExon CDS \
--sjdbOverhang 100 &
for f in /staton/projects/alternative_splicing/peach_STAR_test/skewer/*.log
do
BASE=$( basename $f | sed 's/.log*//g')
echo "BASE $BASE"
/staton/software/STAR-2.6.1a/STAR \
--genomeDir /staton/projects/alternative_splicing/peach_STAR_test/star/indexing/genomeDir \
--readFilesIn /staton/projects/alternative_splicing/peach_STAR_test/skewer/$BASE-pair1.fastq /staton/projects/alternative_splicing/peach_STAR_test/skewer/$BASE-pair2.fastq \
--outSAMtype BAM SortedByCoordinate \
--outFileNamePrefix $BASE. &
done
StringTie
for file in /staton/projects/alternative_splicing/peach_STAR_test/star/alignment/*.bam
do
prefix=$( basename $file | sed 's/.chr1.bam//g')
echo "sample $prefix"
/staton/software/stringtie-2.0.6.Linux_x86_64/stringtie \
-p 8 \
-G /staton/projects/alternative_splicing/peach_STAR_test/raw_reads/Prunus_persica_v2.0.a1.gene.gtf \
-o StringTie/$prefix.chr1.gtf \
-l $prefix \
$file
done
staton/software/stringtie-2.0.6.Linux_x86_64/stringtie --merge -p 8 -G /staton/projects/alternative_splicing/peach_STAR_test/raw_reads/Prunus_persica_v2.0.a1.gene.gtf -o stringtie_merged.gtf mergelist.txt
for file in /staton/projects/alternative_splicing/peach_STAR_test/star/alignment/*.bam
do
prefix=$( basename $file | sed 's/.chr1.bam//g')
echo "sample $prefix"
/staton/software/stringtie-2.0.6.Linux_x86_64/stringtie -e -B -p 8 -G /staton/projects/alternative_splicing/peach_STAR_test/star/StringTie/StringTie/stringtie_merged.gtf -o 6_AS_count/$prefix.count.gtf $file
done
Focusing on T3 and D7