compute.empirical.pv: Compute empirical P-value

Description Usage Arguments Value Author(s)

View source: R/sqtl.seeker.p.R

Description

Computes empirical P-value for a gene.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
compute.empirical.pv(
  genotype.gene,
  tre.mt,
  best.snp,
  min.pv.obs,
  nb.perm.min = 100,
  nb.perm.max = 1000,
  min.nb.ext.scores = 100,
  comp.ld = TRUE,
  verbose = FALSE
)

Arguments

genotype.gene

a data.frame of genotypes produced by read.bedix.

tre.mt

a matrix of splicing ratios (samples x transcripts).

best.snp

SNP with the smallest observed nominal P-value, computed by compute.nominal.pv.

min.pv.obs

smallest observed nominal P-value.

nb.perm.min

the minimum number of permutations. Default is 100.

nb.perm.max

the maximum number of permutations. Default is 1000.

min.nb.ext.scores

the minimum number of permuted nominal P-values lower than the smallest observed nominal P-value to allow the computation to stop. Default is 100.

comp.ld

should linkage disequilibrium estimates be computed (median r2). Default is TRUE.

verbose

Default is FALSE.

Value

a data.frame with columns:

variants.cis

the number of variants tested in cis.

LD

a linkage disequilibrium estimate for the genomic window (median r2).

best.snp

ID of the SNP with the smallest observed nominal P-value.

best.nominal.pv

P-value corresponding to the best SNP.

shape1

Beta distribution parameter shape1.

shape2

Beta distribution parameter shape2.

nb.perms

the number of permutations used for the empirical P-value computation.

pv.emp

empirical P-value based on permutations.

pv.emp.beta

empirical P-value based on the beta approximation.

runtime

approximated computation time per gene (mins).

Author(s)

Diego Garrido-Martín


dgarrimar/sQTLseekeR2 documentation built on Nov. 22, 2021, 3:23 a.m.