gemini_create_input: gemini_create_input

Description Usage Arguments Details Value Examples

View source: R/gemini_create_input.R

Description

Creates a gemini.input object from a counts matrix with given annotations.

Usage

1
2
3
4
gemini_create_input(counts.matrix, sample.replicate.annotation = NULL,
  guide.annotation = NULL, samplesAreColumns = TRUE,
  sample.column.name = "samplename", gene.column.names = NULL,
  ETP.column = 1, LTP.column = NULL, verbose = FALSE)

Arguments

counts.matrix

a matrix of counts with rownames corresponding to features (e.g. guides) and colnames corresponding to samples.

sample.replicate.annotation

a data.frame of annotations for each sample/replicate pair. Note that at least one column in sample.replicate.annotation must correspond to the colnames of counts.matrix (see Details) (default = NULL)

guide.annotation

a data.frame of annotations for each guide. Note that at least one column in guide.annotation must correspond to the rownames of counts.matrix (default = NULL)

samplesAreColumns

a logical indicating if samples are on the columns or rows of counts.matrix. (default = TRUE)

sample.column.name

a character or integer indicating which column of sample.replicate.annotation describes the samples.

gene.column.names

a character or integer vector of length(2) indicating which columns of guide.annotation describe the genes being targeted.

ETP.column

a character or integer vector indicating which column(s) of counts.matrix contain the early time-point(s) of the screen (i.e. pDNA, early sequencing, etc.). Defaults to the first column.

LTP.column

a character or integer vector indicating which column(s) is the later time-point of the screen (i.e. day21, post-treatment, etc.). Defaults to (1:ncol(counts.matrix))[-ETP.column], or all other columns except for those specified by ETP.column.

verbose

Verbosity (default FALSE)

Details

This function initializes a gemini.input object from a counts matrix. There are a few key assumptions made in the input format.

Value

a gemini.input object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("counts", package = "gemini")
data("sample.replicate.annotation", package = "gemini")
data("guide.annotation", package = "gemini")
Input <- gemini_create_input(
    counts.matrix = counts,
    sample.replicate.annotation = sample.replicate.annotation,
    guide.annotation = guide.annotation,
    sample.column.name = "samplename",
    gene.column.names = c("U6.gene", "H1.gene")
)

gemini documentation built on Nov. 8, 2020, 8:22 p.m.