How bartongroup/prointvar works
Project type and purpose
• ProIntVar is a Python library and CLI tool for working with protein structures (mmCIF/PDB), secondary-structure (DSSP), cross-mapping (SIFTS), interface contacts (Arpeggio, HBPLUS, Reduce), and genetic variants (UniProt, Ensembl), all unified via Pandas DataFrames.
• It is not a web or full-stack app but an analysis/processing toolkit with a command-line interface and modular components.
File structure
• Top-level:
• cli/ – CLI entrypoint (main.py)
• prointvar/ – core modules (pdbx, dssp, sifts, fetchers, merger, etc.)
• tests/ – unit tests and test data
• Config: prointvar/config.py and config_template.ini define folder layout (db_pdbx, db_dssp, etc.).
• Setup: setup.py, requirements.txt.
• No server or database; storage is file-system-based under configured directories.
README for additional insights
• Core classes each produce/consume Pandas DataFrames.
• TableMerger merges multiple DataFrames into one unified table.
• CLI commands orchestrate downloads, runs of external binaries (DSSP, HBPLUS, Reduce), and invoke readers/parsers.
Main components and interactions
a. Components:
• CLI Layer (cli/main.py)
• Configuration Manager (prointvar/config.py)
• Core Data Processors:
• PDBXreader / PDBXwriter
• DSSPrunner / DSSPreader
• SIFTSreader
• ArpeggioParser, HBPLUSParser, ReduceRunner
• Fetchers (Proteins API, PDBe, Ensembl)
• TableMerger
• Utility modules (utils.py, library.py, variants.py, rmsd.py, stamp.py)
• External Tools / Services:
• DSSP, HBPLUS, Reduce, Arpeggio binaries
• UniProt, PDBe REST API, Ensembl REST API
• File System (configured folders: db_pdbx, db_dssp, db_sifts, db_contacts, db_tmp)
b. Data flow:
1. CLI parses user args → loads config
2. Fetchers download raw files to folders
3. Runners (DSSP, Reduce, HBPLUS, Arpeggio) generate analysis files
4. Readers/parsers convert files into Pandas DataFrames
5. TableMerger merges DataFrames → final DataFrame
6. Output: write DataFrame to disk or pipe to user script
c. Architectural patterns:
• Modular single-responsibility classes
• Pipeline pattern: successive transformations of data files → DataFrames
• Plugin-like extensibility: new fetchers or parsers can be dropped into prointvar/
d. Key technologies:
• Python 3.5+, Pandas
• Third-party binaries (DSSP, HBPLUS, Reduce)
• REST APIs for external data
• CLI via argparse or similar