Learn R Programming

lineup (version 0.44)

find.gene.pseudomarker: Find nearest peudomarker to each gene

Description

Pull out the pseudomarker that is closest to the position of each of a series of genes.

Usage

find.gene.pseudomarker(cross, pmap, geneloc, where = c("prob", "draws"))

Value

A data frame with columns chr (the chromosome) and pmark (the name of the pseudomarker). The third column pos

contains the Mbp position of the pseudomarker. The final column is the signed distance between the gene and the pseudomarker. The rownames indicate the gene names.

Arguments

cross

An object of class "cross" containing data for a QTL experiment. See the help file for qtl::read.cross() in the R/qtl package (https://rqtl.org).

pmap

A physical map of the markers in cross, with locations in Mbp. This is a list whose components are the marker locations on each chromosome.

geneloc

A data frame specifying the physical locations of the genes. There should be two columns, chr for chromosome and pos for position in Mbp. The rownames should indicate the gene names.

where

Indicates whether to pull pseudomarkers from the genotype probabilities (produced by qtl::calc.genoprob()) or from the imputed genotypes (produced by qtl::sim.geno()).

Author

Karl W Broman, broman@wisc.edu

Details

We first convert positions (by interpolation) from those contained within cross to physical coordinates contained in pmap. We then use qtl::find.pseudomarker() to identify the closest pseudomarker to each gene location.

We also include the positions of the pseudomarkers, and we print a warning message if pseudomarkers are > 2 Mbp from the respective gene.

See Also

qtl::find.pseudomarker(), qtl::find.pseudomarkerpos(), plotEGclass(), disteg(), calc.locallod()

Examples

Run this code
data(f2cross, expr1, genepos, pmap)
library(qtl)
# \dontshow{
n_ind <- 20
n_genes <- 5
f2cross <- f2cross[,1:n_ind]
expr1 <- expr1[1:n_ind,1:n_genes]
genepos <- genepos[1:n_genes,]# }
# calc QTL genotype probabilities
f2cross <- calc.genoprob(f2cross, step=1)

# find nearest pseudomarkers
pmark <- find.gene.pseudomarker(f2cross, pmap, genepos, "prob")

Run the code above in your browser using DataLab