Construct network for single target gene
single_network(
matrix,
regulators,
target,
cross_validation = FALSE,
seed = 1,
penalty = "L0",
algorithm = "CD",
regulators_num = (ncol(matrix) - 1),
n_folds = 10,
subsampling_ratio = 1,
r_threshold = 0,
verbose = TRUE,
...
)
An expression matrix.
The regulator genes for which to infer the regulatory network.
The target gene.
Logical value, default is FALSE
, whether to use cross-validation.
The random seed for cross-validation, default is 1
.
The type of regularization, default is L0
.
This can take either one of the following choices: L0
, L0L1
, and L0L2
.
For high-dimensional and sparse data, L0L2
is more effective.
The type of algorithm used to minimize the objective function, default is CD
.
Currently CD
and CDPSI
are supported.
The CDPSI
algorithm may yield better results, but it also increases running time.
The number of non-zore coefficients, this value will affect the final performance. The maximum support size at which to terminate the regularization path.
The number of folds for cross-validation, default is 10
.
The percent of all samples used for sparse_regression
, default is 1
.
Threshold of \(R^2\) or correlation coefficient, default is 0
.
Logical value, default is TRUE
, whether to print progress messages.
Parameters for other methods.
The weight data table of sub-network
data("example_matrix")
head(
single_network(
example_matrix,
regulators = colnames(example_matrix),
target = "g1"
)
)
#> regulator target weight
#> 1 g10 g1 0.005805182
#> 2 g11 g1 0.006012177
#> 3 g12 g1 0.010277177
#> 4 g13 g1 -0.001451393
#> 5 g14 g1 -0.012476081
#> 6 g15 g1 0.016008143
single_network(
example_matrix,
regulators = c("g1", "g2", "g3"),
target = "g1"
)
#> regulator target weight
#> 1 g2 g1 0.8628827
#> 2 g3 g1 -0.1371173
single_network(
example_matrix,
regulators = c("g1", "g2"),
target = "g1"
)
#> ! Warning: less than 2 regulators found while modeling: g1
#> NULL