diff --git a/intro-rna-seq/Intro_to_RNA-seq_data_analysis.zip b/intro-rna-seq/Intro_to_RNA-seq_data_analysis.zip new file mode 100644 index 0000000..aef55bc Binary files /dev/null and b/intro-rna-seq/Intro_to_RNA-seq_data_analysis.zip differ diff --git a/intro-rna-seq/all_steps_docker_desktop.sh b/intro-rna-seq/all_steps_docker_desktop.sh new file mode 100644 index 0000000..e20f995 --- /dev/null +++ b/intro-rna-seq/all_steps_docker_desktop.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# This script should be run on your local laptop or computer +# Please make sure you have installed Docker Desktop using the instructions at: https://www.docker.com/products/docker-desktop/ +# Before running this script, do the following +## 1. open the Docker Dekstop and make sure it is running +## 2. open a new terminal (MacOS) or command prompt (Windows) window + +#check if docker is running +#the below command will print out the docker version if docker is running +docker --version + +#get the docker image from https://hub.docker.com/r/nfcore/rnaseq/ +#we will be using this image for all the analyses +docker pull nfcore/rnaseq + +#check if the docker image was downloaded successfully +docker images + +#spin up a docker container +##for M1 chip mac, use the below command +docker run --platform linux/amd64 --name rna_bash --rm -it -v ~/Downloads/Intro_to_RNA-seq_data_analysis:/home nfcore/rnaseq bash +##for all other computers, use the below command +docker run --name rna_bash --rm -it -v ~/Downloads/Intro_to_RNA-seq_data_analysis:/home nfcore/rnaseq bash + +#a new prompt will apear and the conatiner is now active +#the home directory should have all the contents of ~/Downloads/Intro_to_RNA-seq_data_analysis +#go to the home directory in the docker container +cd home + +#run fastqc +fastqc Bacteria_GATTACA_L001_R1_001.fastq + +#trim the reads using cutadapt +cutadapt -a file:Adapter_Sequence.fasta -o trimmed.fastq Bacteria_GATTACA_L001_R1_001.fastq + +#run fastqc on the trimmed reads +fastqc trimmed.fastq + +#create a new folder +mkdir star_index + +#create the STAR index +STAR --runMode genomeGenerate --genomeDir ./star_index --genomeFastaFiles rDNA_sequence.fasta --genomeSAindexNbases 3 + +#run STAR for the trimmed reads +STAR --genomeDir ./star_index --readFilesIn ./trimmed.fastq + +#generate the read count matrix using featureCounts +featureCounts -a rDNA.gtf -t CDS -o counts.txt Aligned.out.sam + + + + diff --git a/intro-rna-seq/all_steps_wynton.sh b/intro-rna-seq/all_steps_wynton.sh new file mode 100644 index 0000000..20bd5a2 --- /dev/null +++ b/intro-rna-seq/all_steps_wynton.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +#This script should be run on the dev3 node of the UCSF Wynton HPC cluster +#before running this script, do the following +## 1. transfer the workshop files from your local computer to your wynton account +## {local}$ scp -r Downloads/Intro_to_RNA-seq_data_analysis/ alice@dt2.wynton.ucsf.edu:~ +## 2. create the singularity container rna_seq_container.sif on wynton using the below command +## [alice@log1 ~]$ singularity build rna_seq_container.sif docker://nfcore/rnaseq + +cd ~/Intro_to_RNA-seq_data_analysis/ + +singularity exec rna_seq_container.sif fastqc Bacteria_GATTACA_L001_R1_001.fastq + +singularity exec rna_seq_container.sif cutadapt \ +-a file:Adapter_Sequence.fasta \ +-o trimmed.fastq \ +Bacteria_GATTACA_L001_R1_001.fastq + +singularity exec rna_seq_container.sif fastqc trimmed.fastq + +singularity exec rna_seq_container.sif mkdir star_index + +singularity exec rna_seq_container.sif STAR \ +--runMode genomeGenerate \ +--genomeDir ./star_index \ +--genomeFastaFiles rDNA_sequence.fasta \ +--genomeSAindexNbases 3 + +singularity exec rna_seq_container.sif STAR \ +--genomeDir ./star_index \ +--readFilesIn ./trimmed.fastq + +singularity exec rna_seq_container.sif featureCounts \ +-a rDNA.gtf \ +-t CDS \ +-o counts.txt \ +Aligned.out.sam diff --git a/intro-rna-seq/steps_on_wynton_session1.txt b/intro-rna-seq/steps_on_wynton_session1.txt new file mode 100644 index 0000000..809bbb5 --- /dev/null +++ b/intro-rna-seq/steps_on_wynton_session1.txt @@ -0,0 +1,66 @@ +#Commands run on wynton in session 1 of the Intro to RNA-seq data analysis workshop + +#open a new terminal (MacOS) or command prompt (Windows) window +#upload the data to wynton using data transfer (or dt) node +{local}$ scp -r Downloads/Intro_to_RNA-seq_data_analysis/ alice@dt2.wynton.ucsf.edu:~ + +#login to the wynton cluster +{local}$ ssh alice@log2.wynton.ucsf.edu +#enter your wynton password when prompted and hit enter + +#once you are logged in to wynton, +#list the contents of the home diretory or ~ +#the uploaded folder Intro_to_RNA-seq_data_analysis shoudl appear in the result +[alice@log2 ~]$ ls + +#login to the development node +[alice@log2 ~]$ ssh dev3 + +#list the contents of the Intro_to_RNA-seq_data_analysis folder +[alice@dev3 ~]$ ls Intro_to_RNA-seq_data_analysis/ + +#go to the Intro_to_RNA-seq_data_analysis folder +[alice@dev3 ~]$ cd Intro_to_RNA-seq_data_analysis/ + +#search for fastqc on wynton +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ module spider fastqc + +#check how to load fastqc/0.11.9 +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ module spider fastqc/0.11.9 + +#load the CBI module before loading fastqc +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ module load CBI + +#load the fastqc/0.11.9 module +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ module load fastqc/0.11.9 + +#check if the right version of fastqc is loaded +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ fastqc --version + +#check the documentation of fastqc +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ fastqc --help + +#run fastqc on the Bacteria_GATTACA_L001_R1_001.fastq file +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ fastqc Bacteria_GATTACA_L001_R1_001.fastq + +#once the above command completes running, +#check the output - there should be 2 output files +# 1. Bacteria_GATTACA_L001_R1_001_fastqc.html +# 2. Bacteria_GATTACA_L001_R1_001_fastqc.zip +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ ls + +#download the results from wynton to Downloads folder on local computer +#open a new terminal (MacOS) or command prompt (Windows) window +{local}$ scp aagrawal@dt2.wynton.ucsf.edu:~/Intro_to_RNA-seq_data_analysis/Bacteria_GATTACA_L001_R1_001_fastqc.html Downloads + +{local}$ scp aagrawal@dt2.wynton.ucsf.edu:~/Intro_to_RNA-seq_data_analysis/Bacteria_GATTACA_L001_R1_001_fastqc.zip Downloads + +#go back to the terminal (MacOS) or command prompt (Windows) window where you are logged in to wynton +#we will build a singularity container using the docker image from https://hub.docker.com/r/nfcore/rnaseq/ +#this should take a couple of minutes to complete +# we will look at the output of this command in session 2 +[alice@dev3 Intro_to_RNA-seq_data_analysis]$ singularity build rna_seq_container.sif docker://nfcore/rnaseq + + +############## END SESSION 1 ############## +