Why numebers in counts.matrix is not integer?

2,998 views
Skip to first unread message

Xiaopei Su

unread,
Mar 10, 2016, 11:40:21 AM3/10/16
to trinityrnaseq-users
Hi Brian and all,

I am doing a time course study using DESeq package. In the process of importing raw counts to R, I got an error said: 
Error in DESeqDataSet(se, design = design, ignoreRank) : 
  some values in assay are not integers

The I noticed the numbers in counts.matrix is not integer. But I thought this file is the raw counts number? Why it's not integer? 
Is there anyway I can use this file? 

Thank you in advance! 

Best regards,
Xiaopei 

Brian Haas

unread,
Mar 10, 2016, 11:52:01 AM3/10/16
to Xiaopei Su, trinityrnaseq-users
The counts are fractionally assigned by the various abundance estimation methods, as a way of dealing with multi-mapped reads.

You can convert them to integer values in R.  If you don't find out how via google, I can provide some hints.

best,

~b


--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-u...@googlegroups.com.
To post to this group, send email to trinityrn...@googlegroups.com.
Visit this group at https://groups.google.com/group/trinityrnaseq-users.
For more options, visit https://groups.google.com/d/optout.



--
--
Brian J. Haas
The Broad Institute
http://broadinstitute.org/~bhaas

 

Xiaopei Su

unread,
Mar 10, 2016, 11:55:36 AM3/10/16
to trinityrnaseq-users, suxi...@gmail.com
Thank you Brian! 

Can I use as.integer(matrix) to do this? 

Best regards,
Xiaopei 


On Thursday, March 10, 2016 at 4:52:01 PM UTC, Brian Haas wrote:
The counts are fractionally assigned by the various abundance estimation methods, as a way of dealing with multi-mapped reads.

You can convert them to integer values in R.  If you don't find out how via google, I can provide some hints.

best,

~b

On Thu, Mar 10, 2016 at 11:40 AM, Xiaopei Su <suxi...@gmail.com> wrote:
Hi Brian and all,

I am doing a time course study using DESeq package. In the process of importing raw counts to R, I got an error said: 
Error in DESeqDataSet(se, design = design, ignoreRank) : 
  some values in assay are not integers

The I noticed the numbers in counts.matrix is not integer. But I thought this file is the raw counts number? Why it's not integer? 
Is there anyway I can use this file? 

Thank you in advance! 

Best regards,
Xiaopei 

--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-users+unsub...@googlegroups.com.

To post to this group, send email to trinityrn...@googlegroups.com.
Visit this group at https://groups.google.com/group/trinityrnaseq-users.
For more options, visit https://groups.google.com/d/optout.

Brian Haas

unread,
Mar 10, 2016, 11:59:42 AM3/10/16
to Xiaopei Su, trinityrnaseq-users
fyi, in case it helps (note I'm not an R guru, but an R survivor):

> m = matrix(c(1.1, 2.2, 3.3, 4.4, 5.5, 6.6), byrow=T, ncol=2)
> m
     [,1] [,2]
[1,]  1.1  2.2
[2,]  3.3  4.4
[3,]  5.5  6.6
> as.integer(m)
[1] 1 3 5 2 4 6

> apply(m, 1:2, round)

     [,1] [,2]

[1,]    1    2

[2,]    3    4

[3,]    6    7

Xiaopei Su

unread,
Mar 10, 2016, 12:02:43 PM3/10/16
to trinityrnaseq-users, suxi...@gmail.com
That's good enough for me, thank you very much! 

Best regards,
Xiaopei 
Reply all
Reply to author
Forward
0 new messages