pcsf2featuremap provides a lightweight R interface to the core prize-collecting Steiner forest (PCSF) solver used by featuremap.
This package is designed as a minimal wrapper around the original PCSF C++ solver so that featuremap can call the core optimization routine through a small and stable interface, without depending on the full original PCSF R package and its additional visualization or enrichment-analysis dependencies.
The original PCSF package provides a complete framework for network-based interpretation of high-throughput biological data, including PCSF optimization, randomized runs, plotting, and enrichment analysis.
For featuremap, only the core PCSF solver is required. This package exposes that solver through:
call_sr(from, to, cost, node_names, node_prizes)featuremap builds its own metabolomics-specific workflow around this function, including:
- feature-to-metabolite network construction
- terminal prize calculation
- hub penalty assignment
- dummy node construction
- repeated randomized PCSF runs
- node and edge frequency aggregation
- network-supported metabolite annotation
You can install pcsf2featuremap from GitHub:
remotes::install_github("tidymass/pcsf2featuremap")or:
pak::pak("tidymass/pcsf2featuremap")This package is primarily intended to be used internally by featuremap.
The exported function is:
pcsf2featuremap::call_sr(
from,
to,
cost,
node_names,
node_prizes
)Arguments:
from: character vector of edge source nodesto: character vector of edge target nodescost: numeric vector of edge costsnode_names: character vector of node namesnode_prizes: numeric vector of node prizes
The function returns the selected PCSF edges and nodes from the C++ solver.
The core solver in this package is adapted from the original PCSF R package:
https://github.com/IOR-Bioinformatics/PCSF
The original solver implements the prize-collecting Steiner forest heuristic described by Akhmedov et al.
This package is a lightweight extraction/wrapper of the core solver interface for use in featuremap. It does not reimplement the PCSF algorithm independently.
If you use this package or featuremap for PCSF-based analysis, please cite the original PCSF algorithm/software:
Akhmedov, M., Kedaigle, A., Chong, R. E., Montemanni, R., Bertoni, F., Fraenkel, E., & Kwee, I.
A fast prize-collecting Steiner forest algorithm for functional analyses in biological networks.
Please also cite featuremap where appropriate.
This package includes/adapts code from the original PCSF implementation. Please retain attribution to the original PCSF authors and repository when reusing or redistributing the solver.