Spaces:
Running
Running
metadata
title: NucleoSpec
emoji: π¬
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: cc-by-nc-4.0
short_description: ESI-MS analysis of nucleic acid-silver complexes
NucleoSpec
Nucleic Acid-Silver Complex & Cluster Analyzer
A web-based application for analyzing nucleic acid (DNA/XNA)-silver complexes and nanoclusters from mass spectrometry data.
Project Structure
NucleoSpec/
βββ dna_silver_webapp.py # Main Flask application
βββ core/
β βββ analyzer.py # DNASilverAnalyzer class (composition search)
β βββ spectrum.py # SpectrumMixin: parsing, peak detection
β βββ envelope.py # EnvelopeMixin: Gaussian fitting, symmetry
β βββ scoring.py # ScoringMixin: pattern similarity, scoring
β βββ isotope.py # IsotopeMixin: isotope pattern generation
β βββ charge.py # ChargeMixin: charge state detection
β βββ adducts.py # AdductMixin: custom adduct CRUD
β βββ dna.py # DNAMixin: DNA/XNA composition helpers
βββ lib/
β βββ pythoms/ # PythoMS library (isotope calculations)
βββ templates/
β βββ index.html # Single-page frontend (Plotly.js, JSME)
βββ sample_data/ # Example spectrum files
βββ environment_hf.yml # HuggingFace deployment environment
Installation
conda env create -f environment.yml
conda activate dna_mass_spec
python dna_silver_webapp.py
Open http://localhost:8080 in browser.
Analysis Modes
DNA-AgN Mode
For single-stranded DNA-silver nanoclusters.
- Enter DNA sequence using A, T, G, C bases
- Automatically calculates molecular composition
- Uses Nβ/Qcl framework for cluster characterization
Ag(I)-DNA/XNA Complex Mode
For double-stranded DNA or DNA/XNA hybrids.
- DNA Complex: Enter two DNA sequences (Strand 1 and Strand 2)
- XNA Complex: Check "Use XNA" and enter two molecular formulas
- Formulas are automatically combined by adding atoms
XNA-AgN Mode
For custom xeno nucleic acids (TNA, PNA, LNA, etc.).
- Enter XNA name for identification
- Enter complete molecular formula (e.g., C100H120N40O60P10)
- Optionally use JSME structure drawer to get formula
Workflow
- Select Mode - Choose DNA-AgN, Ag(I)-DNA/XNA Complex, or XNA-AgN from the mode selector
- Upload Spectrum - Click "Choose File" and select your mass spectrum file
- Enter Information - Provide DNA sequence or XNA formula based on selected mode
- Apply Settings - Click the "Apply" button to confirm your settings
- Analyze Peaks - Click any peak in the spectrum to find matching compositions
- Compare Results - Toggle checkboxes to overlay theoretical isotope patterns on the experimental data
File Format
Spectrum files should be two-column format (tab or comma separated):
m/z intensity
1000.123 45678.9
1000.456 56789.0
1001.234 67890.1
Supported formats: .txt, .csv
Output Fields
| Field | Description |
|---|---|
| Formula | Neutral molecular formula of the cluster |
| Ion Formula | Charged species formula (can be copied) |
| nAg | Number of silver atoms in the cluster |
| Nβ | Number of effective valence electrons |
| Qcl | Charge of inorganic core |
| z | Charge state of the detected ion |
| ΞXβ | Difference between experimental and theoretical centroid (lower = better match). Primary criterion for Best Fit selection. |
| Pattern similarity | Mean of cosine similarity and Pearson correlation between experimental and theoretical isotope envelopes (0β1). Confidence indicator: β² > 0.8 high, β 0.5β0.8 moderate, β½ < 0.5 low |
Features
- Charge Detection - Automatic charge state determination from isotope spacing
- Isotope Pattern Matching - Compare experimental peaks with theoretical patterns
- Adduct Support - Account for common adducts (NHββΊ, NaβΊ, Clβ») plus user-defined custom adducts
- Structure Drawing - JSME molecule editor for drawing bioconjugate structures
- Data Export - Download theoretical spectra as CSV files
Technical Details
- Backend: Python 3.12, Flask, NumPy, SciPy
- Frontend: HTML5, JavaScript, Plotly.js, JSME
- Libraries: PythoMS, IsoSpecPy
Citation
If you use NucleoSpec in a publication, please cite:
Lin, I.-H.; Copp, S. M. A Tutorial on Automated Mass Spectral Analysis using NucleoSpec for Compositional Assignment of Nucleic AcidβSilver Complexes and Nanoclusters. ChemRxiv 2026. DOI: 10.26434/chemrxiv.15004738/v1
Support
- Developer: I-Hsin (Vivian) Lin
- Email: ihl1@uci.edu
- Lab: Copp Lab, University of California, Irvine