Giter VIP home page Giter VIP logo

hdf5_to_cellprofiler's Introduction

This is my solution to running cellprofiler on hdf5s. I could not figure out how to actually run cellprofiler on hdf5s. It seems like it would be a difficult task to implement given the flexibility of hdf5 files. In the hdf5s that I am working with I have one dataset containing the images, and several datasets with relevant labels for each image. There are no special groupings or hierarchy.

I have created a wrapper to write the images in an hdf5 into temporary directories, and uses these images as input into cellprofiler. The code then moves the relevant output files to a specified output path and deletes the tmp directories. The code employs parallelization to make things faster.

Step 1. Create a cellprofiler pipeline.

Step 2. Change the inputs in parameters.csv to fit your needs.

Step 3. Run loop_jobs.sh

Step 4. Aggregate all of the separate cellprofiler outputs of measurements of objects by running loop_jobs_agg.sh. My aggregate code in aggregate.py is pretty specific to what I care about.

The code that does the actual work is hdf5_to_cellprofiler.py. This code takes a chunk of the hdf5, creates a temporary directory and write the images in the chunk as jpegs and runs a cellprofiler subprocess on these images. At the end, the code will move the output files to a specified output directory and delete the tmp directory.

The cellprofiler pipeline is just called pipeline. Change the pipeline name in cellprofiler.sh if you want to use a different one.

hdf5_to_cellprofiler's People

Watchers

James Cloos avatar Anna Yeaton avatar

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.