Add Logistic PCA (LPCA) analysis#500
Draft
Jeebjean wants to merge 2 commits into
Draft
Conversation
Adds an analysis.lpca config block (include, k, m, cv, transpose) with a matching LpcaAnalysis schema, an lpca_analysis Snakemake rule restricted to algorithms with multiple parameter combinations, and an LPCA analysis module that builds the binary edge-by-run matrix via summarize_networks and runs the logisticPCA container through run_container_and_log. m is fixed by default; cross-validation and matrix transposition are opt-in.
Adds docker-wrappers/lpca with a pinned rocker/r-base Dockerfile that installs logisticPCA and its ggplot2 dependencies, the run_lpca.R and run_cv.R scripts under /app, and a README documenting the config options, script contracts, and how to build and publish reedcompbio/lpca:v1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Logistic PCA (LPCA) as a new SPRAS analysis, reducing the binary
edge-by-run matrix built from pathway reconstruction outputs and reporting the
proportion of deviance explained. LPCA is the binary-data counterpart to the
existing PCA analysis.
Changes
analysis.lpcaconfig block (include,k,m,cv,transpose) witha matching
LpcaAnalysisschema and wiring inconfig.py.lpca_analysisSnakemake rule, restricted to algorithms with multipleparameter combinations (same guard as the per-algorithm PCA analysis).
spras/analysis/lpca.py: builds the binary matrix viasummarize_networksand runs the logisticPCA container through
run_container_and_log.misfixed by default; cross-validation (
cv: true) and matrix transposition(
transpose: true, giving runs x edges to mirror the classic PCA analysis)are opt-in.
docker-wrappers/lpca/: pinnedrocker/r-baseDockerfile installinglogisticPCA and its ggplot2 dependencies, the
run_lpca.R/run_cv.Rscripts, and a README.
Testing
Testing this PR locally
The wrapper is included in this PR, so you can build the image locally and run
LPCA without waiting for anything to be published:
Docker uses the local image without pulling, so once it is built, enable
analysis.lpca.include: truein your config and run the pipeline as usual.I built and tested this end to end locally on pathlinker and omicsintegrator1.
Before / at merge
For users who do not build locally, the image needs to be published to
reedcompbio/lpca:v1on Docker Hub by a maintainer with organization access:cc @agitter @ntalluri