gpData2cross: Conversion between objects of class 'cross' and 'gpData'

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Function to convert an object of class gpData to an object of class cross (F2 intercross class in the package qtl) and vice versa. If not done before, function codeGeno is used for recoding in gpData2cross.

Usage

1
2
gpData2cross(gpData,...)
cross2gpData(cross)

Arguments

gpData

object of class gpData with non-empty elements for pheno, geno and map

cross

object of class cross

...

further arguments for function codeGeno. Only used in gpData2cross.

Details

In cross, genotypic data is splitted into chromosomes while in gpData genotypic data comprises all chromosomes because separation into chromosomes in not required for genomic prediction. Note that coding of genotypic data differs between classes. In gpData, genotypic data is coded as the number of copies of the minor allele, i.e. 0, 1 and 2. Thus, function codeGeno should be applied to gpData before using gpData2cross to ensure correct coding. In cross, coding for F2 intercross is: AA = 1, AB = 2, BB = 3. When using gpData2cross or cross2gpData, resulting genotypic data has correct format.

Value

Object of class cross of gpData for function gpData2cross and cross2gpData, respectively.

Author(s)

Valentin Wimmer and Hans-Juergen Auinger

References

Broman, K. W. and Churchill, S. S. (2003). R/qtl: Qtl mapping in experimental crosses. Bioinformatics, (19):889-890.

See Also

create.gpData, read.cross , codeGeno

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
library(synbreedData)
# from gpData to cross
data(maize)
maizeC <- codeGeno(maize)
maize.cross <- gpData2cross(maizeC)
# descriptive statistics
summary(maize.cross)
plot(maize.cross)

# use function scanone
maize.cross <- calc.genoprob(maize.cross, step=2.5)
result <- scanone(maize.cross, pheno.col=1, method="em")
# display of LOD curve along the chromosome
plot(result)


# from cross to gpData
data(fake.f2)
fake.f2.gpData <- cross2gpData(fake.f2)
summary(fake.f2.gpData)

## End(Not run)

synbreed documentation built on May 2, 2019, 3:23 a.m.