This crate provides the command line interface for fireflow.
It currently only supports a subset of features provided by the full Rust interface (and other wrappers such as Python).
Supported features:
- reading HEADER and TEXT as JSON blobs
- exporting DATA as a TSV stream
- raw and standard mode
- most repair flags
- dumping the spillover or compensation matrices
- dumping the measurement keywords as a table
This is not yet available on crates.io so it must be built locally. Ensure
cargo is installed and run the following:
clone https://github.com/usnistgov/fireflow
cd fireflow/crates/fireflow-cli
cargo install --path .Ensure $PATH includes $CARGO_HOME/bin.
Now fireflow can be invoked from any shell.
fireflow by default will only read an FCS file if it follows the standard
perfectly.
However, flags may be provided which can repair most deviations. Pass --help
for any subcommand (header, raw, std, etc) depicted below to see available
flags.
For a pristine file:
fireflow header -i <path/to/file>For a file with a DATA segment which is has an end offset one greater than it should be (which will be beyond the length of the file and thus trigger an error):
fireflow header -i <path/to/file> --data-correction-end=-1For a pristine file:
fireflow raw -i <path/to/file>For a file which doesn't use escaped delimiters (which also likely means some keyword values are empty):
fireflow raw -i <path/to/file> --use-literal-delims --allow-emptyIf successful, this will output the keywords (split by standard and non-standard) as written in TEXT, along with some miscellaneous data from parsing (such as the delimiter).
For a pristine file:
fireflow std -i <path/to/file>For a file which "lies" about its version (HEADER says 3.0 but should say 3.1).
fireflow std -i <path/to/file> --version-override=3.1This will output a JSON object with the keywords neatly decomposed into primitive types and arranged hierarchically (for example, $TR will have two fields for name and threshold, measurements will be arranged in an array, the data layout will be a separate array, etc). The exact structure is version-specific.
For now, this requires reading TEXT in standardized mode (in theory raw is also possible but not supported yet).
For a pristine file:
fireflow data -i <path/to/file>For a file which has the wrong value for $TOT:
fireflow data -i <path/to/file> --allow-tot-mismatchThis will output the DATA segment as a tab-separated value stream to stdout with $PnN as the headers.
This will print all measurement keywords as a table, where each row is a measurement and each column is a measurement keyword (ie $Pn*).
fireflow measurements -i <path/to/file>Depending on version, this will print the value(s) for the $DFCmTOn keywords (2.0), the $COMP keyword (3.0), or the $SPILLOVER keyword (3.1+).
fireflow spillover -i <path/to/file>