qtlCorrZeroOrder {MetaNetwork}R Documentation

Calculate the zero-order correlation

Description

Calculate the zero-order correlation on QTL profiles.

Usage

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

Arguments

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.

Details

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.

Value

Returns a matrix of correlation coefficients.

Note

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

Author(s)

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

Source

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.

References

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

http://gbic.biol.rug.nl/supplementary/2007/MetaNetwork

See Also

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.

Examples

## 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]

[Package MetaNetwork version 1.0-0 Index]