SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Small RNA sequence, how to calculate read counts? What's the criterion? Is there soft vivi-Jasmine Illumina/Solexa 6 12-29-2014 04:23 AM
cufflinks counts vs. rsem counts papori RNA Sequencing 0 07-22-2012 03:35 AM
What's left of 5 million reads Manu Illumina/Solexa 3 08-18-2010 04:47 AM
DESeq: Read counts vs. BP counts burkard Bioinformatics 0 08-06-2010 12:52 AM
Helicos Borrows $20 Million from GE Healthcare... ECO Helicos / Direct Genomics 0 01-04-2008 09:14 AM

Reply
 
Thread Tools
Old 04-20-2015, 02:37 PM   #1
shirley47162928
Member
 
Location: in

Join Date: Jan 2015
Posts: 15
Default how to calculate counts per million

Hi all,
Could anyone tell how to calculate counts per million (CPM) manually? How it was calculated in edgeR related to RNA-seq data?
shirley47162928 is offline   Reply With Quote
Old 04-20-2015, 02:43 PM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,634
Default

http://seqanswers.com/forums/showthread.php?t=40204
GenoMax is offline   Reply With Quote
Old 04-22-2015, 01:01 AM   #3
Gordon Smyth
Member
 
Location: Melbourne, Australia

Join Date: Apr 2011
Posts: 91
Default

Which edgeR CPM do you mean in particular? Do you mean the column called logCPM in the topTags table? That is computed using the aveLogCPM() function.
Gordon Smyth is offline   Reply With Quote
Old 04-22-2015, 06:54 AM   #4
diego diaz
Member
 
Location: Santiago, Chile

Join Date: Oct 2013
Posts: 62
Default

To calculate CPM manually in R it would be :

cpm <- apply(countmatrix,2, function(x) (x/sum(x))*1000000)

# the 1 added to log function is to avoid log 0 values
log.cpm <- log(cpm + 1)

To calculate rpkm you have to know the gene lengths
diego diaz is offline   Reply With Quote
Old 04-22-2015, 06:41 PM   #5
Gordon Smyth
Member
 
Location: Melbourne, Australia

Join Date: Apr 2011
Posts: 91
Default

Quote:
Originally Posted by diego diaz View Post
# the 1 added to log function is to avoid log 0 values
log.cpm <- log(cpm + 1)
That is not quite the same as what edgeR's cpm() function does. It's somewhat better to offset the counts rather than the cpms.
Gordon Smyth is offline   Reply With Quote
Old 04-22-2015, 06:47 PM   #6
diego diaz
Member
 
Location: Santiago, Chile

Join Date: Oct 2013
Posts: 62
Default

Quote:
Originally Posted by Gordon Smyth View Post
That is not quite the same as what edgeR's cpm() function does. It's somewhat better to offset the counts rather than the cpms.
Yes, sorry, my mistake. The offset is added to the counts, not to the cpm.
diego diaz is offline   Reply With Quote
Reply

Tags
cpm

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 05:44 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO