Pre-requisites
Nextflow installed → If not see: 1. Getting started with Nextflow Ask for help if you need assistance.
Overview:
Create working directory folders for hands-on training exercises
Copy data and scripts for today’s session
(Optional ) run a test to verify Nextflow is properly installed and to assess the execution of the nf-core/rnaseq pipeline with example data provided by developers.
Prepare Working Directory Space for Session 4 |
---|
Before we start using the HPC, let’s start an interactive session:
qsub -I -S /bin/bash -l walltime=10:00:00 -l select=1:ncpus=2:mem=8gb
where:
‘walltime’ is amount of time requested to run the interactive session
‘cpus’ number of CPUs to be used by the interactive session
‘mem’ amount of memory assigned to the interactive session
Create working directories
Let’s create the working directories for today’s session:
mkdir -p $HOME/workshop/2024-2/session4_RNAseq mkdir -p $HOME/workshop/2024-2/session4_RNAseq/scripts mkdir -p $HOME/workshop/2024-2/session4_RNAseq/data mkdir -p $HOME/workshop/2024-2/session4_RNAseq/runs mkdir -p $HOME/workshop/2024-2/session4_RNAseq/runs/run1_QC mkdir -p $HOME/workshop/2024-2/session4_RNAseq/runs/run2_RNAseq mkdir -p $HOME/workshop/2024-2/session4_RNAseq/runs/run3_RNAseq_T2T
The folder structure will look like this (do not run the block of code below):
workshop/ └── 2024-2 └── session4_RNAseq ├── data ├── runs │ ├── run1_QC │ ├── run2_RNAseq │ └── run3_RNAseq_T2T └── scripts |
---|
Get a copy of the scripts
Now let’s copy the scripts necessary for today’s session:
cp /work/training/2024/rnaseq/scripts/* $HOME/workshop/2024-2/session4_RNAseq/scripts
Line 1: Copies all files from /work/datasets/workshop/scripts/ as noted by an asterisk to the newly created folder $HOME/workshop/2024-2/session4_RNAseq/scripts/
Copy public data to working folder
cp /work/training/2024/rnaseq/data/* $HOME/workshop/2024-2/session4_RNAseq/data/ ls -l $HOME/workshop/2024-2/session4_RNAseq/scripts
Line 1: Copies all files from /work/datasets/workshop/scripts/ folder as noted by an asterisk to newly created folder $HOME/workshop/2024-2/session4_RNAseq/data/
Line 2: List the files copied to the ‘script’ folder
(Optional ): Running a test with nf-core sample data
First, let’s assess the execution of the nf-core/rnaseq pipeline by running a test using sample data.
Copy the launch_nf-core_RNAseq_test.pbs
to the working directory
cd $HOME/workshop/2024-2/session4_RNAseq/runs/run1_test cp $HOME/workshop/2024-2/session4_RNAseq/scripts/launch_nf-core_RNAseq_test.pbs .
View the content of the script as follows:
cat launch_nf-core_RNAseq_test.pbs
#!/bin/bash -l #PBS -N nfrnaseq_test #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 -r 3.14.0 -profile test,singularity --outdir results |
---|
nextflow command: nextflow run
pipeline name: nf-core/rnaseq
pipeline version: -r 3.14.0
container type and sample data: -profile test,singularity
output directory: --outdir results
Submitting the job
Submit the test job to the HPC cluster as follows:
qsub launch_nf-core_RNAseq_test.pbs
Monitoring the Run
qjobs