Skip to contents

Net class represents a gene regulatory network model for a specific gene subset. It handles the regression fitting and coefficient estimation.

Public fields

target_gene

Target gene for this model

regulators

Vector of regulator gene names

all_genes

All genes in the expression matrix

coef_matrix

Full coefficient matrix

fitted

Whether model has been fitted

Methods


Method new()

Create a new Net object

Usage

Net$new(target_gene = NULL, regulators = NULL, all_genes = NULL)

Arguments

target_gene

Target gene

regulators

Regulator genes

all_genes

All genes


Method fit()

Fit Ridge regression model

Usage

Net$fit(gem, alpha = 10, bagging_number = 20, sample_frac = 0.8)

Arguments

gem

Gene expression matrix (cells x genes)

alpha

Regularization strength

bagging_number

Number of bagging iterations

sample_frac

Sample fraction for bagging

Returns

Self (modified)


Method get_coef()

Get coefficient for a specific regulator

Usage

Net$get_coef(regulator)

Arguments

regulator

Regulator gene name

Returns

Coefficient value


Method get_active_regulators()

Get all non-zero regulators

Usage

Net$get_active_regulators()

Returns

Character vector of regulator names


Method print()

Print Net summary

Usage

Net$print()


Method clone()

The objects of this class are cloneable with this method.

Usage

Net$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.