Construction of Variable Factors
A function of constructing the Group variables, Direction variables, and the Count variables.
Factor(exprs, case, control)
- exprs is a data frame or matrix for two groups or conditions, with rows as variables (genes) and columns as samples.
- case is the sample names in case groups.
- control is the sample names in control groups.
Two indicator variables Group and Direction corresponding to the different groups and the direction of the gene expression changes in the context of an RNA-Seq experiment, respectively. And in this part, 1 represents that a gene belongs to case group or up-regulated and 0 represents a gene belongs to control group or down-regulated. Besides, Count variables are the expression value in different samples for genes.
- The gene expression count values.
- The indicator variables represent that whether a gene belongs to case group or not.
- The indicator variables represent that a gene is up-regulated or down-regulated.
data(exprs) case <- c("A1","A2","A3","A4","A5","A6","A7") control <- c("B1","B2","B3","B4","B5","B6","B7") factors <- Factor(exprs, case, control)