# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=06:00:00
#PBS -lnodes=1:ppn=16:mem64gb

module load tophat
module load bowtie/2.1.0
module load boost/1.51
module load cufflinks/2.2.1

#cuffdiff ~/Fabienne/Yeast_analysis/reference.gtf

cuffmerge -g ~/Fabienne/Yeast_analysis/reference.gtf -s ~/data/RNA_seq/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/WholeGenomeFasta/genome.fa -p 16 /home/sdemo046/Fabienne/Yeast_analysis/assemblies.txt
~

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=120:00:00
#PBS -lnodes=1:ppn=16:mem64gb

module load tophat
module load bowtie/2.1.0
module load boost/1.51
module load cufflinks/2.2.1

cuffdiff -o diff_out -b /home/sdemo046/data/RNA_seq/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/genome.fa -p 16 -L RE,CMS -u /home/sdemo046/Marly/Yeast_analysis/RNAseq/merged_asm/merged.gtf /home/sdemo046/Marly/Yeast_analysis/RNAseq/tophat_out/accepted_hits.bam,/home/sdemo046/Marly/Yeast_analysis/RNAseq1/tophat_out/accepted_hits.bam,/home/sdemo046/Marly/Yeast_analysis/RNAseq2/tophat_out/accepted_hits.bam, /home/sdemo046/Marly/Yeast_analysis/RNAseq3/tophat_out/accepted_hits.bam,/home/sdemo046/Marly/Yeast_analysis/RNAseq4/tophat_out/accepted_hits.bam,/home/sdemo046/Marly/Yeast_analysis/RNAseq5/tophat_out/accepted_hits.bam

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=06:00:00
#PBS -lnodes=1:ppn=16:mem64gb

module load tophat
module load bowtie/2.1.0
module load boost/1.51
module load cufflinks/2.2.1

cd ~/Marly/Yeast_analysis/RNAseq

#tophat --no-coverage-search --b2-very-fast ~/data/RNA_seq/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/genome SRR453566_1.fastq SRR453566_2.fastq

#cufflinks --output-dir cufflinks --num-threads 16 tophat_out/accepted_hits.bam

cuffmerge -g ~/Marly/Yeast_analysis/reference.gtf  -s ~/data/RNA_seq/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/genome.fa -p 16 ~/Marly/Yeast_analysis/assemblies.txt

# data[].attributes.body
#!/bin/bash

#PBS -lwalltime=06:00:00

#PBS -lnodes=1:ppn=16:mem64gb

module load tophat

module load bowtie/2.1.0

module load boost/1.51

module load cufflinks/2.2.1

cd ~/yeast_analysis/fastq/571/

#tophat --no-coverage-search --b2-very-fast ~/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/genome SRR453571_1.fastq SRR453571_2.fastq

cufflinks --output-dir cufflinks --num-threads 16 tophat_out/accepted_hits.bam

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=15:00:00
#PBS -lnodes=1:ppn=16:mem64gb

module load tophat
module load bowtie/2.1.0
module load boost/1.51
module load cufflinks/2.2.1

cd ~/yeast_analysis/fastq/566/

#tophat --no-coverage-search --b2-very-fast ~/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/genome SRR453566_1.fastq SRR453566_2.fastq

cufflinks --output-dir cufflinks --num-threads 16 tophat_out/accepted_hits.bam

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=00:05:00
#PBS -lnodes=1:pnn=16:mem64gb

# 1, load blast
module load blast

# 2, go to directory
cd ~/YeastAnalysis/batch_blast

# 4, run formatdb
formatdb -p F -i S288C_Chromosome_II.fsa -n chromosome_II

# 5, run blast
blastn -db chromosome_II -query query_file_chr2.txt -outfmt 6 -out result.out.ta
ble

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=120:00:00
#PBS -lnodes=1:ppn=16:mem64gb

module load tophat
module load bowtie/2.1.0
module load boost/1.51
module load cufflinks/2.2.1

cuffdiff -o diff_out -b /home/sdemo046/data/RNA_seq/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/gen
ome.fa -p 16 -L RE,CMS -u /home/sdemo046/mickey/Yeast_analysis/merged_asm/merged.gtf /home/sdemo046/mickey/Yeast_an
alysis/fastq/566/accepted_hits.bam,/home/sdemo046/mickey/Yeast_analysis/fastq/567/accepted_hits.bam,/home/sdemo046/
mickey/Yeast_analysis/fastq/568/accepted_hits.bam, /home/sdemo046/mickey/Yeast_analysis/fastq/569/accepted_hits.bam
,/home/sdemo046/mickey/Yeast_analysis/fastq/570/accepted_hits.bam,/home/sdemo046/mickey/Yeast_analysis/fastq/571/ac
cepted_hits.bam

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=6:00:00
#PBS -lnodes=1:ppn=16:mem64gb

module load cufflinks
module load boost/1.51

# CHANGE THIS #
# number of sample
NUM=566
# map containing maps of samples
DATADIR=~/workshop/session6/out
###############

DATADIR=$DATADIR/$NUM/tophat_out

cp -r $DATADIR $TMPDIR
DATADIR=$TMPDIR/tophat_out

mkdir $TMPDIR/out
cd $TMPDIR/out

cufflinks --output-dir . --num-threads 16 $DATADIR/accepted_hits.bam

mkdir ~/workshop/session7/out/num
cp -r $TMPDIR/out ~/workshop/session6/out/$NUM

# data[].attributes.body
#!/bin/bash
#PBS -lwalltime=06:00:00
# -lnodes=1:ppn=16:mem64gb

module load tophat
module load bowtie/2.1.0
module load boost/1.51
module load cufflinks/2.2.1

cd ~/yeast_analysis/fastq/566/

cufflinks --output-dir cufflinks --num-threads 16 tophat_out/accepted_hits.bam