| new {GEARS} | R Documentation |
new(x, prior, config);
GEARS implements of the interface InsilicoPerturbationExperiment, which could be used as the virtual perturbation experiment container for run knockouts/overexpress/knockdown experiments
a new GEARS model object that the gene regulatory graph has been created from the given prior network and expression data, the training sample set should be set via the training_set api at first and then the model can be trained via the train api.
imports ["GEARS","bnlearn"] from "biosystem";
imports "geneExpression" from "phenotype_kit";
let exprData = load.expr("./dataset.csv");
let samples = read.sampleinfo("./experiment.csv");
let opts = new("GEARS_opts", Activation = "tanh");
let net = bnlearn::prior_network(
TF = c(), target_gene = c(), regulation_type = c(), confidence = c(), evidence = c()
) |> as.prior_net();
net <- GEARS::new(exprData, net, opts)
|> training_set(exprData, controls = c(), perturbed = samples)
|> train()
;
make_exports(c(
net |> knockouts(c()),
net |> overexpress(c()),
net |> knockdown(c())
), dir = "./GNN_result");