DESEQ2 Code
1
0
Entering edit mode
9 months ago
# 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.

NGS • 400 views
ADD COMMENT
1
Entering edit mode
9 months ago
ATpoint 86k

It's a warning, not a error. It's fine.

ADD COMMENT

Login before adding your answer.

Traffic: 1156 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6