Metadata-Version: 2.3
Name: anndata-fcs
Version: 0.2.0
Summary: Converting FCS files to AnnData objects.
Author: harryhaller001
Author-email: harryhaller001 <harryhaller001@gmail.com>
License: MIT License
         
         Copyright (c) 2025 harryhaller001
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Dist: anndata
Requires-Dist: flowio
Requires-Dist: matplotlib
Requires-Dist: ipython ; extra == 'docs'
Requires-Dist: nbsphinx ; extra == 'docs'
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinx-autoapi ; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints ; extra == 'docs'
Requires-Dist: sphinx-book-theme ; extra == 'docs'
Requires-Dist: flit ; extra == 'test'
Requires-Dist: ipykernel ; extra == 'test'
Requires-Dist: ipython ; extra == 'test'
Requires-Dist: ipywidgets ; extra == 'test'
Requires-Dist: pandas-stubs ; extra == 'test'
Requires-Dist: pre-commit ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov>=7 ; extra == 'test'
Requires-Dist: ruff ; extra == 'test'
Requires-Dist: scanpy ; extra == 'test'
Requires-Dist: twine ; extra == 'test'
Requires-Dist: ty ; extra == 'test'
Maintainer: harryhaller001
Maintainer-email: harryhaller001 <harryhaller001@gmail.com>
Requires-Python: >=3.11
Project-URL: Documentation, https://harryhaller001.github.io/anndata-fcs/
Project-URL: Source, https://github.com/harryhaller001/anndata-fcs
Provides-Extra: docs
Provides-Extra: test
Description-Content-Type: text/markdown

# anndata-fcs

![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/harryhaller001/anndata-fcs/testing.yml)
![PyPI - Version](https://img.shields.io/pypi/v/anndata-fcs)
![PyPI - License](https://img.shields.io/pypi/l/anndata-fcs)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/anndata-fcs)


Converting CITESeq data to FCS file format. `anndata-fcs` implements function to convert from `AnnData` object to
`FlowData` objects, `DataFrame` objects and vice versa. For loading and generation of FCS files `anndata-fcs` uses
the implementation of the `flowio` package.

### Get started

You can install `anndata-fcs` with `pip`:

`pip install anndata-fcs`


### Example

```python
# Load anndata object
adata = sc.read_10x_h5(
    filename="5k_pbmc_protein_v3_nextgem_filtered_feature_bc_matrix.h5",
    gex_only=False,
)

# Filter citeseq data
adata_citeseq = adata[:, adata.var["feature_types"] == "Antibody Capture"]

# Convert data to fcs format
fcs_data = anndata_to_fcs(adata_citeseq)

# Save fcs file
fcs_data.write_fcs("citeseq.fcs")
```


### Development

Install development version of `anndata-fcs` with `git`:

`git clone git+https://github.com/harryhaller001/citeseq_to_fcs.git`


To setup development environment create python virtual environment:

```bash
python3 -m virtualenv venv
source venv/bin/activate
```


Use `make` to setup dependencies:

```bash
make install

# activate pre-commit
pre-commit install
```

Run checks with `make`:

```bash
# Run all checks
make check

# Run formatting
make format

# Run unit testing with pytest
make testing

# Run type checks with mypy
make typing
```

### Dependencies

Required dependencies:

- `flowio` (Documentation: https://flowio.readthedocs.io/en/latest)
- `anndata` (Documentation: https://anndata.readthedocs.io/en/latest)
- `matplotlib` (Documentation: https://matplotlib.org/stable/)

Optional dependencies:

- For density plots, `scipy` is required.


### License

Please refer to the [LICENSE](https://github.com/harryhaller001/citeseq_to_fcs/blob/main/LICENSE) file
