/
DESeq2 - alternative script
DESeq2 - alternative script
#set the working directory
setwd("/path/to/the/folder/with/counts/at_counts")
#install the following packages if not yet installed
library("ggrepel")
library("DESeq2")
library("ggplot2")
library("EnhancedVolcano")
library("reshape2")
library("plyr")
require(reshape2)
IMPORT AND PREPROCESS GENE COUNTS DATA
geneCountData <- read.csv('salmon.merged.gene_counts_length_scaled.tsv', header = TRUE, sep = "\t")
print(head(geneCountData))
get rid of the gene_name column
geneCountData = geneCountData[, colnames(geneCountData)[colnames(geneCountData) != 'gene_name']]
print(head(geneCountData))
create a new table with only numbers
counts need to be rounded to integers
prepare to re-add the 'gene_id' column to the numbers table
create names of the new columns
merge the "gene_id" column with the numbers table
rename the columns
IMPORT AND PREPROCESS META DATA
make sure that the condition in the metadata is factorised to keep order for DESeq2
first group (Ax) is the baseline, DESeq2 will compare the second group against the first group
CREATE DESEQ2 OBJECT AND RUN THE ANALYSIS
Take a look at the results table
Summary of differential gene expression
Sort summary list by p-value
Save DEGs to file
Print the results for the genes of interest
, multiple selections available,
Related content
DESeq2
DESeq2
More like this
eResearch - DESeq2
eResearch - DESeq2
More like this
Preparing input feature counts table for DESeq2 analysis
Preparing input feature counts table for DESeq2 analysis
More like this
Session 4 : Assessing outputs and statistical analysis
Session 4 : Assessing outputs and statistical analysis
More like this
copy_3. Setting up your R environment
copy_3. Setting up your R environment
More like this
3. Setting up your R environment
3. Setting up your R environment
More like this