Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

my Open Source image analysis code.

branch: master
Octocat-spinner-32 Boettiger2013CellReports updating readmes in publication file, added additional dependent func… March 07, 2013
Octocat-spinner-32 MatlabPhotoshop
Octocat-spinner-32 Perry2011PNAS updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 .gitignore updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 AssignDots.m
Octocat-spinner-32 CheckDotUpDown.m CheckDotUpDown.m was giving bybassable error, now averted with a try/… January 13, 2013
Octocat-spinner-32 CheckDotUpDown.m~ revised dotfinding scripts to export connected paths between associat… November 29, 2011
Octocat-spinner-32 CheckGaussFit.m
Octocat-spinner-32 CheckGaussFit.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 DepthDots.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 DuplicateDots.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 DuplicateDots.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 Readme.txt added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 Unsupervised_DotFinding.m updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 Unsupervised_DotFinding.m~ revised dotfinding scripts to export connected paths between associat… November 29, 2011
Octocat-spinner-32 Unsupervised_DotFinding2.m revised script to call anlz_counting_data automatically at end. Reduc… January 13, 2013
Octocat-spinner-32 Unsupervised_DotFinding2.m~ revised dotfinding scripts to export connected paths between associat… November 29, 2011
Octocat-spinner-32 Unsupervised_DotFinding3.m revised script to call anlz_counting_data automatically at end. Reduc… January 13, 2013
Octocat-spinner-32 Unsupervised_DotFinding3.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 Unsupervised_DotFinding4.m revised script to call anlz_counting_data automatically at end. Reduc… January 13, 2013
Octocat-spinner-32 Unsupervised_DotFinding5.m running new data October 11, 2012
Octocat-spinner-32 Unsupervised_DotFinding6.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 Unsupervised_DotFinding7.m running new data October 11, 2012
Octocat-spinner-32 checkZsep.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 checkZsep.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 colorshuffle.m New GUI TiffViewer, load image, change colors / contrast, toggle chan… November 25, 2012
Octocat-spinner-32 connectivity.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 cyto2nucmap.m updated running new data (should make this into a function some day). January 13, 2013
Octocat-spinner-32 dotfinder.m more transparent way to avoid double counting of dots in CheckDotUpDo… November 21, 2011
Octocat-spinner-32 dotfinder.m~
Octocat-spinner-32 fxn_nuc_reg.m
Octocat-spinner-32 fxn_nuc_reg.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 fxn_nuc_seg.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 fxn_nuc_seg.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 fxn_regionvar.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 fxn_regionvar.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 fxnclean_v2.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 fxnproject_color.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 im_nucseg.fig Running nuc seg from Monet November 22, 2011
Octocat-spinner-32 im_nucseg.m running new data October 11, 2012
Octocat-spinner-32 im_nucseg.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 im_quant_sna_v3.fig added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 im_quant_sna_v3.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 im_quant_sna_v3.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 im_singlemolecule.fig added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 im_singlemolecule.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 im_singlemolecule.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 imclean.fig updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 imclean.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imclean_1.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imclean_2.mat
Octocat-spinner-32 imclean_3.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imnucseg_pars0.mat updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 imnucseg_pars1.mat updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 imnucseg_pars2.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imnucseg_pars3.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imreadfast.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 imviewer.fig updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 imviewer.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imviewer_0.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imviewer_1.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imviewer_2.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imviewer_3.mat updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 imviewer_lsm.fig updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 imviewer_lsm.m updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 imviewer_lsm.m~ revised dotfinding scripts to export connected paths between associat… November 29, 2011
Octocat-spinner-32 imviewer_lsm_pars1.mat
Octocat-spinner-32 jacquestiffread.m updating other changes in directory. Old files may get restructured h… March 07, 2013
Octocat-spinner-32 jacquestiffread.m~
Octocat-spinner-32 loadlsm.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 loadlsm.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 lsm_read_mod.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 lsm_read_mod.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 lsm_tif_2_mytif.m
Octocat-spinner-32 makeuint.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 makeuint.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 matlab2.jpg added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 mycontrast.m minor updates to lsm processing files October 11, 2012
Octocat-spinner-32 optimizing_dotfinding.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 optimizing_dotfinding.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 parselsm.m new functions for zeiss lsm files October 11, 2012
Octocat-spinner-32 pathdef.m updated with new data from snail mRNA counting (1x 4x and promoter st… July 31, 2012
Octocat-spinner-32 quantsna_v3_pars1.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 quantsna_v3_pars2.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 quantsna_v3_pars3.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 quantsna_v3_pars4.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 quantsna_v3_pars5.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 quantsna_v3_pars6.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 quantsna_v3_pars7.mat added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 read_planeT.m
Octocat-spinner-32 read_planeT.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 vect2rast.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 vect2rast.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 view3Dchromatin.m added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 view3Dchromatin.m~ added chromatin project dot-finding October 25, 2011
Octocat-spinner-32 view3Ddots.m other minor updates. January 13, 2013
Octocat-spinner-32 view3Ddots.m~ added chromatin project dot-finding October 25, 2011
Readme.txt
README
Alistair's Open Image Analysis Repository
http://alistairboettiger.info 


This repository contains my open source Matlab codes for processing and analyzing molecular imaging data.  I work primarily with whole mount blastoderm stage Drosophila embryos, though many of the scripts here should work equally well on different types of data.

My image processing toolbox is primarily organized through a series of GUIs that perform specific functions.  These rely on a common set of custom codes.  

The primary analysis scripts used to count single cytoplasmic constructs as presented at the Annual Drosophila Meeting on March 2nd 2011 are still command-line based (see below).  

Graphical User Interfaces:

Descriptions

im_quant_sna_v3.fig
Description: Begun on 09/25/08, this is the latest version of code to quantify the width of the snail expression pattern of embryos in cc14.  
Algorithm:  A multicolor image of a Drosophila embryo stained for snail is thresholded, the intensity of staining is measured in transects across the pattern, from which width and sharpness measurements can be made.  The nuclei are then segmented, neighbors identified, and the shortest path from one side of the expression domain to the other (through neighboring nuclei) is computed.  This data is exported in a target folder as: 
save([folder,'/',savename,'_data.mat'],'sna_grad','nuc_map','tops',...
      'bots','norm_grads','nuc_tot','cnt_nuc','flp'); 
This is respectively: the raw gradients spanning the expression region, the nuclear map, the indices of nuclei along the top of the pattern, indices along the bottom, length normalized gradients, total nuclei, the counts of nuclei spanning the image, and any horizontal or vertical flips.  


im_singlemolecule.fig
Description: Begun 01/21/11.  This script counts the number of mRNA molecules in every cell from 3D confocal stacks.  Default is Zeiss .lsm formatted inputs.  
Updates: 04/04/11 This script is currently out of date.  The new CheckDotUpDown.m provides a watershed implementation for separating vertically stacked dots that is more precise.  Due to memory issues and processing speed issues the GUI version has been replaced for the moment with UnsupervisedDotFinding.m.   
Algorithm: Step zero loads the data, step 1 assigns channels and max-projects the nuclear channel. Step 2 segments the nuclei, step 3 segments the cells (assigns all space to nearest nuclei), step 4 counts all dots using difference-of-Gaussians, watershedding, and size and min intensity filters.  step 5 compares neighboring levels, removes any dot in current level already found in previous.  step 6 repeats step 4 for chn 2, step 7 repeats step 5 for channel 2, step 8 exports data. 
save([fout,fname],...
        'mRNA_cnt1','mRNA_den1','mRNA_ind1','mRNA_sadj1','DotData1',...
        'mRNA_cnt2','mRNA_den2','mRNA_ind2','mRNA_sadj2','DotData2',...
        'NucLabeled','nuc_cents','nuc_area','In','conn_map','Cell_bnd'); 
This is the raw counts, the densities, the cell size adjusted counts, and the raw dot data centroids (before redundancy check).  Then the labeled matrix for the nuclei, the centroids, area per cell, the projected nuclear map, the connectivity map, and the cell boundary map.  

imviewer_lsm.fig
Description: Begun 02/12/11.  This file reads lsm 5 format (.lsm) files from Zeiss software and saves the data in the Z-stacks as independent .tif files appended as _z#.tif in a target folder.  A max-project image is also saved.  An autocycle function will loop through multiple positions from a multi-position acquisition and automatically save all.  
Algorithm: Two simple steps, one to read in the data, one to max project and write it out.  Max-project is done sequentially to save memory and not need to load all layers into memory simultaneously.  


mRNA Counting 
(as presented at Annual Drosophila Conference, March 2nd 2011).
Data analysis is currently done in 3 parts:
imviewer_lsm.fig: Convert .lsm files to separate tifs and a max projection
imnuc_seg.fig: ID and segment nuclei (this is the only supervised part of this code).  
Unsupervised_DotFinding.m - Find 3d centroids of all puncta (mRNA molecules/diffraction limited spheres) present in image stack.  
Primary methods are in two separate functions.  (1) dotfinder.m, which implements the 2D Gaussian filtering, max-object segmentation algorithm, and watershed separation for fused dots.  (2) CheckDotsUpDown.m which groups the centroids of dots based on an overlap criteria and uses a watershed algorithm to separate stacked dots.  A variety of tricks are necessary to efficiently handle the association of order a million positions with each other.  Data is saved in a target directory as _slidedata.mat.  

 

Installation:
In addition to simply copying the files to a common directory and firing them up from Matlab, there are a few quick setup steps you may need to follow:

If you are running on a Windows, the file separator will need to be changed to backslash '\' instead of forwardslash '/'.  A find all change all should suffice.  
If you haven't copied the .mat files  called _pars#.mat for the respective GUI, find the files called _pars#.mat (where # is the step number of the analysis script).  Execute the commented out pars = {...} save pars command.  *Why it's written this way. 



*All these GUIs write and read the current set of parameters from a .mat file on the hard-drive.  This allows you to find an optimal parameter set for processing your data and have that easily become the program default.


05/31/11
Added AlistairMobile to repository.


Something went wrong with that request. Please try again.