qtlCorrZeroOrder         package:MetaNetwork         R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _z_e_r_o-_o_r_d_e_r _c_o_r_r_e_l_a_t_i_o_n

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

     Calculate the zero-order correlation on QTL profiles.

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

     qtlCorrZeroOrder(markers, qtlProfiles, qtlThres, filename=NULL)

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

 markers: matrix of markers (rownames) and their chromosome numbers
          (column 1)  and centi-Morgan positions (cM, column 2),
          ordered by position.
           See 'markers' example data. 

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

qtlThres: numeric -log_{10}(p) threshold value for significant QTLs. 

filename: (optional) path of the file where the correlations are to be
          stored. Default NULL. 

_D_e_t_a_i_l_s:

     QTL support intervals are determined (via 'qtlSupportInterval'
     with 'interval.dropoff = 1.5')  and the -log_{10}(p) values
     outside of the  borders of these intervals are set to zero.
     Pairwise correlation coefficients between any two traits are then
     calculated as  


 r_{xy} = frac{2displaystylesum_{i=1}^n x_i*y_i}{displaystylesum_{i=1}^n x_i^2+displaystylesum_{i=1}^n y_i^2}


     where r_{xy} is the correlation coefficient between qtlProfiles x 
     and y and i (i=1...n) is a marker. x_i and y_i  represent
     -log_{10}(p) QTL profile values for marker i.

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

     Returns a matrix of correlation coefficients.

_N_o_t_e:

     The markers should be ordered sequentially.  The names of markers
     and traits should be consistent over 'qtlProfiles' and 'markers'.

_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:

     Keurentjes JJB, FU J, de vos CHR, Lommen A, Hall RD, Bino RJ, van
     der Plas LHW, Jansen RC, Vreugdenhil D and Koornneef M. The
     genetics of plant metabolism. Nature Genetics (2006) 7: 842-849.

_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 'markers' as example data set or use 'loadData' to load your
     own data.
      Use 'qtlSupportInterval' to calculate support intervals.
      Use 'qtlMapTwoPart' to calculate 'qtlProfiles'.
      Use 'qtlThreshold' to estimate 'qtlThres' QTL significance
     threshold .
      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)
       
     ##calculate zero order correlation
     qtlZeroOrder <- qtlCorrZeroOrder(markers, qtlProfiles, qtlThres)

     ##show the correlations
     qtlZeroOrder[1:5,1:5]

