Aim:
Assess the quality of raw datasets
Define quality trimming parameters prior running the complete RNAseq gene profiling pipeline
Run RNA-seq QC check
The pipeline requires preparing at least 2 files:
Metadata file (samplesheet.csv) thatspecifies the name of the samples, location of FASTQ files ('Read 1' and ‘Read 2’), and strandedness (forward, reverse, or auto. Note: auto is used when the strandedness of the data is unknown)
PBS Pro script (launch_nf-core_RNAseq_QC.pbs) with instructions to run the pipeline
Create the metadata file (samplesheet.csv):
Change to the data folder directory:
Code Block |
---|
cd $HOME/workshop/2024-2/rnaseqsession4_RNAseq/data/ |
Copy the bash script to the working folder
Code Block |
---|
cp /work/training/2024/rnaseq/scripts/create_samplesheet_nf-core_RNAseq.sh $HOME/workshop/2024/rnaseq/data/ |
Note: you could replace ‘$HOME/workshop/data’ with “.” A dot indicates ‘current directory’ and will copy the file to the directory where you are currently located
View the content of the script:
Code Block |
---|
cat create_samplesheet_nf-core_RNAseq.sh |
Example for Single-End data (only ‘Read 1’ is available):
#!/bin/bash -l #User defined variables ########################################################## DIR='$HOME/workshop/data/' INDEX='samplesheet.csv' ##########################################################
#load python module module load python/3.10.8-gcccore-12.2.0
#fetch the script to create the sample metadata table wget -L https://raw.githubusercontent.com/nf-core/rnaseq/master/bin/fastq_dir_to_samplesheet.py chmod +x fastq_dir_to_samplesheet.py
#generate initial sample metadata file ./fastq_dir_to_samplesheet.py $DIR $INDEX \ --strandedness auto \ --read1_extension .fastq.gz |
---|
...
Copy the PBS Pro script for QC (launch_nf-core_RNAseq_QC.pbs)
Copy and paste the code below to the terminal:
Code Block |
---|
cp $HOME/workshop/2024/rnaseq/data/samplesheet.csv $HOME/workshop/2024/rnaseq/runs/run2_QC cp $HOME/workshop/scripts/launch_nf-core_RNAseq_QC.pbs $HOME/workshop/2024/rnaseq/runs/run2_QC cd $HOME/workshop/2024/rnaseq/runs/run2_QC |
Line 1: Copy the samplesheet.csv file to the working directory
Line 2: move to the working directory
Line 3: copy the launch_nf-core_RNAseq_QC.pbs submission script to the working directory
View the content of the launch_nf-core_RNAseq_QC.pbs
script:
...
#!/bin/bash -l #PBS -N nfrnaseq_QC #PBS -l select=1:ncpus=2:mem=4gb #PBS -l walltime=24:00:00
#work on current directory cd $PBS_O_WORKDIR
#load java and set up memory settings to run nextflow module load java export NXF_OPTS='-Xms1g -Xmx4g'
nextflow run nf-core/rnaseq \ -profile singularity \ -r 3.14.0 \ --input samplesheet.csv \ --outdir results \ --genome GRCm38-local \ --skip_trimming \ --skip_alignment \ --skip_pseudo_alignment |
---|
We recommend running the nextflow nf-core/rnaseq pipeline once and then assessing the fastqc results folder to assess if sequence biases are present in the 5'-end and 3'-end ends of the sequences.
Version 3.12.0 allows running the pipeline to do quality assessment only, without any alignment, read counting, or trimming.
Submitting the job
Once you have created the folder for the run, the samplesheet.csv file, and launch.pbs, you are ready to submit the job to the HPC scheduler:
...
Once the pipeline has finished running - Assess the QC report:
NOTE: To proceed, you need to be on QUT’s WiFi network or signed via VPN.
To browse the working folder in the HPC type in the file finder:
...
Assess QC reports (FastQC and MultiQC) to define how many nucleotides should be trimmed from the 5'-end and/or 3-end regions of the FASTQ reads (see Case 3 below).