| build_gps {GPS} |
R Documentation |
Build a GPS (GNN + Transformer) gene regulatory network model.
Description
Usage
build_gps(x,
prior = NULL,
config = NULL);
Arguments
x
the time series gene expression matrix object: rows are genes and columns are samples, and every sample must carry a time point label (for example the matrix loaded by geneExpression::load.expr). At least three distinct time points are required. [as GeneExpressionData]
prior
the prior regulatory network object (for example created by bnlearn::as.prior_net). Gene pairs that are not described by this network are kept as isolated nodes and still participate in the global attention branch. [as PriorNetwork]
config
the hyper-parameter configuration created by gps::gps_config; when Nothing the default GPSConfig values are used. Note that the window length may be clipped when the input has too few time points. [as GPSConfig]
env
the R# runtime environment. [as Environment]
Details
The constructor performs the following preparation steps once and keeps the results, so they are reused by every training epoch and by the virtual perturbation analysis:
- preprocessing: CPM normalization,
log2(x + 1) transformation, per gene z-score and
the optional high variance gene filter;
- graph construction: the prior
TF -> target edges are mapped onto the modelled genes,
optionally extended with co-expression edges;
- static graph encoding: shortest path distance buckets, Laplacian positional encoding and
the in/out degree buckets;
- the strictly time ordered train / validation / test split of the sliding windows.
The returned object is untrained; call gps::train before any prediction or perturbation analysis. It can also be persisted with the writeBin handler and restored with readBin.modular_bayesian.
Authors
biosystem
Value
an untrained GPSModel object
clr value class
Examples
[Package
GPS version 1.0.0.0
Index]