prep_dds_from_data: Prepare a DESeq2 object based on count and target data.

Description Usage Arguments Value See Also Examples

Description

This function takes count and targets data and creates a DESeq2 object based on the provided design.

Usage

1
2
3
prep_dds_from_data(count_input, target_input, experiment_design,
  collapseReps = FALSE, rep_field_vector = "Replicate",
  stabilization = "rld")

Arguments

count_input

Count data in dataframe format as read with prep_counts(). Column names must correspond to target rownames.

target_input

Target data in dataframe format as read with prep_targets(). Row names must correspond to count column names.

experiment_design

Experimental design for DE comparison. Can include multiple factors. Design factors should correspond to column names in the provided targets file. Include the primary factor as the final factor in the design and any secondary or batch effects prior. Must be prefaced with a tilde (~). I.E. ~ Batch1 + Batch2 + SecondaryCondition + PrimaryCondition

collapseReps

Boolean. Collapse technical replicates. Default: False

rep_field_vector

Target metadata column identifying which samples correspond to which replicates and maps samples to their replicate identifiers. Required if collapseReps is TRUE.

stabilization

Method of normalizing transformation to perform. Possible values are "rld" and "vst". rld will execute DESeq2's rlog transformation, whereas vst will apply variance stabilizing transformation to the data. For larger data sets vst is recommended.

Value

This function will return a properly formatted DESeq2 object based on the provided normalization method and experimental design.

See Also

prep_counts, prep_targets, init_cutoffs

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
30
31
32
33
34
35
36
## Not run: 

/*
 * Create a DESeq2 data object using previously read count and target data.
 * Differential expression groups indicated by "Infection" column of target data.
 * Apply a rlog transformation to the data. TMM normalization applied.
 */
dds <- prep_dds_from_data(count_input=myCounts, target_input=myTargets,
                           experiment_design= ~ Infection, stabilization="rld")


/*
 * Create a DESeq2 data object using previously read count and target data.
 * Differential expression groups indicated by "Infection" column of target data.
 * Takes into account a batch effect column of target data.
 * Apply a variance stabilizing transformation to the data. TMM normalization applied.
 */
dds <- prep_dds_from_data(count_input=myCounts, target_input=myTargets,
                           experiment_design= ~ batch + Infection, stabilization="vst")


/*
 * Create a DESeq2 data object using previously read count and target data.
 * Differential expression groups indicated by "Time" and "Infection" columns of target data.
 * Takes into account a batch effect column of target data.
 * Apply a variance stabilizing transformation to the data. TMM normalization applied.
 * Collapse technical replicates based on the "replicate" column of target data.
 */
dds <- prep_dds_from_data(count_input=myCounts, target_input=myTargets,
                           experiment_design= ~ batch + Time + Infection,
                           collapseReps=TRUE,
                           rep_field_vector="replicate",
                           stabilization="vst")

 
## End(Not run)

DEVis documentation built on May 2, 2019, 3:18 p.m.