Learn R Programming

onemap (version 2.1.2)

onemap_read_vcfR: Convert vcfR object to onemap object

Description

Converts data from a vcfR package to onemap initial object, while trying to identify the appropriate marker segregation patterns.

Usage

onemap_read_vcfR(vcfR.object = NULL, cross = c("outcross",
  "f2 intercross", "f2 backcross", "ri self", "ri sib"), parent1 = NULL,
  parent2 = NULL)

Arguments

vcfR.object

object of class 'vcfR' from vcfR package.

cross

type of cross. Must be one of: "outcross" for full-sibs; "f2 intercross" for an F2 intercross progeny; "f2 backcross"; "ri self" for recombinant inbred lines by self-mating; or "ri sib" for recombinant inbred lines by sib-mating.

parent1

string specifying sample ID of the first parent.

parent2

string specifying sample ID of the second parent.

Details

Only biallelic SNPs and indels for diploid variant sites are considered.

Genotype information on the parents is required for all cross types. For full-sib progenies, both outbred parents must be genotyped. For backcrosses, F2 intercrosses and recombinant inbred lines, the original inbred lines must be genotyped. Particularly for backcross progenies, the recurrent line must be provided as the first parent in the function arguments.

Marker type is determined based on parental genotypes. Variants for which parent genotypes cannot be determined are discarded.

Reference sequence ID and position for each variant site are also stored.

See Also

read_onemap for a description of the output object of class onemap.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
vcfR.object <- vcfR::read.vcfR(system.file("extdata/vcf_example_out.vcf", package = "onemap"))
data <- onemap_read_vcfR(vcfR.object=vcfR.object,
                 cross="outcross",
                 parent1=c("P1"),
                 parent2=c("P2"))
# }
# NOT RUN {
                
# }

Run the code above in your browser using DataLab