Learn R Programming

netgwas (version 1.14.3)

netgwas2cross: netgwasmap object to cross object

Description

Convertes netgwasmap object from net.map or buildMap functions to cross object from R/qtl package.

Usage

netgwas2cross(netgwasmap, pop.type= NULL, map.func = "haldane")

Value

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 "geno" element contains data and map for separated linkage groups which have been constructed using net.map function.

pheno

Character string containing the genotype names.

Arguments

netgwasmap

A netgwasmap object. The output of netmap or buildMap functions.

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".

Author

Pariya Behrouzi
Maintainer: Pariya Behrouzi pariya.behrouzi@gmail.com

Details

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).

Examples

Run this code
  if (FALSE) {
    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)
  }

Run the code above in your browser using DataLab