Skip to contents

This function calculates mu_ij values by raising 2 to the power of the log_qij values from the coefficient data frame and multiplying it by the provided scaling factor.

Usage

getMu_ij(dtf_coef)

Arguments

dtf_coef

Coefficient data frame containing the log_qij values

Value

Coefficient data frame with an additional mu_ij column

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.
dtf_coef <- getInput2simulation(list_var, 10)
dtf_coef <- getLog_qij(dtf_coef)
dtf_coef <- addBasalExpression(dtf_coef, 10, c(10, 20, 0))
getMu_ij(dtf_coef)
#>    geneID label_myVariable   myVariable      log_qij basalExpr log_qij_scaled
#> 1   gene1      myVariable1 -0.154106721 -0.154106721        10     9.84589328
#> 2   gene1      myVariable2  0.049094554  0.049094554        10    10.04909455
#> 3  gene10      myVariable1 -0.101898307 -0.101898307         0    -0.10189831
#> 4  gene10      myVariable2  0.040227637  0.040227637         0     0.04022764
#> 5   gene2      myVariable1 -0.313238404 -0.313238404         0    -0.31323840
#> 6   gene2      myVariable2 -0.164539355 -0.164539355         0    -0.16453936
#> 7   gene3      myVariable1 -0.128901663 -0.128901663         0    -0.12890166
#> 8   gene3      myVariable2 -0.059714742 -0.059714742         0    -0.05971474
#> 9   gene4      myVariable1 -0.207473070 -0.207473070         0    -0.20747307
#> 10  gene4      myVariable2  0.024960527  0.024960527         0     0.02496053
#> 11  gene5      myVariable1  0.162288711  0.162288711        10    10.16228871
#> 12  gene5      myVariable2  0.451349934  0.451349934        10    10.45134993
#> 13  gene6      myVariable1 -0.122678945 -0.122678945        20    19.87732106
#> 14  gene6      myVariable2 -0.014344723 -0.014344723        20    19.98565528
#> 15  gene7      myVariable1 -0.162665729 -0.162665729        10     9.83733427
#> 16  gene7      myVariable2  0.007534696  0.007534696        10    10.00753470
#> 17  gene8      myVariable1  0.237169546  0.237169546        10    10.23716955
#> 18  gene8      myVariable2  0.066885838  0.066885838        10    10.06688584
#> 19  gene9      myVariable1  0.050108799  0.050108799         0     0.05010880
#> 20  gene9      myVariable2  0.059211462  0.059211462         0     0.05921146
#>           mu_ij
#> 1  1.888066e+04
#> 2  2.313483e+04
#> 3  9.031214e-01
#> 4  1.041048e+00
#> 5  7.310756e-01
#> 6  8.482844e-01
#> 7  8.790604e-01
#> 8  9.420332e-01
#> 9  8.126351e-01
#> 10 1.025275e+00
#> 11 2.590752e+04
#> 12 3.459104e+04
#> 13 4.291517e+08
#> 14 4.782553e+08
#> 15 1.871975e+04
#> 16 2.219306e+04
#> 17 2.792198e+04
#> 18 2.355011e+04
#> 19 1.051385e+00
#> 20 1.061000e+00