DESeq2 - HTSeq-count txt error
1
0
Entering edit mode
6.3 years ago
jsl ▴ 50

Hi,

I am trying to perform differential analysis on my HT-seq-counts .txt files, using a command below's command,

sampleFiles <- grep("CD39",list.files(directory),value=TRUE)
sampleCondition <- sub("(.*annotated...).*","",sampleFiles)
sampleTable <- data.frame(sampleName = sampleFiles,
                          fileName = sampleFiles,
                          condition = sampleCondition)

ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable,
                                       directory = directory,
                                       design= ~ condition)

But I received the error below:

Error in validObject(.Object) : 
  invalid class “DESeqDataSet” object: levels of factors in the design have non-unique level names after make.names() is applied.
  best to only uobject letters and numbers for levels of factors in the design

Can someone enlighten me please? My output for sample My output for sampleTable is this:

                      sampleName                       fileName condition
1 annotated_SRR7059136_CD39-.txt annotated_SRR7059136_CD39-.txt     CD39-
2 annotated_SRR7059137_CD39+.txt annotated_SRR7059137_CD39+.txt     CD39+
3 annotated_SRR7059138_CD39-.txt annotated_SRR7059138_CD39-.txt     CD39-
4 annotated_SRR7059139_CD39+.txt annotated_SRR7059139_CD39+.txt     CD39+
5 annotated_SRR7059140_CD39-.txt annotated_SRR7059140_CD39-.txt     CD39-
6 annotated_SRR7059141_CD39+.txt annotated_SRR7059141_CD39+.txt     CD39+
7 annotated_SRR7059142_CD39-.txt annotated_SRR7059142_CD39-.txt     CD39-
8 annotated_SRR7059143_CD39+.txt annotated_SRR7059143_CD39+.txt     CD39+

Please advise, thank you!

RNA-Seq • 2.6k views
ADD COMMENT
0
Entering edit mode

The error message explicitly told you what to do:

best to only uobject letters and numbers for levels of factors in the design

ADD REPLY
4
Entering edit mode
6.3 years ago
h.mon 35k

After DESeq2 uses the function make.names() on sampleTable$condition, CD39+ is changed to CD39., and CD39- is also changed to CD39.. Edit sampleTable$condition to avoid this:

sampleTable$condition <- gsub( "[+]", "plus", sampleTable$condition )
sampleTable$condition <- gsub( "[-]", "minus", sampleTable$condition )
ADD COMMENT
0
Entering edit mode

Must have been a silly question this one. Thanks h.mon!

ADD REPLY

Login before adding your answer.

Traffic: 2100 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6