...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
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:
Code Block |
---|
qsub -I -S /bin/bash -l walltime=10:00:00 -l select=1:ncpus=12:mem=4gb |
Get a copy of the scripts to be used in this module
Use the terminal to log into the HPC and create a /RNAseq/ folder to run the nf-core/rnaseq pipeline. For example:
Code Block |
---|
mkdir -p |
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:
Code Block |
---|
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/scripts/local
mkdir -p $HOME/workshop/2024-2/session4_RNAseq/data
mkdir -p $HOME/workshop/2024-2/session4_RNAseq/data/mouse
mkdir -p $HOME/workshop/2024-2/session4_RNAseq/data/human
mkdir -p $HOME/workshop/2024-2/session4_RNAseq/data/mydata
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 above code creates the following folder structure:
...
Get a copy of the scripts
Now let’s copy the scripts necessary for today’s session:
Code Block |
---|
cp /work/training/2024/rnaseq/scripts/* $HOME/workshop/2024-2/session4_RNAseq/scripts ls -l $HOME/workshop/2024-2/rnaseqsession4_RNAseq/scripts cp /work/training/2024/rnaseq/scripts/local/* $HOME/workshop/2024-2/rnaseqsession4_RNAseq/scripts/local ls -l $HOME/workshop/2024-2/rnaseqsession4_RNAseq/scripts/local |
Line 1: The -p indicates create 'parental directories as required. Thus the line 1 command creates both /workshop/ and the subfolder /workshopCopies all files from /work/datasets/workshop/scripts/ as noted by an asterisk to the newly created folder $HOME/workshop/2024-2/session4_RNAseq/scripts/
Line 2: List the files copied to the ‘script’ folder
Line 3: Copies all files from /work/datasets/workshop/scripts/local as noted by an asterisk to the newly created folder $HOME/workshop/2024-2/session4_RNAseq/scripts/local
Line 4: List the files copied to the ‘script’ folder
Copy public data to your $HOMEworking folder
Code Block |
---|
mkdir -pcp /work/training/2024/rnaseq/data/mouse/* $HOME/workshop/2024-2/session4_RNAseq/data/mouse ls -l $HOME/workshop/2024-2/rnaseqsession4_RNAseq/data/mouse cp /work/training/2024/rnaseq/data/human/* $HOME/workshop/2024-2/rnaseqsession4_RNAseq/data/human # list the content of thels -l $HOME/workshop/2024-2/rnaseqsession4_RNAseq/data/ human |
Line 1: The first command creates the folder /scripts/Copies mouse RNAseq folder to created ~/data/mouse folder
Line 2: Copies all files from /work/datasets/workshop/scripts/ folder as noted by an asterisk to newly created $HOME/workshop/scripts/ folder
Line 3: a quick challenge - see the previous section for hints
Create a folder for running the nf-RNA-seq pipeline
...
List the files copied to the ‘data’ folder
Line 3: Copies human RNAseq folder to created ~/data/human folder
Line 4: List the files copied to the ‘data’ folder
(Optional ): Running a test with nf-core sample data
First, let’s assess the execution of the nf-core/rnaseq pipeline . For exampleby running a test using sample data.
Create a folder for running the pipeline test:
Code Block |
---|
mkdir -p $HOME/workshop/2024-2/rnaseqsession4_RNAseq/runs mkdir $HOME/workshop/2024/rnaseq/runs/run1/run0_test mkdircd $HOME/workshop/2024-2/rnaseqsession4_RNAseq/runs/run2_QC mkdirrun0_test |
Line 1: Create folder using the make directory “mkdir” command. We use the flap -p (parental) to create parental folders if not yet created.
Line 2: Move to the newly created folder.
Copy the launch_nf-core_RNAseq_test.pbs
from the ‘scripts’ folder to the current folder
Code Block |
---|
cp $HOME/workshop/2024-2/rnaseqsession4_RNAseq/runs/run3scripts/launch_nf-core_RNAseq cd $HOME/workshop/2024/rnaseq/runs |
...
Lines 1-4: create sub-folders for each exercise
...
Line 5: change the directory to the folder “run1_test”
...
_test.pbs . |
View the content of the script as follows:
Code Block |
---|
cat launch_nf-core_RNAseq_test.pbs |
...
nextflow command: nextflow run
pipeline name: nf-core/rnaseq
pipeline version (revision): -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:
Code Block |
---|
qsub launch_nf-core_RNAseq_test.pbs |
Monitoring the Run
Code Block |
---|
qjobs |