Learn R Programming

qtl2 (version 0.42)

subset.phasedgeno: Subsetting phased genotype objects

Description

Pull out a specified set of individuals and/or chromosomes from the results of guess_phase()

Usage

# S3 method for phasedgeno
subset(x, ind = NULL, chr = NULL, ...)

# S3 method for phasedgeno [(x, ind = NULL, chr = NULL)

Value

An object of class "phasedgeno", like the input, with the selected individuals and/or chromosomes; see guess_phase().

Arguments

x

Imputed genotypes as output from guess_phase(), a list of 3d arrays.

ind

A vector of individuals: numeric indices, logical values, or character string IDs

chr

A vector of chromosomes: logical values, or character string IDs. Numbers are interpreted as character string IDs.

...

Ignored.

See Also

guess_phase(), cbind.phasedgeno(), rbind.phasedgeno()

Examples

Run this code
if (FALSE) {
file <- paste0("https://raw.githubusercontent.com/rqtl/",
               "qtl2data/main/DOex/DOex.zip")
DOex <- read_cross2(file)
pr <- calc_genoprob(DOex, error_prob=0.002)
m <- maxmarg(pr)
ph <- guess_phase(DOex, m)
ph <- ph[1:10,] # first ten individuals
ph <- ph[,2]  # chromosome 2
}

Run the code above in your browser using DataLab