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?

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_value`s are calculated based on the `p_value`s. 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?

To the best of my understanding, the `q_value`s are calculated based on the `p_value`s. 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?