Skip to main content

A Python library for SeaFlow data

Project description

Seaflowpy

A Python package for SeaFlow flow cytometer data.

Table of Contents

  1. Install
  2. Command-line Interface
  3. Configuration
  4. Testing

Install

This package is compatible with Python 3.10 and 3.11

Source

To install this project from a clone of the repo use poetry

poetry self add poetry-plugin-export
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install

PyPI

pip install seaflowpy

Docker

Docker images are available from Docker Hub at ctberthiaume/seaflowpy.

docker pull ctberthiaume/seaflowpy
docker run -it ctberthiaume/seaflowpy seaflowpy version

The Docker build file is in this repo at /Dockerfile. The build process for the Docker image is detailed in /build-docker.sh.

Command-line interface

All seaflowpy CLI tools are accessible from the seaflowpy executable. Run seaflowpy --help to begin exploring the CLI usage documentation.

SFL validation workflow

SFL validation sub-commands are available under the seaflowpy sfl command. The usage details for each command can be accessed as seaflowpy sfl <cmd> -h.

The basic worfkflow should be

  1. If starting with an SDS file, first convert to SFL with seaflowpy sds2sfl

  2. If the SFL file is output from sds2sfl or is a raw SeaFlow SFL file, convert it to a normalized format with seaflowpy sfl print. This command can be used to concatenate multiple SFL files, e.g. merge all SFL files in day-of-year directories.

  3. Check for potential errors or warnings with seaflowpy sfl validate.

  4. Fix errors and warnings. Duplicate file errors can be fixed with seaflowpy sfl dedup. Bad lat/lon errors may be fixed withseaflowpy sfl convert-gga, assuming the bad coordinates are GGA to begin with. This can be checked with with seaflowpy sfl detect-gga. Other errors or missing values may need to be fixed manually.

  5. (Optional) Update event rates based on true event counts and file duration with seaflowpy sfl fix-event-rate. True event counts for raw EVT files can be determined with seaflowpy evt count. If filtering has already been performed then event counts can be pulled from the all_count column of the opp table in the SQLITE3 database. e.g. sqlite3 -separator $'\t' SCOPE_14.db 'SELECT file, all_count ORDER BY file'

  6. (Optional) As a check for dataset completeness, the list of files in an SFL file can be compared to the actual EVT files present with seaflowpy sfl manifest. It's normal for a few files to differ, especially near midnight. If a large number of files are missing it may be a sign that the data transfer was incomplete or the SFL file is missing some days.

  7. Once all errors or warnings have been fixed, do a final seaflowpy validate before adding the SFL file to the appropriate repository.

Configuration

To use seaflowpy sfl manifest AWS credentials need to be configured. The easiest way to do this is to install the awscli Python package and go through configuration.

pip3 install awscli
aws configure

This will store AWS configuration in ~/.aws which seaflowpy will use to access Seaflow data in S3 storage.

Testing

Seaflowpy uses pytest for testing. Tests can be run from this directory as pytest to test the installed version of the package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seaflowpy-13.1.2.tar.gz (33.5 MB view details)

Uploaded Source

Built Distribution

seaflowpy-13.1.2-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

Details for the file seaflowpy-13.1.2.tar.gz.

File metadata

  • Download URL: seaflowpy-13.1.2.tar.gz
  • Upload date:
  • Size: 33.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.1.0-1027-oem

File hashes

Hashes for seaflowpy-13.1.2.tar.gz
Algorithm Hash digest
SHA256 fbbff86c745ad490d7bb004d636b924e7904e4c8bc3ca265b23fac16872a784c
MD5 6fa251d071e27e14ac6168976275f2ac
BLAKE2b-256 ffcc2c5d5f008ab5f9ab0ad57308b69c44033581092c50f5cc89ed66d8612391

See more details on using hashes here.

File details

Details for the file seaflowpy-13.1.2-py3-none-any.whl.

File metadata

  • Download URL: seaflowpy-13.1.2-py3-none-any.whl
  • Upload date:
  • Size: 66.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.1.0-1027-oem

File hashes

Hashes for seaflowpy-13.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5379cc341ded8d570642904b1327425f466c15b33838752e6df890e9a7bbd205
MD5 b22a1afc20f9530f3e0cc994c0c11568
BLAKE2b-256 097d5dea1cf6dd3b49a1f5a223701e96a457c7b4f11cb5edb45bd2094da5c0e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page