Metadata-Version: 2.4
Name: cd-analyzer
Version: 0.3.0
Summary: CD spectroscopy data analysis toolkit — parse .dsx files, batch fit protein thermal melting curves, global spectral fitting, calculate thermodynamic parameters
Project-URL: Homepage, https://github.com/YOUR_USERNAME/cdanalyzer
Project-URL: Repository, https://github.com/YOUR_USERNAME/cdanalyzer
Author: cdanalyzer contributors
License: MIT
Keywords: biophysics,cd-spectroscopy,data-analysis,protein-folding,thermodynamics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=1.26
Requires-Dist: openpyxl>=3.1
Requires-Dist: pandas>=2.1
Requires-Dist: scipy>=1.11
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.9; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Description-Content-Type: text/markdown

# cd-analyzer

CD spectroscopy data analysis toolkit — parse `.dsx` binary files, fit protein thermal melting curves, global spectral fitting, and calculate thermodynamic parameters (Tm, ΔH, ΔG).

## Install

```bash
pip install cd-analyzer
```

## Quick start

```bash
# Single-sample analysis
cdanalyzer analyze ./my_data/
cdanalyzer spectral ./my_data/
cdanalyzer svd ./my_data/

# Batch analysis across multiple samples
cdanalyzer batch ./experiment/ ./output/
```

### Python API

```python
from cdanalyzer import help_read_multifile, spectral_global_fit, batch_analyze

# Parse and fit
data = help_read_multifile("my_data/")
result = spectral_global_fit(data)
print(result["Tm (°C)"], result["ΔH (kJ/mol)"])

# Batch process all samples
batch_analyze("experiment/", "output/")
```

Output per sample:
- `reports.md` — summary table with Tm, ΔH, R²
- `spectra_low_T.png` — low-temperature CD spectrum
- `analysis.png` — 4-panel diagnostic (spectra, fit curve, populations, SVD)
- `data.xlsx` — raw data, fit parameters, SVD results

## Features

- **Binary `.dsx` parser** — native JASCO CD spectrometer format
- **Single-wavelength fit** — van't Hoff two-state model with linear baselines
- **Global spectral fit** — shared Tm/ΔH across all wavelengths for robust estimates
- **SVD analysis** — assess two-state vs multi-state transitions
- **Batch processing** — auto-discover `{sample}/[temp*.dsx][buffer.dsx]` directory layout
