The next step in the analysis is to quantify our alignments against a transcriptome with the SALMON software
#!/bin/tcsh
#BSUB -J salmonquant_Portfolio #job name
#BSUB -n 12 #number of threads
#BSUB -W 5:0 #time for job to complete
#BSUB -R "rusage[mem=0.2]" #to request a node with 0.2 GB of memory
#BSUB -o salmonquant_Portfolio.%J.out #output file
#BSUB -e salmonquant_Portfolio.%J.err #error file
#to quantify aligned reads using salmon in quasi indexing mode
#set threads under 12 on Hazel
#working directory path is /share/bitcpt/S23/ajlovele/Portfolio
#input of aligned reads path is /share/bitcpt/S23/ajlovele/Portfolio/AlignedToTranscriptome
#output of aligned reads will go into salmon_align_quant subdirectory in working directory
##########################
# Set the variables
##########################
set SALMON=/usr/local/usrapps/bitcpt/salmon/bin/salmon
set cdna=/share/bitcpt/S23/referenceGenomes/Portfolios/Glycine_max_Wm82-ISU01_v2/glyma.Wm82_ISU01.gnm2_transcriptome.fasta
set IN=/share/bitcpt/S23/ajlovele/Portfolio/AlignedToTranscriptome
##########################
##########################
set s=Gm_OldLeaf_Rep1
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_OldLeaf_Rep2
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_OldLeaf_Rep3
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_OldLeaf_Rep4
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_OldLeaf_Rep5
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_SA_Rep1
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_SA_Rep2
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_SA_Rep3
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_SA_Rep4
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_SA_Rep5
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_YoungLeaf_Rep1
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_YoungLeaf_Rep2
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_YoungLeaf_Rep3
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_YoungLeaf_Rep4
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
##########################
##########################
set s=Gm_YoungLeaf_Rep5
${SALMON} quant -l A -a ${IN}/${s}_Aligned.toTranscriptome.out.bam --targets ${cdna} -o salmon_align_quant/${s}.quant
The code in the script can be broken down into two general parts. In one part, we define the SALMON, cdna, and IN. variables. These store paths to the salmon executable, our soybean transcriptome file, and the path to the folder that holds our alignments. The second part is the call to the salmon software itself.
quant: Run the salmon software in quantification mode
-l: Library type
-a: Path to alignment file
--targets: Path to transcriptome file
-o: Path to output directory.
The output from the salmon call includes several files nested within a directory named after each sample. The file that we are most interrested in is the quantification file. This is named quant.sf for each sample. Here's what our output directory looks like:
salmon_align_quant/
├── Gm_OldLeaf_Rep1.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_OldLeaf_Rep2.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_OldLeaf_Rep3.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_OldLeaf_Rep4.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_OldLeaf_Rep5.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_SA_Rep1.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_SA_Rep2.quant
│ ├── aux_info
│ ├── libParams
│ └── logs
│ └── salmon_quant.log
├── Gm_SA_Rep3.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_SA_Rep4.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_SA_Rep5.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_YoungLeaf_Rep1.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_YoungLeaf_Rep2.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_YoungLeaf_Rep3.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
├── Gm_YoungLeaf_Rep4.quant
│ ├── aux_info
│ │ ├── ambig_info.tsv
│ │ ├── expected_bias.gz
│ │ ├── fld.gz
│ │ ├── meta_info.json
│ │ ├── observed_bias_3p.gz
│ │ └── observed_bias.gz
│ ├── cmd_info.json
│ ├── libParams
│ │ └── flenDist.txt
│ ├── logs
│ │ └── salmon_quant.log
│ └── quant.sf
└── Gm_YoungLeaf_Rep5.quant
├── aux_info
│ ├── ambig_info.tsv
│ ├── expected_bias.gz
│ ├── fld.gz
│ ├── meta_info.json
│ ├── observed_bias_3p.gz
│ └── observed_bias.gz
├── cmd_info.json
├── libParams
│ └── flenDist.txt
├── logs
│ └── salmon_quant.log
└── quant.sf
Locate all quant.sf files in the salmon_align_quant directory
Then rename and export to quant.sf_export
Example: Rename quant.sf to Gm_OldLeaf_Rep1.quant.sf
Do this for each replicate and each tissue type.
Move these renamed files using Globus to a new directory called quant.sf_export
These files can be moved to your local computer and then visualized using GALAXY