[BioC] DEXSeq: Error: all(unlist(lapply(design, class)) == "factor") is not TRUE

Alejandro Reyes alejandro.reyes at embl.de
Mon Aug 13 17:12:31 CEST 2012


Dear Sheng,

 From a recent version of DEXSeq, the design data frame needs to have 
ONLY factors on it.
I owe you an apology since I forgot to update the example. I just 
updated it right now:

library(DEXSeq)
inDir = system.file("extdata", package="pasilla", mustWork=TRUE)
annotationfile = file.path(inDir, "Dmel.BDGP5.25.62.DEXSeq.chr.gff")
samples = data.frame(
condition = c(rep("treated", 3), rep("untreated", 4)),
row.names = dir(system.file("extdata", package="pasilla", mustWork=TRUE),
pattern="fb.txt"),
stringsAsFactors = TRUE,
check.names = FALSE
)

annotationfile = file.path(inDir, "Dmel.BDGP5.25.62.DEXSeq.chr.gff")
ecs = read.HTSeqCounts(countfiles = file.path(inDir, rownames(samples)),
design = samples,
flattenedfile = annotationfile)
  

Best wishes,
Alejandro

> Hi,
>
> I run the example of read.HTSeqCounts() from DEXSeq, get following Error:
>
> Error: all(unlist(lapply(design, class)) == "factor") is not TRUE
>
> Any suggestion?  Thanks in advance.
>
> Regards,
> Sheng
>
>
> code:
>
> library(DEXSeq)
> inDir = system.file("extdata", package="pasilla", mustWork=TRUE)
> annotationfile = file.path(inDir, "Dmel.BDGP5.25.62.DEXSeq.chr.gff")
> samples = data.frame(
> condition = c(rep("treated", 3), rep("untreated", 4)),
> replicate = c(1:3, 1:4),
> row.names = dir(system.file("extdata", package="pasilla", mustWork=TRUE),
> pattern="fb.txt"),
> stringsAsFactors = TRUE,
> check.names = FALSE
> )
>
> annotationfile = file.path(inDir, "Dmel.BDGP5.25.62.DEXSeq.chr.gff")
>
>
> ecs = read.HTSeqCounts(countfiles = file.path(inDir, rownames(samples)),
> design = samples,
> flattenedfile = annotationfile)
>
>
> sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] DEXSeq_1.3.16      Biobase_2.17.6     BiocGenerics_0.3.1
>
> loaded via a namespace (and not attached):
> [1] RCurl_1.91-1   XML_3.9-4      biomaRt_2.13.2 hwriter_1.3    plyr_1.7.1
>      statmod_1.4.15 stringr_0.6.1
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list