superSeq: Apply superSeq model to subsampling data

Description Usage Arguments Value See Also Examples

Description

The superSeq function fits a non-linear least squares model to subsampling data to learn the relationship between statistical power and read depth.

Usage

1
2
superSeq(object, control = defaultNLSControl, starts = NULL,
  new_p = NULL)

Arguments

object

A subSeq summary object.

control

Specify convergence criteria for non-linear least squares algorithm. See defaultNLSControl.

starts

A list of combinations of starting guesses to try with nls. If NULL, uses defaultNLSStarts.

new_p

A vector of subsampling proportions to predict using the superSeq model fits. By default, triple the subsampling depth is predicted.

Value

A superSeq object, which is a data.frame:

fits

The fitted objected from nls function

subsample

The subsampled object from subSeq

predictions

A data frame with the following columns: method used, total predicted discoveries, proportion read depth, predicted number of DE genes, and estimated statistical power.

See Also

fitnls

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
library(superSeq)
library(subSeq)
library(Biobase)
# Load bottomly data
data(bottomly)
bottomly_counts <- exprs(bottomly)
bottomly_design <- pData(bottomly)
bottomly_counts <- bottomly_counts[rowSums(bottomly_counts) >= 10, ]
bottomly_proportions <- 10 ^ seq(-2, 0, 0.1)
# Apply subsampling methodology subSeq
ss = subsample(counts = bottomly_counts,
              proportions = bottomly_proportions,
              treatment=bottomly_design$strain, 
              method=c("voomLimma"),
              replications = 3,
              seed = 12345)
              ss_sum <- summary(ss)
              
# apply superSeq model
ss_obj <- superSeq(ss_sum)

# plot results
plot(ss_obj)

# summarise results
summary(ss_obj)

## End(Not run)

StoreyLab/superSeq documentation built on June 4, 2019, 7:47 a.m.