FeatureCounts from Galaxy to DESeq2 in RStudio
I'm having difficulty performing DESeq2 analysis on FeatureCounts data from Galaxy. I've tried both these websites, but I can't seem to properly format my FeatureCounts data for DESeq2. My FeatureCounts output file from Galaxy lists only the GeneId and Counts columns and it doesn't have the headers. Does anyone have the code for that? I've basically been trying:
# Convert to matrix
countdata <- as.matrix(countdata)
head(countdata)
# Assign condition (first four are controls, second four contain the expansion)
(condition <- factor(c(rep("ctl", 4), rep("exp", 4))))
# Analysis with DESeq2 ----------------------------------------------------
library(DESeq2)
# Create a coldata frame and instantiate the DESeqDataSet. See ?DESeqDataSetFromMatrix
(coldata <- data.frame(row.names=colnames(countdata), condition))
dds <- DESeqDataSetFromMatrix(countData=countdata, colData=coldata, design=~condition)
dds
• 3,432 views
•
link
0 answers
No answers yet.
Log in to answer this question.