try this, rob:
Read in your raw data
rawdata <- read.csv("data.csv", header = TRUE,row.names = 1, stringsAsFactors = FALSE, check.names = F) #rawdata is a count matrix
metadata <- read.table("Clinical.txt", header = TRUE, row.names = 1, stringsAsFactors = TRUE) #metadata is a table of samples' information
install the packages your heart desires
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("SummarizedExperiment")
# Now, load all packages, ** including those just installed **
library(Biobase)
library(GenomicRanges)
library(tibble)
library(dplyr)
library(DESeq2)
library(SummarizedExperiment) # <-- very likely what you were missing.
Try me again:
se <- SummarizedExperiment(exprs(rawdata)) ## how you like me now
colData(se) <- DataFrame(pData(metadata))
dds <- DESeqDataSet( se, design = ~ 1 )
# I recommend posting this as a separate question if you really cannot figure it out after reading a lot
dds <- estimateSizeFactors( dds )
logcounts <- log2( counts(dds, normalized=TRUE) + 1 )
pc <- prcomp( t( logcounts ) )
I deleted the other post you opened for this as it's already being addressed here. Please stop spamming the forum with multiple threads addressing the same problem, or your account will be suspended.
Rob I apologize, I did not see this comment in the answer:
I'll reopen your other question.