calc.locallod: Calculate LOD score at physical position of each gene

View source: R/calc.locallod.R

calc.locallodR Documentation

Calculate LOD score at physical position of each gene

Description

For gene expression data with physical positions of the genes, calculate the LOD score at those positions to assess evidence for local eQTL.

Usage

calc.locallod(
  cross,
  pheno,
  pmark,
  addcovar = NULL,
  intcovar = NULL,
  verbose = TRUE,
  n.cores = 1
)

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). There must be a phenotype named "id" or "ID" that contains the individual identifiers.

pheno

A data frame of phenotypes (generally gene expression data), stored as individuals x phenotypes. The row names must contain individual identifiers.

pmark

Pseudomarkers that are closest to the genes in pheno, as output by find.gene.pseudomarker().

addcovar

Additive covariates passed to scanone().

intcovar

Interactive covariates passed to scanone().

verbose

If TRUE, print tracing information.

n.cores

Number of CPU cores to use in the calculations. With n.cores=0, parallel::detectCores() is used to detect the number of available cores.

Details

cross and pheno must contain exactly the same individuals in the same order. (Use findCommonID() to line them up.)

We consider the expression phenotypes in batches: those whose closest pseudomarker is the same.

We use Haley-Knott regression to calculate the LOD scores.

Actually, we use a bit of a contortion of the data to force the qtl::scanone() function in R/qtl to calculate the LOD score at a single position.

We omit any transcripts that map to the X chromosome; we can only handle autosomal loci for now.

Value

A vector of LOD scores. The names indicate the gene names (columns in pheno).

Author(s)

Karl W Broman, broman@wisc.edu

See Also

find.gene.pseudomarker(), plotEGclass(), findCommonID(), disteg()

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

# line up f2cross and expr1
id <- findCommonID(f2cross, expr1)

# calculate LOD score for local eQTL
locallod <- calc.locallod(f2cross[,id$first], expr1[id$second,], pmark)


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