Giter VIP home page Giter VIP logo

oif's Introduction

oif

Extract images and metadata from .oif files.

Write data contained in a .oif file to directories. Directories are structured such that the basename of the .oif file (e.g. /path/to/my/<basename>.oif) is used as the parent directory. Each parent directory then contains subdirectories for every channel contained in the .oif file. Every channel subdirectory contains .png images for each z-stack contained for that channel. Within each parent directory, a file metadata.json, is also created to house annotated data for the embryo.

File structure example using /path/to/my/<basename>.oif with 3 Channels:

  • out_dir
    • metadata.json
    • basename
    • Channel1
      • z0.png
      • z1.png
      • ...
    • Channel2
      • z0.png
      • z1.png
      • ...
    • Channel3
      • z0.png
      • z1.png
      • ...

If a PMC channel is present, the associated channel directory will break into two sub directories.

  • PMCChannel
    • ContrastImages
    • IntensityImages

The directory ContrastImages has the contrast between intensity values increased. IntensityImages keeps the raw intensity values. PMC labelling should be done on ContrastImages, while downstream analysis should use the raw data in IntensityImages.

The main script, parse_oif.py takes a single .json file as input with the following format:

{
"oif_file": <location to oif file>,
"stains": {"1": <stain used in first channel>,
           "2": <stain used in second channel>,
           "3": <stain used in third channel>,
           "4": <stain used in fourth channel>},
"person": <name of person who collected the data>,
"hpf": <hours past fertilization>,
"treatment": <treatment applied to embryo>,
"out_dir": <desired location to write output directories>,
"prefix": <optinal string to write in front of output files>
}

To run the script, issue the following command:

python parse_oif.py <input.json>

Both oiffile.py and tiffile.py were taken from here: https://www.lfd.uci.edu/~gohlke/

oif's People

Contributors

dakota-hawkins avatar

Watchers

James Cloos avatar  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.