runQTLseqAnalysis: Calculates delta SNP confidence intervals for QTLseq analysis

Description Usage Arguments Value Examples

View source: R/takagi_sim.R

Description

The method for simulating delta SNP-index confidence interval thresholds as described in Takagi et al., (2013). Genotypes are randomly assigned for each indvidual in the bulk, based on the population structure. The total alternative allele frequency in each bulk is calculated at each depth used to simulate delta SNP-indeces, with a user defined number of bootstrapped replication. The requested confidence intervals are then calculated from the bootstraps.

Usage

1
2
3
runQTLseqAnalysis(SNPset, windowSize = 1e+06, popStruc = "F2",
  bulkSize, depth = NULL, replications = 10000, filter = 0.3,
  intervals = c(95, 99), ...)

Arguments

SNPset

The data frame imported by ImportFromGATK

windowSize

the window size (in base pairs) bracketing each SNP for which to calculate the statitics.

popStruc

the population structure. Defaults to "F2" and assumes "RIL" otherwise

bulkSize

non-negative integer vector. The number of individuals in each simulated bulk. Can be of length 1, then both bulks are set to the same size. Assumes the first value in the vector is the simulated high bulk.

depth

integer. A read depth for which to replicate SNP-index calls.

replications

integer. The number of bootstrap replications.

filter

numeric. An optional minimum SNP-index filter

intervals

numeric vector. Confidence intervals supplied as two-sided percentiles. i.e. If intervals = '95' will return the two sided 95% confidence interval, 2.5% on each side.

...

Other arguments passed to locfit and subsequently to locfit.raw() (or the lfproc). Usefull in cases where you get "out of vertex space warnings"; Set the maxk higher than the default 100. See locfit.raw(). But if you are getting that warning you should seriously consider increasing your window size.

Value

A SNPset data frame with delta SNP-index thresholds corrisponding to the requested confidence intervals matching the tricube smoothed depth at each SNP.

Examples

1
2
3
4
5
6
7
8
df_filt <- runQTLseqAnalysis(
SNPset = df_filt,
bulkSize = c(25, 35)
windowSize = 1e6,
popStruc = "F2",
replications = 10000,
intervals = c(95, 99)
)

bmansfeld/QTLseqR documentation built on Jan. 25, 2020, 8:52 p.m.