Skip to content

harryhaller001/anndata-fcs

Repository files navigation

anndata-fcs

codecov GitHub Actions Workflow Status PyPI - Version PyPI - License PyPI - Python Version

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

# 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:

python3 -m virtualenv venv
source venv/bin/activate

Use make to setup dependencies:

make install

# activate pre-commit
pre-commit install

Run checks with make:

# 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:

Optional dependencies:

  • For density plots, scipy is required.

License

Please refer to the LICENSE file