next up previous contents index
Next: Interface with SAS Up: Output Previous: Other Traits   Contents   Index

Interface with R and Splus

If -g is used with the integer 3, then Rcross will create a file with all the trait, marker and categorical data that is suitable for loading into Splus or R. In addition, it will create data frames for the different types of data and set up a set of commands to do one-factor ANOVA of each trait on each marker, and each trait on each categorical trait. From there, the user can do higher level ANOVA analyses in R or Splus. In the output you will see data frames with names Markers$markername, Traits$traitname, and Otraits$otraitname, where markername is the name of a specific marker, traitname is the name of a specific trait and otraitname is the name of a specific categorical trait. If markers have no names, then the data for marker $Y$ on chromosome $X$ will be in Markers$cXmY. A similar convention holds for traits and categorical traits: the trait numbered $Z$ will go into Traits$tZ and categorical trait $W$ will go into OTraits$oW . The output file will have filetype RSplus.inp.

Once the RSplus.inp file has been created, it can be imported into Splus or R with the source command. Here is an example of using R in a UNIX environment using the mletest.cro file has ben converted with Rcross and the -g 3 option:

prompt % Rcross -X mletest -i mletest.cro -o mletest.r -g 3 -A -V
prompt % R

R : Copyright 2000, The R Development Core Team
Version 1.0.0 Patched (April 4, 2000)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type    "?license" or "?licence" for distribution details.

R is a collaborative project with many contributors.
Type    "?contributors" for a list.

Type    "demo()" for some demos, "help()" for on-line help, or
        "help.start()" for a HTML browser interface to help.
Type    "q()" to quit R.

> source("mletest.r")

.....lots of output that looks like....

Response: Traits$Trait.1
                    Df  Sum Sq Mean Sq F value Pr(>F)
Markers$Marker4.16   1    0.34    0.34  0.0978 0.7547
Residuals          298 1038.21    3.48               
> q()
prompt %

The ANOVA of the trait on marker 16 from chromosome 4 has a p-value of 0.7547, indicating little evidence of linkage with a QTL.

Since the output is going into R, you need to take care in naming your markers, traits and categorical traits. Special characters like underscores and dollar signs mean something to R and should be avoided.


next up previous contents index
Next: Interface with SAS Up: Output Previous: Other Traits   Contents   Index
Christopher Basten 2002-03-27