gravatar for katarzyna.wieciorek

4 hours ago by


I am using DESeq2 library following the manual 3.2 Starting from count matrices. I have my countdata and coldata imported from CSV files. I understand that countdata file can be a problem here but I don't understand what's the problem exactly.

My code:


NGS <- read.csv2(paste0(datadir,"/CLN3_NGS_orig.csv"), header = T,stringsAsFactors = F)
Sinfo <- read.csv2(paste0(datadir,"/Sampleinfo.csv"), header = T,stringsAsFactors = F)

coldata <- DataFrame(Sinfo)
coldata <- lapply(coldata, as.factor)

lapply(NGSnum, class)
NGSnum <- data.frame(NGS[1], apply(NGS[2:13],2, as.numeric))
NGSFull <- DESeqDataSetFromMatrix(
countData = NGSnum,
colData = coldata,
design = ~ Genotype + Treatment)

NGS$Genotype <- relevel(NGSFull$Genotype, "WT")

deseqNGS <- DESeq(NGS)
res <- results(deseqNGS)

My error after appyling DESeqDataSetFromMatrix:

Error in `rownames<-`(`*tmp*`, value = colnames(countData)) : attempt to set 'rownames' on an object with no dimensions

My coldata and countdata files in the cloud

By the way, my countdata contain transcripts, sometimes several transcripts (ENST) correspond to single gene (ENSG). Can DESeq2 sort it out for me and give me only output with genes? It is easy to convert transcripts to genes but harder to make one position out of several.

Thank you in advance,

Source link