scverse / pytometry

Flow & mass cytometry analytics.
https://pytometry.readthedocs.io/en/latest/index.html
Apache License 2.0
41 stars 10 forks source link

Write fcs function #50

Open mbuttner opened 10 months ago

mbuttner commented 10 months ago

Pytometry should include a function to export an anndata file to fcs using the Gating ML 2.0 version and FCS standard 3.*

quentinblampey commented 2 months ago

In scyan, there is this write_fcs function that we could move to pytometry But it uses fcswrite internally, and it seems this repository is not actively maintained, what do you think?

EDIT: we can also add this write_csv function, since FlowJO supports reading from CSV files

grst commented 2 months ago

A couple points from the discussion in https://github.com/scverse/governance/issues/64:

adata = readfcs.read("sample.fcs", backend="fcsparser")
adata = readfcs.read("sample.fcs", backend="flowio")
readfcs.write(adata, "sample.fcs", backend="flowio")
pip install flowio[anndata]
adata = flowio.FlowData('sample.fcs').to_anndata()