wmerge {wgaim}R Documentation

Merge phenotypic data with genotypic data

Description

Merge phenotypic data with genotypic data from an object of class "interval"

Usage

wmerge(geno, pheno, by = NULL, ...)

Arguments

geno genotypic data from an object of class "interval" (see read.interval
pheno phenotypic data which may be give as a data.frame or a file
by character string defining the name of the column(s) with which to merge the phenotypic data with the genotypic data
... arguments passed to read.table if pheno is a filename

Details

The ... argument actually passes extra arguments to asreml.read.table which in turn passes identical arguments to read.table. Therefore if header or col.names is set, names of columns with a capital letter are converted to a factor (see asreml.read.table.)

This function provides a fail safe mechanism with which to merge large scale genotypic data with phenotypic data. It is important that both data sets contain a matching column named with the argument "by".

As the phenotypic data is inherently larger in size than the genotypic data the merging process has been simplified to ensure that the correct combined data set is returned. Any names of the genotypic "by" column that do not appear in the names of the phenotypic "by" column are dropped from the genotypic data as there is no phenotypic information for these uniquely named rows. Any names of the phenotypic "by" column that do not appear in the names of the genotypic "by" column induce a row of NA's to be placed in the genotype data. This is to ensure that the phenotypic data (which may include columns containing important design information) remains intact.

Value

a list contaning identical components as returned by read.interval or possibly read.cross plus the additional following components

pheno.dat A copy of the phenotypic data used in the merge
full.data A copy of the full data, i.e the genotypic data merged with the phenotypic data using the matching column named by the argument "by"

Author(s)

Julian Taylor, Simon Diffey, Ari Verbyla and Brian Cullis

See Also

wgaim, read.interval

Examples


# read in data 

data(zinc, package = "wgaim")
data(raccas, package = "wgaim")

# subset linkage map and merge genotypic with phenotypic

raccasS <- subset(raccas, chr = c("1A1", "2D1", "4D2", "6A1"))
raccasM <- wmerge(raccasS, zinc, by = "id")


[Package wgaim version 0.2 Index]