#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

#988 in Filesystem

Download history 7/week @ 2024-02-23 3/week @ 2024-03-01 39/week @ 2024-03-29 12/week @ 2024-04-05

51 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–4.5MB
~89K SLoC