genoprob_to_patternprob {qtl2pattern}R Documentation

Collapse genoprob according to pattern

Description

Collapse genoprob according to pattern

Usage

genoprob_to_patternprob(probs1, sdp, alleles = FALSE)

Arguments

probs1

object of class calc_genoprob

sdp

SNP distribution pattern

alleles

use allele string if TRUE

Value

object of class calc_genoprob

Author(s)

Brian S Yandell, brian.yandell@wisc.edu

Examples

dirpath <- "https://raw.githubusercontent.com/rqtl/qtl2data/master/DOex"

# Read DOex example cross from 'qtl2data'
DOex <- subset(qtl2::read_cross2(file.path(dirpath, "DOex.zip")), chr = "2")


# Download genotype probabilities
tmpfile <- tempfile()
download.file(file.path(dirpath, "DOex_genoprobs_2.rds"), tmpfile, quiet=TRUE)
pr <- readRDS(tmpfile)
unlink(tmpfile)

# Convert genotype probabilities to pattern probabilities for pattern 1.
pattern_pr <- genoprob_to_patternprob(pr, 7, TRUE)

str(pr)
str(pattern_pr)



[Package qtl2pattern version 1.2.1 Index]