Metadata-Version: 2.5
Name: mindmap-synaptome
Version: 0.1.0
Summary: Collect, store, and share all the metrics from a research study as one portable object.
Project-URL: Repository, https://github.com/NinoHerve/mindmap-synaptome
Project-URL: Documentation, https://ninoherve.github.io/mindmap-synaptome/
Author-email: Nino Herve <herve.nino@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: pyarrow>=14
Requires-Dist: scipy>=1.10
Provides-Extra: dev
Requires-Dist: nbmake>=1.5; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest-mpl>=0.17; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: docs
Requires-Dist: ipykernel>=6; extra == 'docs'
Requires-Dist: mkdocs-jupyter>=0.24; extra == 'docs'
Requires-Dist: mkdocs-material>=9; extra == 'docs'
Requires-Dist: mkdocs<2,>=1.6; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'docs'
Description-Content-Type: text/markdown

# mindmap-synaptome

Collect, store and share a research study's analysis-ready data as **one object**, and ask it questions:
tests, estimates and figures that know the study's design.

synaptome keeps every metric of a study (per subject, per trial, per time point, per source...) in a single
`Study`, with a data dictionary and the hierarchy of its units, saved as one `.syn` file anyone can open.
On top of it, you ask **questions** (what to compare, on which data) and synaptome works out the design:
paired or independent, which units are independent, which pairs have complete data. Tests and estimates
refuse what the design makes invalid and say what fits instead; results are plain values that carry their
question, settings and a fingerprint of the data they read.

## Install

Part of the mindmap collection: installed as `mindmap-synaptome`, imported as `synaptome`.

```bash
pip install git+https://github.com/NinoHerve/mindmap-synaptome   # Python 3.10+
```

## Quickstart

```python
import synaptome as syn

study = syn.datasets.method_comparison()          # a toy study; syn.load("study.syn") for yours
q = study.compare("error", by="method", reference="proposed", subset={"sensors": "eeg"},
                  reduce={"source": "median"}, higher_is_better=False)
r = q.test("wilcoxon", alternative="less")        # per pair, Holm-corrected, with effect sizes
print(r.to_markdown())                            # an APA-style table for a paper
r.plot()                                          # the groups, each subject joined, significance brackets
```

With your own data, two pandas DataFrames are enough to start:

```python
study = syn.Study("Weight trial")
study.add_units("subject", subjects)              # columns: subject, group, age, ...
study.add("weight", weights)                      # columns: subject, week, weight
study.compare("weight", by="group", reduce={"week": "slope"}).test("welch").plot()
```

## What it does

- **One study, one file**: units in a hierarchy (nested or crossed), variables with dimensions, strict
  validation, a `.syn` file of Parquet and JSON that any tool can read.
- **Questions that read the design**: paired or independent from where the factor lives, complete cases per
  pair, guard rails against pseudo-replication and unreduced data.
- **Tests and estimates** with the right defaults: Wilcoxon, t-tests, McNemar, bootstrap, omnibus tests,
  cluster permutation along a dimension, normality; effect sizes with intervals; corrections within and across
  results; formatted tables.
- **Pre-registration**: questions written before the data, stored in the study; every result says whether its
  question came first.
- **Figures** of data and results, drawing exactly what was tested.

## Learn more

- [Documentation](https://ninoherve.github.io/mindmap-synaptome/): concepts, tutorials, API reference.
- [Tutorials](https://github.com/NinoHerve/mindmap-synaptome/blob/main/tutorials/README.md): runnable notebooks, from setup to pre-registration and plotting.
- [Changelog](https://github.com/NinoHerve/mindmap-synaptome/blob/main/CHANGELOG.md), [contributing](https://github.com/NinoHerve/mindmap-synaptome/blob/main/CONTRIBUTING.md).

mindmap-synaptome is released under the [MIT license](https://github.com/NinoHerve/mindmap-synaptome/blob/main/LICENSE).
