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

View source: R/find.gene.pseudomarker.R

find.gene.pseudomarkerR Documentation

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"))

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()).

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.

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.

Author(s)

Karl W Broman, broman@wisc.edu

See Also

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

Examples

data(f2cross, expr1, genepos, pmap)
library(qtl)

# calc QTL genotype probabilities
f2cross <- calc.genoprob(f2cross, step=1)

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


kbroman/lineup documentation built on May 10, 2023, 6:02 p.m.