Skip to contents

A `seqlist` has data from the experiment and information about the experimental design and model specification.

Public fields

counts

Numeric matrix of output value, where rows represent genes or tags and columns represent samples

tags

A dataframe of tag metadata, matching the row-order of `counts`

fixed_design

Fixed effects design matrix for a single group

random_design

Random effects design matrix for a single group

mixture_probabilities

Vector giving the prior probabilities that each regression parameter is drawn from the 0-component of the mixture prior

standata

List of data to be passed to Stan

fit

Fit object returned by `run_model()`

Methods


Method new()

Create a new `seqlist`

Usage

seqlist$new(
  counts = NULL,
  tags = NULL,
  fixed_design = NULL,
  random_design = NULL,
  mixture_probabilities = NULL
)

Arguments

counts

Value for `counts` field

tags

Value for `tags` field

fixed_design

Value for `fixed_design` field

random_design

Value for `random_design` field

mixture_probabilities

Value for `mixture_probabilities` field

Returns

A new `seqlist` object set the `counts` field


Method set_counts()

Usage

seqlist$set_counts(counts)

Arguments

counts

the counts to use filter the `counts` and `tags` fields


Method filter()

Usage

seqlist$filter(keep)

Arguments

keep

logical vector indicating which rows to keep order the `counts` and `tags` fields


Method arrange()

Usage

seqlist$arrange(index)

Arguments

index

numeric vector ordering the rows set the `fixed_design` field


Method set_fixed_design()

Usage

seqlist$set_fixed_design(fixed_design)

Arguments

fixed_design

the fixed design matrix to use set the `random_design` matrix field


Method set_random_design()

Usage

seqlist$set_random_design(random_design)

Arguments

random_design

the random design matrix to use set the `mixture_probabilities` field


Method set_mixture_probabilities()

Usage

seqlist$set_mixture_probabilities(mixture_probabilities)

Arguments

mixture_probabilities

the vector of mixture probabilities set the `standata` field


Method initialize_standata()

Usage

seqlist$initialize_standata(...)

Arguments

...

arguments passed to private methods Set the value of one of the modifiable elements of `standata`


Method set_standata()

Usage

seqlist$set_standata(...)

Arguments

...

arguments passed to `ngstan::set_standata()` run the model


Method run_model()

Usage

seqlist$run_model(
  method = c("sample", "vb", "pathfinder"),
  run_estimation = FALSE,
  use_multithread = FALSE,
  grainsize = NULL,
  modify_in_place = TRUE,
  ...
)

Arguments

method

the sampling algorithm to use

run_estimation

include the likelihood in the objective?

use_multithread

use the multithread-enabled model?

grainsize

grainsize for multithread

modify_in_place

add the fit to the `seqlist` object? otherwise return it

...

arguments passed to the `cmdstanr` function identified by `method`


Method clone()

The objects of this class are cloneable with this method.

Usage

seqlist$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.