qtlFDR              package:MetaNetwork              R Documentation

_E_s_t_i_m_a_t_e _Q_T_L _t_h_r_e_s_h_o_l_d_s _f_o_r _f_a_l_s_e _d_i_s_c_o_v_e_r_y _r_a_t_e (_F_D_R)

_D_e_s_c_r_i_p_t_i_o_n:

     Calculate thresholds to control the false discovery rate in QTL
     analysis.  At given fdrThres(desired proportion of false
     positives), estimate the corresponding qtlThreshold (qtlThres). 
     And/or at given qtlThres (desired treshold for significance),
     estimate the corresponding proportion of false positives
     (fdrThres).

_U_s_a_g_e:

     qtlFDR <- function( qtlProfiles, fdrThres=0.05, qtlThres=NULL ) 

_A_r_g_u_m_e_n_t_s:

qtlProfiles: matrix of QTL mapping of traits (rownames)  to markers
          (columnnames), as -log_{10}(p) values.
           See 'qtlProfiles' example data.

fdrThres: the desired qvalue proportion of false positives incured
          (called the false discovery rate). Default is 0.05.
           See 'qvalue' package.

qtlThres: numeric -log_{10}(p) desired threshold value for significant
          QTLs.
           See 'qtlThreshold' function.

_V_a_l_u_e:

     A matrix with three columns and two rows: 

c: qValue: proportion of false positives (fdr).

c: pValue: 10^{-1*qtlThres} transformation of qtlThres/qtlProfiles to
          match 'qvalue' package.

c: -log10P: -log_{10}(p) estimation of 'qtlThres'.

r: fdrThres: a pValue and -log_{10}(p) qtlThres for the given
          'fdrThres'.

r: qtlThres: a qValue (fdr) and pValue for the given 'qtlThres'.

     Example:

                  qValue        pValue   -log10P
       [1,]  0.050000000  0.0809722708  1.091664
       [2,]  0.001344755  0.0006845554  3.164591

     If 'fdrThres' or 'qtlThres' is NULL then the respective rows are
     ommitted.

_A_u_t_h_o_r(_s):

     Jingyuan Fu <j.fu@rug.nl>,  Morris Swertz <m.a.swertz@rug.nl>, 
     Ritsert Jansen <r.c.jansen@rug.nl>

_S_o_u_r_c_e:

     Storey, J. D. & Tibshirani, R. Statistical significance for
     genomewide  studies. Proc. Natl. Acd. Sci. USA 100, 9440-9445
     (2003).

_R_e_f_e_r_e_n_c_e_s:

     Fu J, Swertz MA, Keurentjes JJB, Jansen RC. MetaNetwork: a
     computational tool for the  genetic study of metabolism. Nature
     Protocols (2007). 

     <URL: http://gbic.biol.rug.nl/supplementary/2007/MetaNetwork>

_S_e_e _A_l_s_o:

     Use 'qtlThreshold' to estimate an QTL threshold based on
     simulation.
       Use 'qtlMapTwoPart' to calculate 'qtlProfiles'.
      Use 'MetaNetwork' for automated application of this function as
     part a genetic analysis protocol on metabolites.

_E_x_a_m_p_l_e_s:

     ## load the example data provided with this package                         
     data(markers)   
     data(genotypes)
     data(traits)                                                       
                                                  
     ##OR: load your own data                     
     #markers        <- loadData("markers.csv")
     #genotypes      <- loadData("genotypes.csv")
     #traits         <- loadData("traits.csv")  
                                                  
     ##calculate the two part qtl
     qtlProfiles     <- qtlMapTwoPart(genotypes=genotypes, traits=traits, spike=4)
       
     ##set the qtl threshold
     qtlThres        <- 3.79

     ##OR: estimate the threshold yourself
     #qtlThres       <- qtlThreshold(genotypes, traits, spike=4)

     ##estimate FDR
     qtlFDR          <- qtlFDR(qtlProfiles, fdrThres=0.05, qtlThres=qtlThres)

     ##show FDR for both fdrThres of 0.05 and qtlThres of qtlThres
     qtlFDR

