PGN_RF: Peak-Gene Network via Random Forest

View source: R/PGN_RF.R

PGN_RFR Documentation

Peak-Gene Network via Random Forest

Description

Construct the peak-gene network via random forest.

Usage

PGN_RF(
  X,
  Y,
  gene_data,
  neibor_peak,
  dirpath = tempdir(),
  count_device = 1,
  rebuild_PGN_RF = TRUE,
  save_file = TRUE,
  seed = NULL,
  python_env = "scPOEM_env"
)

Arguments

X

The scATAC-seq data, sparse matrix.

Y

The scRNA-seq data, sparse matrix.

gene_data

The information for genes, must have a col names "gene_name".

neibor_peak

The peak IDs within a certain range of each gene, must have cols c("gene_name", "start_use", "end_use"). The id numbers in "start_use" and "end_use" are start from 0.

dirpath

The folder path to read or write file.

count_device

The number of cpus used to train the Lasso model.

rebuild_PGN_RF

Logical. Whether to rebuild the peak-gene network via random forest from scratch. If FALSE, the function will attempt to read from PGN_RF.mtx under dirpath/test in single mode or dirpath/state_name/test in compare mode.

save_file

Logical, whether to save the output to a file.

seed

An integer specifying the random seed to ensure reproducible results.

python_env

Name or path of the Python environment to be used.

Value

The PGN_RF network.

Examples


library(scPOEM)
dirpath <- "./example_data"
# Download single mode example data
data(example_data_single)
# Construct PGN net via random forest (RF).
net_RF <- PGN_RF(example_data_single$X,
                 example_data_single$Y,
                 example_data_single$gene_data,
                 example_data_single$neibor_peak,
                 file.path(dirpath, "single"),
                 save_file=FALSE)



scPOEM documentation built on Aug. 28, 2025, 9:09 a.m.

Related to PGN_RF in scPOEM...