This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DEXSeq DEXSeqResults normalized counts

I am trying to write a normalized counts table with exon values. My R object drx1 is a DEXSeqResults object.

dxr1$countData = counts(dxr1, normalized=TRUE)

This returns an error:

Error in .wrap_in_length_one_list_like_object(value, names(x)[[i]], x) :
  failed to coerce 'list(value)' to a DEXSeqResults object of length 1

I even tried to make the same exact object of normalized counts, cast to matrix etc.

dim(counts(dxr1, normalized=TRUE))
dim(dxr1$countData)
[1] 10051    12
[1] 10051    12

There is probably some trick of why this is not working, can somebody advise?

Thanks so much, Gregor

dexseq rna-seq rstats

1 answer

OK for now I just solved it by using the generated object with counts and using col.names=NA and row.names=TRUE:

nc = counts(dxr1, normalized=TRUE)
write.table(nc, file=..., sep="\t", col.names=NA, row.names=TRUE, quote=FALSE)

Cheers, Gregor

Log in to answer this question.