npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flusso

v0.1.2

Published

FCS (Flow Cytometry Standard) parser

Downloads

3

Readme

Build Status NPM version

flusso

Dead simple FCS (Flow Cytometry Standard) file parsing utility.

Install

For developers

Checkout the repository and install all the dependencies as follows. yarn is our preferred dependency manager:

$ git clone https://github.com/hammerlab/flusso.git
$ cd flusso
$ yarn
$ yarn link # so that we run as a command

Use

Command Line Interface (CLI)

Once you install flusso, you should be able to invoke the CLI as follows:

$ flusso --help
Usage: flusso [options] [command]

Options:
  -V, --version       output the version number
  -h, --help          output usage information

Commands:
  json <fcsFile>      converts the FCS file into JSON format
  tsv <fcsFile>       converts the FCS file into TSV format
  validate <fcsFile>  parses the file and exits
  *                   prints help and exits

Validate

$ flusso validate test/testfile-Donor42-CD4-CD8.fcs \
    && echo "looks good"
looks good

$ touch /tmp/empty.fcs
$ flusso validate /tmp/empty.fcs 2> /dev/null \
    || echo "looks bad"
looks bad

Export as JSON

Recommended companion tool: jq.

$ flusso json test/testfile-Donor42-CD4-CD8.fcs | jq ".HEADER"
{
  "version": "FCS3.0",
  "_": "    ",
  "textBegin": 256,
  "textEnd": 3744,
  "dataBegin": 3748,
  "dataEnd": 13203747,
  "analysisBegin": 0,
  "analysisEnd": 0
}

$ flusso json test/testfile-Donor42-CD4-CD8.fcs | jq ".TEXT._TOT"
"300000"

$ flusso json test/testfile-Donor42-CD4-CD8.fcs | jq ".DATA | length"
300000

$ flusso json test/testfile-Donor42-CD4-CD8.fcs | jq ".DATA[0]"
[
  79785.59375,
  28077.822265625,
  18567.943359375,
  2307.93359375,
  384.65557861328125,
  379.2283630371094,
  174.4023895263672,
  6579.56591796875,
  45.95596694946289,
  103.18415069580078,
  331
]

Export as TSV

This will eat all the metadata expect the parameter names, but is useful for streamlining the analysis across multiple files. Recommended companion tool: datamash.

$ flusso tsv test/testfile-Donor42-CD4-CD8.fcs | head -5
FileName	FSC-A	SSC-A	FITC-A	PE-A	PerCP-Cy5.5-A	PE-Cy7-A	APC-A	APC-Cy7-A	V450-A	V500-A	Time
test/testfile-Donor42-CD4-CD8.fcs	79785.59375	28077.822265625	18567.943359375	2307.93359375	384.65557861328125	379.2283630371094	174.4023895263672	6579.56591796875	45.95596694946289	103.18415069580078	331
test/testfile-Donor42-CD4-CD8.fcs	75418.953125	20048.900390625	16241.6923828125	1972.1231689453125	366.3386535644531	495.91400146484375	198.55947875976562	6481.75927734375	34.683746337890625	102.31705474853516	342
test/testfile-Donor42-CD4-CD8.fcs	73400.875	21521.71875	8060.80712890625	1018.2857666015625	24166.818359375	4319.404296875	101.34193420410156	804.2542724609375	29.481185913085938	117.05764770507812	344
test/testfile-Donor42-CD4-CD8.fcs	75060.1796875	27572.412109375	14014.4892578125	1778.7777099609375	36766.83203125	6424.49462890625	129.62339782714844	657.544189453125	67.63330841064453	45.088871002197266	351
test/testfile-Donor42-CD4-CD8.fcs	69146	22488.4453125	16298	1831.693359375	306.6390380859375	160.78196716308594	103.69872283935547	5276.26171875	47.69015121459961	73.70296478271484	354

$ flusso tsv test/testfile-Donor42-CD4-CD8.fcs | datamash -H mean 4 count 1
mean(FITC-A)	count(FileName)
15294.586121011	300000