Giter Club home page Giter Club logo

platechain's Introduction

platechain

release

Parsing microplate data is an extremely common task in the life sciences. This package provides a simple, universal interface for parsing all different types of microplate data into a tidy format.

Note: this package is still early in development and may not work with all machines and data formats. If you are having trouble with a specific usecase, please reach out

Platechain

Motivation

One of the core problems of dealing with plate based data is that every manufacturer and machine has a different output format. Rather than build hundreds of separate parsers, we leverage the latest advancements in LLMs to build a single parser that can handle many different formats.

Raw Spark data Parsed dataframe

Platechain: From raw data output (left) to a parsed, structured format (right).

Getting started

pip install platechain

Make sure to set your OPENAI_API_KEY environment variable to your OpenAI API key.

You can also set up your LANGCHAIN_API_KEY for tracing (see docs for more info).

We have an example .env.template which listed the variables environment variables you can and should set.

Usage

import pandas as pd
from platechain import parse_plates

# Load your data
df = pd.read_csv('examples/byonoy_absolute_example.csv')

# Parse the plates
plate_dfs = parse_plates(df)
# Output: [[96 rows x 4 columns], [96 rows x 4 columns]]

See the notebooks directory for more examples.

Implementation

The core logic is implemented in chain.py. This file contains a single function, parse_plates, which takes a dataframe and returns a list of dataframes, one for each plate.

It also exposes a LangChain chain using LCEL which can be modified to support your specific usecase.

Limitations

  • Currently only supports 24, 96, and 384 well plates. 1536 well plates are coming soon!
  • Only handles plate data that is visually laid out in a grid. If your plate data is already in a table (e.g. a timeseries), this package will not parse it correctly.

Contributing

We welcome contributions! If you'd like to contribute, please check out our contribution guidelines.

License

This project is licensed under the terms of the Apache 2.0 license.

Acknowledgements

This is a Sphinx Bio project! If you're interested in a hosted solution for your lab, please reach out.

Thanks to Harrison and the Langchain team for their help as well!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.