[BioC] How does the rank product calculate the fold change

Lakshmanan Iyer laxvid at gmail.com
Mon Feb 22 21:50:46 CET 2010


Hi
This is a great opportunity to toot about the advantages of open
source and good programming habits:

If you just type "RP" in the R prompt, you will get the code that is
being executed. If you browse it, you will see the following lines
which clearly tells you how the fold change is being calculated in
RankProd.
****************************************************
if (!is.null(y)) {
        num.class <- 2
        data1 <- as.matrix(data[, x])
        data2 <- as.matrix(data[, y])
        data1.ave = apply(data1, 1, mean)
        data2.ave = apply(data2, 1, mean)
        if (logged) {
            fold.change = data1.ave - data2.ave
        }
        else {
            fold.change = data1.ave/data2.ave
        }
    }
****************************************************
-best
-Lax

On Mon, Feb 22, 2010 at 3:29 AM, Hildebrand, Georg
<georg.hildebrand at mpibpc.mpg.de> wrote:
> Hi Juan,
>
>
>
> Thanks for that help. The easies answers are mostly the best ones J.
>
> Georg
>
>
>
>
>
> From: Juan Carlos Oliveros [mailto:oliveros at cnb.csic.es]
> Sent: Sonntag, 21. Februar 2010 13:31
> To: Hildebrand, Georg
> Cc: bioconductor at stat.math.ethz.ch
> Subject: Re: [BioC] How does the rank product calculate the fold change
>
>
>
> Dear Georg,
>
> Please check if your Fold Change values correspond to:
>
> FC = 2**logRatio (when logRatio >= 0)
>
> and
>
> FC = -2**.(-logRatio) (when logRatio < 0)
>
> logRatio is the difference of means assuming that the means are log(2)
> intensities.
>
> This is the usual way to define fold changes as an intuitive measure of the
> level of induction / repression of a gene in a symmetric scale (with the same
> absolute values for induced genes and repressed genes).
>
> Best,
>
> Juan Carlos
>
> Quoting "Hildebrand, Georg" <georg.hildebrand at mpibpc.mpg.de>:
>
>> Hi,
>>
>> my question is accordin to the library(RankProd) package
>> maybe this question is very easy, but i was not able to find an
>> satisfying answer.
>>
>> I created a list of diff. expressed genes with the Rank product package.
>> Everything works well, but in the output of the topgenes() function i
>> do not understand how the fold change is processed.
>> Has anyone a hint?
>>
>> It is not just the difference of the mean like in limma. Even in the
>> papers of breitling there is no good hint.
>>
>>
>> best regards ,
>> Georg Hildebrand
>> --------------------------------
>> Contact/Kontakt:
>> --------------------------------
>> Abteilung/Dept.:11100ho
>> Web: http://circadianrhythms.mpibpc.mpg.de/
>> E-mail: georg.hildebrand at mpibpc.mpg.de
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list