How rsinghlab/scot works
Main Components
• Core Alignment Engines:
• SCOT v1.0 (located in src/scotv1.py) implements Gromov-Wasserstein optimal transport with a self-tuning hyperparameter heuristic.
• SCOT v2.0 (located in src/scotv2.py) extends functionality with unbalanced optimal transport and multi-modal alignment.
• Data Handling:
• The “data” directory holds input datasets; these include real single-cell omics datasets (e.g., in SNARE and scGEM subdirectories) and simulated data (in the simulations subdirectory).
• There are also feature descriptions and metadata files (npy, csv, txt).
• Examples & Replication:
• “examples” and “replication” directories contain Jupyter notebooks and scripts that demonstrate the tool’s usage, including hyperparameter tuning and evaluation.
• Experimentation / Evaluation Scripts:
• Files like src/evals.py and various notebooks in src or ipynb_checkpoints that may offer insight into evaluation routines or helpers.
• Supporting Documentation & Assets:
• README, LICENSE, requirements.txt, and the “assets” directory (which holds the project logo and possibly other visual assets).
Relationships and Data Flow
• Input Stage: Raw data from the “data” directory (both real datasets and simulations) is fed into the SCOT alignment functions.
• Processing Stage:
• The SCOT core modules (scotv1.py and scotv2.py) perform alignment by constructing kNN graphs from the input domains, applying optimal transport techniques, and optionally tuning hyperparameters.
• Output Stage:
• The aligned outputs are returned by the align() method, which can then be visualized or further processed.
• Auxiliary Components:
• Example notebooks and replication scripts act as user interfaces to drive and test the alignment processes.
• Dependency Management:
• The requirements.txt file indicates external libraries and modules that the tool relies on.
Architectural Patterns and Design Principles
• Modular Design: Separation between core alignment functionality (in src), data input/output (organized in data), and experimental demonstration (in examples/replication).
• Reusability and Extensibility: The design supports plugging in different alignment techniques (v1.0 versus v2.0), and optional hyperparameter and normalization parameters.
• Clear API Design: As shown in the README “Basic use” example, users instantiate a SCOT object with two matrices and then call align() to obtain outputs.
Relevant Technologies, Frameworks, or Libraries
• Python as the main language.
• Jupyter Notebooks for the provided examples and replicability.
• Numpy and possibly other data science libraries listed in the requirements.txt.
• Graph-based libraries may be implied for kNN graph construction, though they are indirectly referenced in the code.
• The optimal transport libraries (or custom implementations) implementing Gromov-Wasserstein computations.