Overview of today’s session:
...
inspect the results from Session 2
run an advanced RNA-seq pipeline to measure the expression of genes
(optional) run statistical analysis to identify differentially expressed genes
Task 1: Evaluation of RNA-seq results using a basic (generic) nextflow pipeline
The nextflow/RNA-seq pipeline automatically generates two output folders:
...
Connect to the work folder via HPC-FS (See session 2). Browse to the fastqc output folder: run1_star_salmon → results → multiqc.
Task 2: Run the nextflow nf-core/rnaseq pipeline by including advanced filtering parameters
Requirements:
index.csv → a file that provides a list of sample IDs and their associated FASTQ files (read 1 and read 2)
launch.pbs → a script to submit the job to the HPC cluster
Example index.csv file for nf-core/rnaseq version 3.3:
Code Block |
---|
group,fastq_1,fastq_2,strandedness control_r1,/work/kenna_team/data/raw_data/SRR1039508_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039508_2.fastq.gz,unstranded dex_r1,/work/kenna_team/data/raw_data/SRR1039509_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039509_2.fastq.gz,unstranded control_r2,/work/kenna_team/data/raw_data/SRR1039512_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039512_2.fastq.gz,unstranded dex_r2,/work/kenna_team/data/raw_data/SRR1039513_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039513_2.fastq.gz,unstranded control_r3,/work/kenna_team/data/raw_data/SRR1039516_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039516_2.fastq.gz,unstranded dex_r3,/work/kenna_team/data/raw_data/SRR1039517_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039517_2.fastq.gz,unstranded control_r4,/work/kenna_team/data/raw_data/SRR1039520_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039520_2.fastq.gz,unstranded dex_r4,/work/kenna_team/data/raw_data/SRR1039521_1.fastq.gz,/work/kenna_team/data/raw_data/SRR1039521_2.fastq.gz,unstranded |
Example of a launch.pbs script with advanced parameter options:
...
Code Block |
---|
cp /work/kenna_team/scripts/star_rsem/session3/* . |
Task 3 - Differential gene expression analysis
Differential expression analysis using https://maayanlab.cloud/biojupies/analyze
From session 2, we will use the feature counts generated using the ‘star_salmon’ parameter setting. Either copy the relevant files (see below) to your laptop from the HPC or download the files below.
File | File name | File | ||||
---|---|---|---|---|---|---|
Gene feature counts | salmon_merged.gene_counts.tsv |
| ||||
Transcript feature counts | salmon_merged.transcript_counts.tsv |
|
...
Code Block |
---|
#STEP1: get list of read 1 files and save it into a file1.txt file ls *_1* > file1.txt #STEP2: get list of read 2 files and save it into a file2.txt file ls *_2* > file2.txt #(Optional) Alternative to the above steps, when color in terminal adds non ASCII character to file names ls --color=never *_1* > file1.txt ls --color=never *_2* > file2.txt #STEP3: add path to FASTQ files into the file1.txt and file2.txt files cat file1.txt | awk '{print "/work/kenna_team/data/raw_data/" $1}' > file1.mod cat file2.txt | awk '{print "/work/kenna_team/data/raw_data/" $1}' > file2.mod #STEP4: merge modified file1.mod and file2.mod into the same file paste file1.mod file2.mod > combine_file1_2.mod #STEP5: create the names of samples manually using vi or nano. Alternatively, can do this using excel. vi sample_names.txt #STEP6: combine sample_names.txt and combine_file1_2.mod files paste sample_names.txt combine_file1_2.mod > combine_sampleName_file1_2.mod #STEP7: finalise the index.csv file cat combine_sampleName_file1_2.mod | awk '{print $1 "," $2 "," $3 ",unstranded" }' > index.csv |
...