Giter Site home page Giter Site logo

chendoscope-minipipe's Introduction

JF Lab Pipeline for CHEndoscope Analysis

The JF-Lab pipeline for preprocessing and analysis of CHEndoscope calcium imaging data.

  1. Get your .mkv files to be merged, downsampled and/or motion corrected.
  2. Run the following on the .mkv files:
    python minipipe.py file1.mkv file2.mkv -c 2000 --motion_corr --cores 8
    Flags:
    -d/--downsample: temporal downsample factor, defaut=4
    -c/--chunk_size: chunk_size, default=2000
    --motion_corr: if you want to correct motion, default=False
    -t/--threshold: if you want to indicate threshold for motion correction, default=1.0
    -target_frame: if you want to indicate frame of reference for motion correction, default=0
    --cores: number of threads to run in parallel, default=4
    --bigtiff: If .mkv(s) amount to > 12Gb, must use this mode or memory error will occur
    --merge: merge all the files instead of individually processing them
    -o/--output: If --merge, then the name for the merged .tiff file
    -f/--format: output format as tiff, avi or hdf5, default is tiffs
  3. Run CNMF-E on the .tiff files, output is a .mat file.
  4. Use review_traces.py to manually inspect the neurons to keep or exclude from analysis:
    python review_traces.py traces.mat
  • Press 'k' to keep, 'j' to exclude, or the 'keep'/'exclude' buttons.

chendoscope-minipipe's People

Contributors

linamnt avatar lyprince avatar ajmocle avatar neurochatter avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

Forkers

lyprince linamnt

chendoscope-minipipe's Issues

Review Traces [Feature Request]

  • zoom into traces
  • which cell are you on,and total number of cells
  • separate the noise from denoised more clearly
  • keyboard shortcuts
  • Acknowledgment at the end. TY JFLAB

Preprocessing all in mkv

PIMS works best with mkv, so if we do all preprocessing first, then before cnmf-e, we convert to TIFF, would work best.

Detect Cells

  • - flatten frames taken from red channel to get working image
  • - get ROIs via watershed or gaussian filter or other
  • - plot/visualize ROIs
  • - register to GCaMP video

read and write motion correction/downsampling of large files in chunks

PIMS doesn't have ability to write to random access of video files.

pre_cnmfe.py

load target_frame(s) with PIMs
downsample target_frame
for chunk in chunks:
    load chunk with PIMS
    downsample
    motion correct to target_frame
    save as tiff chunk

Then use bash:
cat file1 file2 file3 > bigfile

bash pipeline script

$ bash minipipe.sh *.mkv -d 4

  • take vids to process
  • motion correct each
  • convert to tiff
  • concatenate tiffs if split
  • delete temp tiffs

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.