File size: 5,008 Bytes
9ecdbfb
 
 
 
 
 
 
 
 
 
 
 
33ba306
 
 
 
 
 
 
 
 
 
42ce3db
33ba306
42ce3db
 
 
 
 
 
 
 
33ba306
42ce3db
 
 
 
 
33ba306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42ce3db
 
 
 
920a598
42ce3db
33ba306
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
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

```bash
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-Ag<sub>N</sub> 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-Ag<sub>N</sub> Mode
For custom xeno nucleic acids (TNA, PNA, LNA, etc.).
- Enter XNA name for identification
- Enter complete molecular formula (e.g., C<sub>100</sub>H<sub>120</sub>N<sub>40</sub>O<sub>60</sub>P<sub>10</sub>)
- Optionally use JSME structure drawer to get formula

## Workflow

1. **Select Mode** - Choose DNA-Ag<sub>N</sub>, Ag(I)-DNA/XNA Complex, or XNA-Ag<sub>N</sub> from the mode selector
2. **Upload Spectrum** - Click "Choose File" and select your mass spectrum file
3. **Enter Information** - Provide DNA sequence or XNA formula based on selected mode
4. **Apply Settings** - Click the "Apply" button to confirm your settings
5. **Analyze Peaks** - Click any peak in the spectrum to find matching compositions
6. **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) |
| n<sub>Ag <sub>| 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. * ACS Meas. Sci. Au* 2026. [DOI: 10.1021/acsmeasuresciau.6c00178](https://doi.org/10.1021/acsmeasuresciau.6c00178)

## Support

- **Developer:** I-Hsin (Vivian) Lin
- **Email:** ihl1@uci.edu
- **Lab:** Copp Lab, University of California, Irvine