get.pvals: Permutation-based significance tests for differentially...

Description Usage Arguments Value Author(s) See Also

View source: R/get.pvals.R

Description

Creates simulated null distribution of average t statistics for regions classified as over- or underexpressed, and obtains p-values for observed over- and underexpressed regions based on this simulated null.

Usage

1
2
3
get.pvals(regions, dbfile, tablename, num.perms = 1, group, est.params,
  chromosome, colsubset = c(-1), adjustvars = NULL, nonzero = FALSE,
  scalefac = 32, chunksize = 1e+05, colmeds = NULL)

Arguments

regions

data frame of regions to obtain p-values for: specifically the $states element of the return of getRegions. Must have mean.t and state columns.

dbfile

Database file used to obtain the regions data frame.

tablename

Name of the table in dbfile.

num.perms

Number of permutations to use to create the null distribution.

group

0/1 vector denoting group labels for the samples used in analysis

est.params

return from getParams - HMM parameters used when creating regions

chromosome

Chromosome you are analyzing. Currently only runs one chromosome at a time.

colsubset

Colsubset argument used to create regions

adjustvars

Optional matrix of adjustment variables (e.g. measured confounders, output from SVA, etc.) to use in fitting linear models to each nucleotide.

nonzero

If TRUE, use the median of only the nonzero counts as the library size adjustment.

scalefac

A log transformation is used on the count tables, so zero counts present a problem. What number should we add to the entire matrix before running the models? Defaults to 32.

chunksize

How many rows of the database should be processed at a time?

colmeds

If NULL, the column medians are calculated using getColmeds. Otherwise, the output of getColmeds is expected.

Value

A vector having length equal to the number of rows in regions, giving a p-value for each region of state 3 or 4 in regions.

Author(s)

Alyssa Frazee

See Also

getLimmaInput,getTstats,getRegions


leekgroup/derfinder documentation built on May 20, 2019, 11:30 p.m.