#!/bin/tcsh
#BSUB -J staralign_Portfolio_R #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=0.2]" #to request a node with 20MB of memory
#BSUB -o staralign_Portfolio_R_%J.out #output file
#BSUB -e staralign_Portfolio_R_%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/S23/UnityID/Portfolio/starindices
#input of sequence reads path is /share/bitcpt/S23/RawData/Glycine_max/
#output of aligned reads will go into AlignedToTranscriptome subdirectory in working directory
set STAR=/usr/local/usrapps/bitcpt/star/bin/STAR
# SET IN VARIABLES
set IN=/share/bitcpt/S23/RawData/Glycine_max
set index=starindices
set out=AlignedToTranscriptome
################################
## Young Leaf Rep 1
################################
set S=Gm_YoungLeaf_Rep1
set EN=fq.gz
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
################################
## Young Leaf Rep 2
################################
set S=Gm_YoungLeaf_Rep2
set EN=fq.gz
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
################################
## Young Leaf Rep 3
################################
set S=Gm_YoungLeaf_Rep3
set EN=fq.gz
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
################################
## Young Leaf Rep 4
################################
set S=Gm_YoungLeaf_Rep4
set EN=fq.gz
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
################################
## Young Leaf Rep 5
################################
set S=Gm_YoungLeaf_Rep5
set EN=fq.gz
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
#!/bin/tcsh
#BSUB -J staralign_Portfolio_RO #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=0.2]" #to request a node with 20MB of memory
#BSUB -o staralign_Portfolio_RO_%J.out #output file
#BSUB -e staralign_Portfolio_RO_%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/S23/UnityID/Portfolio/starindices
#input of sequence reads path is /share/bitcpt/S23/RawData/Glycine_max/
#output of aligned reads will go into AlignedToTranscriptome subdirectory in working directory
set STAR=/usr/local/usrapps/bitcpt/star/bin/STAR
# SET IN VARIABLES
set IN=/share/bitcpt/S23/RawData/Glycine_max
set index=starindices
set out=AlignedToTranscriptome
################################
## Old Leaf Rep 1
################################
set S=Gm_OldLeaf_Rep1
set EN=fq.gz
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
################################
## Old Leaf Rep 2
################################
set S=Gm_OldLeaf_Rep2
set EN=fq.gz
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
################################
## Old Leaf Rep 3
################################
set S=Gm_OldLeaf_Rep3
set EN=fq.gz
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
################################
## Old Leaf Rep 4
################################
set S=Gm_OldLeaf_Rep4
set EN=fq.gz
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
################################
## Old Leaf Rep 5
################################
set S=Gm_OldLeaf_Rep5
set EN=fq.gz
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
#!/bin/tcsh
#BSUB -J staralign_Portfolio_RM #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=0.2]" #to request a node with 20MB of memory
#BSUB -o staralign_Portfolio_RM_%J.out #output file
#BSUB -e staralign_Portfolio_RM_%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/S23/UnityID/Portfolio/starindices
#input of sequence reads path is /share/bitcpt/S23/RawData/Glycine_max/
#output of aligned reads will go into AlignedToTranscriptome subdirectory in working directory
set STAR=/usr/local/usrapps/bitcpt/star/bin/STAR
# SET IN VARIABLES
set IN=/share/bitcpt/S23/RawData/Glycine_max
set index=starindices
set out=AlignedToTranscriptome
################################
## Meristem Rep 1
################################
set S=Gm_SA_Rep1
set EN=fq.gz
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
################################
## Meristem Rep 2
################################
set S=Gm_SA_Rep2
set EN=fq.gz
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
################################
## Meristem Rep 3
################################
set S=Gm_SA_Rep3
set EN=fq.gz
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
################################
## Meristem Rep 4
################################
set S=Gm_SA_Rep4
set EN=fq.gz
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
################################
## Meristem Rep 5
################################
set S=Gm_SA_Rep5
set EN=fq.gz
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
The job script should be placed in the working directory following the path:
/share/bitcpt/S23/UnityID/Portfolio
To the run the job:
bsub <"Job name"
To check the job is running:
bjobs
The jobs will output Aligned.toTranscriptome.out.bam files to the AlignedToTranscriptome subdirectory which are needed for the quantification step.
This defines the variable STAR to be the path to the user maintained software:
set STAR=/usr/local/usrapps/bitcpt/star/bin/STAR
This defines the variable IN to be the path to the RNA sequence reads that have passed the QC step:
set IN=/share/bitcpt/S23/RawData/Glycine_max
This defines the variable index to be the starindicies directory containing the indexed reference genome:
set index=starindices
This defines the variable out to be the AlignedToTranscriptome directory, which is where the output should be placed:
set out=AlignedToTranscriptome
This tells STAR to align the reads:
--runMode alignReads
This calls the directory where the STAR index files are located:
--genomeDir ${index}
Directory/file-prefix for writing output:
--outFileNamePrefix ${out}/${S}_
This codes for the input files:
--readFilesIn ${IN}/${S}_1.${EN} ${IN}/${S}_2.${EN}
This allows for the reading of gzipped input files:
--readFilesCommand zcat
This sets the output type to an unsorted bam:
--outSAMtype BAM Unsorted
This will have STAR align all reads for a first pass, add the discovered junction sites to the genome index, and then align the reads again for a second pass:
--twopassMode Basic
(This improves the number of reads detected per splice site.)
This generates the Aligned.toTranscriptome.out.bam.file:
--quantMode TranscriptomeSAM