View source: R/genoprob_to_patternprob.R
genoprob_to_patternprob | R Documentation |
Collapse genoprob according to pattern
genoprob_to_patternprob(probs1, sdp, alleles = FALSE)
probs1 |
object of class |
sdp |
SNP distribution pattern |
alleles |
use allele string if |
object of class calc_genoprob
Brian S Yandell, brian.yandell@wisc.edu
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.