Question: Cannot re-create q-values from the p-values in the DiffTable.
0
3.8 years ago by
Sameet Mehta30
United States
Sameet Mehta30 wrote:

Hi,

I read on the SeqAnswers forum that the q_value in CuffDiff, is basically p.adjust(pvalue, method = "BH").  However, when I take the p_value column from a diffData(x, c1, c2), and try to use p.adjust(p_value, method = "BH"), I do not get the same q_values back.  Am I doing anything wrong?

modified 3.8 years ago by James W. MacDonald51k • written 3.8 years ago by Sameet Mehta30
Answer: Cannot re-create q-values from the p-values in the DiffTable.
1
3.8 years ago by
United States
James W. MacDonald51k wrote:

Note this part from the help page for diffData():

Usage:

## S4 method for signature 'CuffData'
diffData(object, x, y, features=FALSE)
## S4 method for signature 'CuffData'
diffTable(object,logCutoffValue=99999)

Arguments:

object: An object of class ('CuffData' or 'CuffFeatureSet')

x: Optional, if x and y are both missing, data for all pairwise
differential comparisons are returned, otherwise if x and y
are sample names from the 'samples' table, than only
differential data pertaining to those two samples are
returned.

y: See 'x'

features: A logical value that returns all feature-level data as part
of data.frame when true.  object must be of class 'CuffData'.

The default for the features argument is FALSE, so you are not by default reading in all the data. However, the computation of FDR depends on the number of simultaneous comparisons you made. So when you run cuffDiff from the command line, you compute FDR on all the comparisons you made, but when you try to replicate on your CuffData object, you don't have all the comparisons, so it's an apples to oranges comparison.

To the best of my understanding, the q_values are calculated based on the p_values.  So if i have a vector of p-values, q_value <- p.adjust(p_value, method = "BH"), as given in the cummeRbund source code should hold even if I just use the p-values column from the diffData output.  Why does it not work?