In this section, I am going to be using STAR to run alignments to my reference genome. This is important to move forward with quantification and analysis as the reference genome functions as our "base" and the "normal" condition to my samples and do comparison.
#!/bin/tcsh
#BSUB -J Cher_staralign #job name
#BSUB -n 12 #number of threads
#BSUB -W 10:0 #time for job to complete
#BSUB -R span[hosts=1] #to keep tasks on one node
#BSUB -R "rusage[mem=20000]" #to request a node with 20MB of memory
#BSUB -o Cher_staralign_%J.out #output file
#BSUB -e Cher_staralign_%J.err #error file
#to align RNA-seq reads to indexed genome using STAR
#STAR cannot make use of HPC MPI, must have -R options to set 1 node & memory
#set threads under 12 on Henry2
#input of indexed genome path is /share/bitcpt/Fall2022/UNITYID/Portfolio/starindices
#input of sequence reads path is /share/bitcpt/Fall2022/CleanData/Solanum_lycopersicum/
#output of aligned reads will go into AlignedToTranscriptome subdirectory in working directory
#make sure and always double check you are in the Portfolio directory
module load conda
conda activate /usr/local/usrapps/bitcpt/star
# SET IN VARIABLES
set IN=/share/bitcpt/Fall2022/CleanData/Solanum_lycopersicum
set index=starindices
set out=AlignedToTranscriptome
################################
## Leaf Rep 1
################################
# RNA-seq data are in format Sl_Leaf_Rep1_3X_1.fp.fq.gz
set S=Sl_Leaf_Rep1_3X
set EN=fp.fq.gz
# Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
################################
## Leaf Rep 2
################################
# RNA-seq data are in format Sl_Leaf_Rep2_3X_1.fp.fq.gz
set S=Sl_Leaf_Rep2_3X
set EN=fp.fq.gz
# Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
################################
## Leaf Rep 3
################################
# RNA-seq data are in format Sl_Leaf_Rep3_3X_1.fp.fq.gz
set S=Sl_Leaf_Rep3_3X
set EN=fp.fq.gz
# Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
################################
## SAM Rep 1
################################
#RNA-seq data are in format Sl_SAM_Rep1_3X_1.fp.fq.gz
set S=Sl_SAM_Rep1_3X
set EN=fp.fq.gz
#Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
################################
## SAM Rep 2
################################
#RNA-seq data are in format Sl_SAM_Rep2_3X_1.fp.fq.gz
set S=Sl_SAM_Rep2_3X
set EN=fp.fq.gz
#Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
################################
## SAM Rep 3
################################
#RNA-seq data are in format Sl_SAM_Rep3_3X_1.fp.fq.gz
set S=Sl_SAM_Rep3_3X
set EN=fp.fq.gz
#Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
################################
## SAM Rep 4
################################
#RNA-seq data are in format Sl_SAM_Rep4_3X_1.fp.fq.gz
set S=Sl_SAM_Rep4_3X
set EN=fp.fq.gz
#Print the file name to make sure it is right
echo ${IN}/${S}_1.${EN}
STAR --runThreadN 12 --runMode alignReads --genomeDir ${index} --outFileNamePrefix ${out}/${S}_ --readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN} --readFilesCommand zcat --outSAMtype BAM Unsorted --twopassMode Basic --quantMode TranscriptomeSAM
First picture is the AlignedToTranscriptome output for my Tom Script. The second picture is output for my Cher script.