Back to Browse

DeSeq - Differential Gene Expression Analysis on RNA-seq data - R Tutorial

17.2K views
Feb 24, 2021
8:30

#Deseq2 #NGS #plot #ggplot #volcanoplot #R #Bioinformatics #Bigdata #Datascience #English #USA #England #UK blog: https://farhanhaqjahangiri.blogspot.com/2022/09/deseq-differential-gene-expression.html DESeq is an R package to analyse data from high-throughput sequencing assays such as RNA-Seq etc. Data used in the analysis can be downloaded from the following link: https://bioconnector.github.io/workshops/data.html INSTALL PACKAGES install.packages("htmltools") library(htmltools) source("https://bioconductor.org/biocLite.R") BiocManager::install ("DESeq2") library( "DESeq2" ) library(ggplot2) setwd("D:/Post_PhD_Research/Expression Analysis/deseq2") countData (Put Angle bracket and “-” here) read.csv('airway_scaledcounts.csv', header = TRUE, sep = ",") head(countData) metaData (Put Angle bracket and “-” here) read.csv('airway_metadata.csv', header = TRUE, sep = ",") metadata Construct DESEQDataSet Object dds (Put Angle bracket and “-” here) DESeqDataSetFromMatrix(countData=countData, colData=metaData, design=~dex, tidy = TRUE) dds RUN DESEQ FUNCTION dds (Put Angle bracket and “-” here) DESeq(dds) Check result table: res (Put Angle bracket and “-” here) results(dds) head(results(dds, tidy=TRUE)) summary(res) Sort summary list with p-value res (Put Angle bracket and “-” here) res[order(res$padj),] head(res) plotCounts par(mfrow=c(2,3)) plotCounts(dds, gene="ENSG00000152583", intgroup="dex") plotCounts(dds, gene="ENSG00000179094", intgroup="dex") plotCounts(dds, gene="ENSG00000116584", intgroup="dex") plotCounts(dds, gene="ENSG00000189221", intgroup="dex") plotCounts(dds, gene="ENSG00000120129", intgroup="dex") plotCounts(dds, gene="ENSG00000148175", intgroup="dex") Volcano Plot #reset par par(mfrow=c(1,1)) # Make a basic volcano plot with(res, plot(log2FoldChange, -log10(pvalue), pch=20, main="Volcano plot", xlim=c(-3,3))) # Add colored points: blue if padj(Put Angle bracket here)0.01, red if log2FC(Put “greater than” here)1 and padj(Put Angle bracket here)0.05) with(subset(res, padj(Put Angle bracket here).01 ), points(log2FoldChange, -log10(pvalue), pch=20, col="blue")) with(subset(res, padj(Put Angle bracket here).01 & abs(log2FoldChange)(Put “greater than” here)2), points(log2FoldChange, -log10(pvalue), pch=20, col="red")) Blog: https://farhanhaqjahangiri.blogspot.com/​ Youtube: https://www.youtube.com/c/farhanhaqj​

Download

0 formats

No download links available.