#parser #fcs #facs #flow-cytometry

nightly flowfairy_api

Library for processing flow cytometry data

3 unstable releases

0.2.2 Jun 8, 2023
0.2.0 Jan 19, 2023
0.1.0 Jan 18, 2023

#1003 in Filesystem

25 downloads per month

BSD-3-Clause

435KB
251 lines

FlowFairy API

This crate provides methods for manipulating flow cytometry files. Please refer to the API documentation for more information.

Installation

This crate is available on crates.io. To use it, add the following to your Cargo.toml:

[dependencies]
flowfairy_api = "0.2.2"

Usage

Reading an fcs file:

use flowfairy_api::fcs::FcsFile;

fn main() {
    let fcs_file = FcsFile::open("./path/to/file.fcs").unwrap();
    let data = fcs_file.read().unwrap();

    // use the metadata field to get the FCS version
    println!("FCS version: {}", data.metadata.version);

    // use the parameters field to get the parameters
    println!("Parameters:");
    data.parameters.keys().for_each(|name| println!("{}", name));
}

lib.rs:

A crate for manpulating flow cytometry data.

NOTE: This library is still under development and is not ready for any kind of production use.

Installation

This crate is on crates.io and can be used by adding flowfairy_api to the dependencies in your project's cargo.toml.

[dependencies]
flowfairy_api = "0.2.2"

Examples

Opening and reading an FCS file:

use flowfairy_api::fcs::{FcsFile, FcsData, FcsError};
use std::io;

fn load_fcs_data() -> Result<FcsData, FcsError>{
let fcs_file = FcsFile::open("./path/to/file.fcs")?;
let data = fcs_file.read()?;

// use the parameters field to get the parameters
println!("Parameters:");
data.parameters.keys().for_each(|name| println!("{}", name));

Ok(data)
}

Dependencies

~3–5MB
~90K SLoC