Entering edit mode
3.0 years ago
Simon Ahn
▴
10
I have a count matrix data (23 samples with different condition), and coldata is shown above. I want to get DEGS like this:
I tried this code:
# Read data
data_matrix <- read.csv("matrix_data", row.names=1)
coldata <- read.csv("data/coldata.csv", row.names=1)
# Creating DESeq object
dds <- DESeqDataSetFromMatrix(countData = data_matrix,
colData = coldata,
design = ~ condition)
# Pre-filtering low count cells
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
# specifying the reference level
dds$condition <- relevel(dds$condition, ref = "control")
# Run DEseq
dds <- DESeq(dds)
resultsNames(dds)
However, I cannot find the data result when I used resultsNames(dds). Which code should I use to get what I want?
in the first step, what do you get if you typed head(data_matrix)?
something like this (Not all samples are shown)
You first state that you'd like to obtain DEGs by ~time, but then use ~condition for the comparison. Which one is it? And do you really only have one single sample for time point 0?
What happens for
resultsNames(dds)
? Is it a truly empty object, do you get an error message, or else?Try this way:
Let me know if now you get the desired comparisons available when running
resultsNames(dds)
.