Learn R Programming

qtlhot (version 1.2.10)

FitAllTests: Determine false positive and true positive rates for known targets.

Description

Determine how well different tests do to predict candidates of regulation.

Usage

FitAllTests(cross, pheno1, pheno2, Q.chr, Q.pos, verbose = TRUE)

CitTests(LL, GG, TT)

CombineTests(comap, file)

JoinTestOutputs(comap, tests, file = NULL)

Value

List containing

Prec1,Prec2

matrix of precision with rows for significance level and columns for test; first is for all, second is for cis candidates only

Tp1,Tp2

matrix of true positive rate with rows for significance level and columns for test; first is for all, second is for cis candidates only

Fp1,Fp2

matrix of false positive rate with rows for significance level and columns for test; first is for all, second is for cis candidates only

Arguments

cross

object of class `cross`

pheno1

first phenotype column number or character string name

pheno2

second phenotype column number or character string name; if more than one, then all phenotypes will be tested against `pheno1`

Q.chr

QTL chromosome (number or label)

Q.pos

QTL position in cM

verbose

verbose printout if `TRUE

LL, GG, TT

Numeric vectors corresponding to genotype

comap

list result of `GetComappingTraits()`

file

prefix for file names when running `FitAllTests()` in parallel and saving test results in separate files p.adjust

tests

list object as list of `FitAllTests()` results, or of joined output created by `JoinTestsOutputs()`

Author

Elias Chaibub Neto

Details

`FitAllTests()` invokes 7 tests. The hidden routine `CitTests()` is invoked by call to `FitAllTests()`; this is hidden because we do not recommend its use.

`JoinTestOutputs()` joins results of `FitAllTests()`, either from a list `tests` or from a collection of files prefixed by `file`. The joined tests from `JoinTestOutputs` are summarized with `PrecTpFpMatrix()` using the biologically validated true positives, false positives and precision, for the inferred causal relations. We define a true positive as a statistically significant causal relation between a gene and a putative target gene when the putative target gene belongs to the known signature of the gene. Similarly, we define a false positive as a statistically significant causal relation between a gene and a putative target gene when the target gene does not belong to the signature. (For the AIC and BIC methods that do not provide a p-value measuring the significance of the causal call, we simply use the detected causal relations in the computation of true and false positives). The validated precision is computed as the ratio of true positives by the sum of true and false positives. The `PrecTpFpMatrix` computes these measures to both all genes, and to cis genes only. Simulations suggest only non-parametric tests need to be adjusted using Benjamini-Hochberg via `p.adjust.np()`.

See Also

Examples

Run this code
if (FALSE) {
example(GetCandReg)
## Suppose y1 is causal with targets y2 and y3.
targets <- list(y1 = c("y2","y3"))

tests <- list()
for(k in seq(names(comap.targets))) {
  tests[[k]] <- FitAllTests(CMSTCross, pheno1 = names(comap.targets)[k],
                      pheno2 = comap.targets[[k]],
                      Q.chr = cand.reg[k, 4],
                      Q.pos = cand.reg[k, 5])
}
names(tests) <- names(comap.targets)
tests <- JoinTestOutputs(comap.targets, tests)

PrecTpFpMatrix(alpha = seq(0.01, 0.10, by = 0.01),
  val.targets = targets, all.orfs = CMSThigh$names, tests = tests,
  cand.reg = cand.reg, cis.cand.reg = cis.cand.reg)
}

Run the code above in your browser using DataLab