mediate: Regress one phenotype on the given genes at a single marker.

Description Usage Arguments Value Examples

Description

Regress one phenotype on the given genes at a single marker.

Usage

1
2
mediate(pheno, chr, pos, type = c("haplo", "snp"), expr, ensembl, genoprobs,
  addcovar, cc_dbfile)

Arguments

pheno:

numeric matrix with one column. Sample IDs must be in rownames and must match rownames in genoprobs.

chr:

character containing a single chromosome ID.

pos:

numeric value indicating the position in Mb at which to mediate.

type:

character value that is either 'haplo' or 'snp', indicating which type of genotype values to mediate upon.

expr:

numeric matrix containing the gene expression values. Sample names in rownames and Ensembl IDs in colnames.

ensembl:

data.frame containing gene annotation as obtained from get_ensembl_gene.

genoprobs:

list containing 3-dimensional arrays of allele probs, one for each chromosome. In qtl2 format. Samples in rows, 8 founders in columns, markers in slices.

addcovar:

numeric matrix of additive covariates *without* the intercept. Sample IDs must be in rownames. Typically creates using model.matrix(~covar1 + covar2, data = data).

cc_dbfile:

full path to the CC_SNP database file created by Karl Broman.

Value

data.frame containing the mediation results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(pheno)
data(genoprobs)
data(map)
data(addcovar)
data(expr)
chr = 13
pos = 112.205823
build = 90
ensembl = get_ensembl_genes(chr = chr, build = build)
          med = mediate(pheno = pheno,
          chr = chr,
          pos = pos,
          type = "haplo",
          expr = dataset.islet.rnaseq$expr,
          ensembl = ensembl,
          genoprobs = genoprobs,
          addcovar = addcovar)

dmgatti/qtl2med documentation built on May 8, 2019, 11:55 p.m.