This is a test version of Biostars. For the public version, visit https://www.biostars.org.
error while plot data with deSeq2

Hi,

I am getting an error while plotting figures after running DESeq2. Here is what I have done:

dds <- DESeqDataSetFromMatrix(countData = mydata, colData = meta, design = ~ Diet)
dds <- estimateSizeFactors(dds)
dds <- DESeq(dds)
plotCounts(dds, gene="ENSSSAG00000003723", intgroup=c("Diet") )

Error in .local(object, ...) : unused argument (intgroup = "Diet")

rld <- rlog(dds, blind=TRUE)
plotPCA(rld, intgroup=c("Diet")) +theme_bw()

Error in .local(object, ...) : unused argument (intgroup = "Diet")

But if I remove intgroup from the code, it works, but I need to look at plot with "Diet" groups

> dds
class: DESeqDataSet 
dim: 42350 48 
metadata(1): version
assays(6): counts mu ... replaceCounts replaceCooks
rownames(42350): ENSSSAG00000004313 ENSSSAG00000047403 ... ENSSSAG00000092601 ENSSSAG00000091009
rowData names(31): baseMean baseVar ... maxCooks replace
colnames(48): T3_mc1_tk2_Lh005 T3_mc1_tk3_Lh001 ... T3_mn3_tk2_Lh001 T3_mn3_tk2_Lh007
colData names(8): id Time ... sizeFactor replaceable
deseq2 rna-seq

Try DESeq2::plotPCA(rld, intgroup=c("Diet")) +theme_bw(), plotPCA should refer in your case to another package

Still getting the same error-

DESeq2::plotPCA(rld, intgroup="Diet") +theme_bw()
Error in .local(object, ...) : unused argument (intgroup = "Diet")

But for other plot, it worked when I used this, that's weird...

DESeq2::plotCounts(dds, gene="ENSSSAG00000003723", intgroup="Diet")

Hum strange, and if you set plotPCA <- DESeq2::plotPCA before running plotPCA(rld, intgroup=c("Diet")), do you still have the same error ?

Can you just confirm that Diet is indeed one of your ColData headers in dds? We can't see that from what you've shown.

yes, its there, as you can see below:

    colData(rld)
    DataFrame with 48 rows and 7 columns
                                   id        Time     Diet Tank_number Sample_Type Sample_Number sizeFactor
                          <character> <character> <factor> <character> <character>     <integer>  <numeric>
    T3_mc1_tk2_Lh005 T3_ctr_tk1_Lh001          T3      ctr         tk1       s1             1   0.639395
    T3_mc1_tk3_Lh001 T3_ctr_tk1_Lh003          T3      ctr         tk1       s1             3   1.163646

what happens if instead of using "Diet" as as string in the command, you use colnames(colData(dds))[3]? Maybe there's a hidden white space in there?

Still the same error. If I use any other group for plotting, it still gives the same error.

You might want to ask on the bioconductor support group. Michael Love does read and respond there.

0 answers

No answers yet.

Log in to answer this question.