View source: R/netgwas2cross.R
| netgwas2cross | R Documentation |
Convertes netgwasmap object from net.map or buildMap functions to cross object from R/qtl package.
netgwas2cross(netgwasmap, pop.type= NULL, map.func = "haldane")
netgwasmap |
A |
pop.type |
Character string specifying the population type of the genotype data. Accepted values are "DH" (doubled haploid), "BC" (backcross), "RILn" (non-advanced RIL population with n generations of selfing) and "ARIL" (advanced RIL). |
map.func |
Character string defining the distance function used for calculation of genetic distances. Options are "kosambi", "haldane", and "morgan". Default is "haldane". |
If pop.typ = "RILn" the number of generations of selfing is limited to 20 to ensure sensible input. The constructed object is returned as a R/qtl cross object with the appropriate class structure. For "RILn" populations the constructed object is given the class "bcsft" by using the qtl package conversion function convert2bcsft with arguments F.gen = n and BC.gen = 0. For "ARIL" populations the constructed object is given the class "riself".
In R/qtl package, the genotype data for a backcross is coded as NA = missing, 1 = AA, 2 = AB. For an F2 intercross, the coding is NA = missing, 1 = AA, 2 = AB, 3 = BB, 4 = not BB (i.e. AA or AB), 5 = not AA (i.e. AB or BB).
The netgwas.map object is returned as a cross object form R/qtl. The object is a list with usual components "pheno" and "geno".
geno |
The |
pheno |
Character string containing the genotype names. |
Pariya Behrouzi
Maintainer: Pariya Behrouzi pariya.behrouzi@gmail.com
## Not run:
sim <- simRIL(d=25, n=200, g=5, cM=100, selfing= 2)
# to use the same genotyping coding as R/qtl package (See details)
sim$data <- (sim$data) + 1
#Estimate linkage groups and order markers within each LG
out <- netmap(sim$data, cross = "inbred")
map <- out$map; map
plot(out)
#Calculate map positions and convert the map to cross object from qtl package
map <- netgwas2cross(netgwasmap = out, pop.type= "RIL2", map.func = "haldane" )
plotMap(map)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.