run.qr.permutation.threshold.scans: Runs permutation scans for significance thresholds based on...

View source: R/fixef.eQTL.scan.R

run.qr.permutation.threshold.scansR Documentation

Runs permutation scans for significance thresholds based on an index permutation matrix object, the phenotype data, and pre-computed QR decompositions for all the models.

Description

This function runs permutation scans in order to calculate significance thresholds. Its results are most valid when done in a fixed effect model setting and observations are exchangeable.

Usage

run.qr.permutation.threshold.scans(
  perm.ind.matrix,
  qr.object,
  phenotype,
  data,
  keep.full.scans = FALSE,
  scan.index = NULL,
  id = "SUBJECT.NAME",
  chr = "all",
  just.these.loci = NULL,
  use.progress.bar = FALSE,
  report.perm.scans = FALSE,
  ...
)

Arguments

perm.ind.matrix

Output object from generate.qr.permutation.index.matrix().

qr.object

Output object from extract.qr().

phenotype

The column name (or function of column name) of a variable in data. This will become the outcome of the genome scan.

data

A data frame with outcome and potential covariates. Should also have IDs that link to IDs in the genome cache, often with the individual-level ID named "SUBJECT.NAME", though others can be specified with id.

keep.full.scans

DEFAULT: FALSE. If TRUE, all p-values are kept from all loci. If FALSE, only the minimum p-value is kept from each scan, greatly reducing size of output.

scan.index

DEFAULT: NULL. If NULL, all permutations are run. Integer vector can be specified to run just a subset of the permutations.

id

DEFAULT: "SUBJECT.NAME". This is the individual-level ID that is associated with data points in the phenotype data. This should be unique for each data point.

chr

DEFAULT: "all". Specifies which chromosomes to scan.

just.these.loci

DEFAULT: NULL. DEFAULT: NULL. Specifies a reduced set of loci to fit. If loci is just one locus, the alternative model fit will also be output as fit1.

use.progress.bar

DEFAULT: FALSE. Results in a progress bar while code runs.

report.perm.scans

DEFAULT: FALSE. Outputs the completion of permutation scans.

Examples

run.qr.permutation.threshold.scans()

gkeele/miqtl documentation built on June 13, 2022, 4:20 p.m.