Learn R Programming

qtl2 (version 0.32)

subset.sim_geno: Subsetting imputed genotypes

Description

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

Usage

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

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

Value

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

Arguments

x

Imputed genotypes as output from sim_geno().

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.

Examples

Run this code
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
grav2 <- grav2[1:8,c(1,2)]
dr <- sim_geno(grav2, n_draws=4)
# keep just individuals 1:5, chromosome 2
drsub <- dr[1:5,2]
# keep just chromosome 2
drsub2 <- dr[,2]

Run the code above in your browser using DataLab