Compute basal expresion for gene expression based on the coefficients data frame.
addBasalExpression.Rd
This function takes the coefficients data frame dtf_coef
and computes
basal expression for gene expression. The scaling factors are generated
using the function generate_basal_expression
.
Arguments
- dtf_coef
A data frame containing the coefficients for gene expression.
- n_genes
number of genes in simulation
- basal_expression
gene basal expression vector
Value
A modified data frame dtf_coef
with an additional column containing
the scaling factors for gene expression.
Examples
list_var <- init_variable()
#> Variable name should not contain digits, spaces, or special characters.
#> If any of these are present, they will be removed from the variable name.
N_GENES <- 5
dtf_coef <- getInput2simulation(list_var, N_GENES)
dtf_coef <- getLog_qij(dtf_coef)
addBasalExpression(dtf_coef, N_GENES, 1)
#> geneID label_myVariable myVariable log_qij basalExpr
#> 1 gene1 myVariable1 -0.280008703 -0.280008703 1
#> 2 gene1 myVariable2 0.051063411 0.051063411 1
#> 3 gene2 myVariable1 -0.487452722 -0.487452722 1
#> 4 gene2 myVariable2 -0.001114257 -0.001114257 1
#> 5 gene3 myVariable1 0.124310544 0.124310544 1
#> 6 gene3 myVariable2 0.229682321 0.229682321 1
#> 7 gene4 myVariable1 -0.364363532 -0.364363532 1
#> 8 gene4 myVariable2 -0.049465060 -0.049465060 1
#> 9 gene5 myVariable1 -0.048839921 -0.048839921 1
#> 10 gene5 myVariable2 -0.056541090 -0.056541090 1