The STAR software is used to index the Glycine Max Williams 82 ISU01 Assembly v2 reference genome for this project.
The following code was run from the /share/bitcpt/S23/{UnityID}/Portfolio . The header in green gives instructions to the scheduler. Next, the set commands assign paths to the STAR executable and the directory where our reference genome is in, respectively. The last line is the command where we call the STAR executable in indexing mode and supply paths to our input genome .fa files and the genome annotations .gtf file.
#!/bin/tcsh
#BSUB -J starindices_Portfolio_ajlovele #job name
#BSUB -n 10 #number of nodes
#BSUB -W 2:0 #time for job to complete
#BSUB -o ./logs/index/starindices.out.%J #output file
#BSUB -e ./logs/index/starindices.err.%J #error file
# For running star to generate genome index
# Run in working directory /share/bitcpt/S23/UnityID/Portfolio
# Must run this in working directory with subdirectory named starindices/
set STAR=/usr/local/usrapps/bitcpt/star/bin/STAR
set genome_path=/share/bitcpt/S23/referenceGenomes/Portfolios/Glycine_max_Wm82-ISU01_v2/glyma.Wm82_ISU01.gnm2.JFPQ.genome_main.fna
set annotations_path=/share/bitcpt/S23/referenceGenomes/Portfolios/Glycine_max_Wm82-ISU01_v2/glyma.Wm82_ISU01.gnm2.ann1.FGFB.gene_models_main.AGAT.gtf
${STAR} --runThreadN 10 --runMode genomeGenerate --genomeSAindexNbases 13 --genomeDir starindices/ --genomeFastaFiles ${genome_path} --sjdbGTFfile ${annotations_path} --sjdbOverhang 100
First In the directory where you want to make the script type
cat > jobname.sh
Your file for this step can be called starindices.sh
Hit enter. There should appear a blank space.
You can now paste the script from your clipboard with right click.
Once the script is pasted in, hit the 'ctrl' and 'c' keys at the same time to save and exit.
Second you can submit a job to the LSF
bsub < job.sh
example: bsub <starindices.sh
bsub without <job.sh will take you into a loop where you will need to "kill" your job with bkill job#
You can check the status of the job with bjobs
You must wait until this job has finished and check for any error by look into the .out and .err files that are created after the jobs is submitted.
Next we can move on to the STAR alignment step which will take up to six hours to complete.