Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

subset.calc_genoprob

Subsetting genotype probabilities


Description

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

Usage

## S3 method for class 'calc_genoprob'
subset(x, ind = NULL, chr = NULL, ...)

## S3 method for class 'calc_genoprob'
x[ind = NULL, chr = NULL]

Arguments

x

Genotype probabilities as output from calc_genoprob().

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.

Value

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

Examples

grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))

pr <- calc_genoprob(grav2)
# keep just individuals 1:5, chromosome 2
prsub <- pr[1:5,2]
# keep just chromosome 2
prsub2 <- pr[,2]

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.