Learn R Programming

scPOEM (version 0.1.3)

PGN_Lasso: Peak-Gene Network via Lasso

Description

Construct the peak-gene network via Lasso.

Usage

PGN_Lasso(
  X,
  Y,
  gene_data,
  neibor_peak,
  dirpath = tempdir(),
  count_device = 1,
  rebuild_PGN_Lasso = TRUE,
  save_file = TRUE
)

Value

The PGN_Lasso network.

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_Lasso

Logical. Whether to rebuild the peak-gene network via Lasso from scratch. If FALSE, the function will attempt to read from PGN_Lasso.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.

Examples

Run this code
# \donttest{
library(scPOEM)
dirpath <- "./example_data"
# Download single mode example data
data(example_data_single)
# Construct PGN net via Lasso.
net_Lasso <- PGN_Lasso(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)
# }

Run the code above in your browser using DataLab