Entering edit mode
9 months ago
ananta.kapoor
•
0
# Load the DESeq2 library
library(DESeq2)
# Read your count data
counts <- read.csv("C:/Users/anant/OneDrive/Documents/RNASeq/count_data.csv", row.names = 1)
# Read the metadata
metadata <- read.csv("C:/Users/anant/OneDrive/Documents/RNASeq/Metadata.csv")
# Create a DESeqDataSet object with count data and metadata
dds <- DESeqDataSetFromMatrix(countData = counts, colData = metadata, design = ~ condition)
# Run the DESeq analysis
dds <- DESeq(dds)
# Get differentially expressed genes
res <- results(dds)
res <- res[order(res$padj),]
# Show the top differentially expressed genes
head(res)
This code works excedpt this one thing- Warning message:
In DESeqDataSet(se, design = design, ignoreRank) :
some variables in design formula are characters, converting to factors
please confirm if this is right because I got this code from a site.