Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
See below for descriptions of each script, with inputs and outputs described. All scripts include comments to aid understanding. To assist with script readability, note that within the scripts an alternative DRG labeling scheme is used in place of experiment number. Experiments are denoted by letter (a-p, without n, are experiments 1-15). After the letter is a label denoting the DRG source, with an option "l/r" (left/right) followed by spinal level (l7, s1, s2, or s3). This label will be followed by an underscore and a standard label for the variable type. For example, experiment 1 right S2 would be referred to in the script as "as2" and the variable containing the cell coordinates for this DRG would be "as2_cells." **PolarTransformer.m** This script analyzes demarcated images (found in "DRG Cross Section Analysis/Analyzed DRG Histology Images/Ready for PolarTransformer.m"). The only required input is the demarcated image, with DRG border traced in red and cell bodies traced in blue. The user will be prompted to select the image file when the script is run. The script uses the MATLAB Image Processing toolbox to segment and extract geometric properties from the traced regions, including area, centroid, border pixel coordinates, and interior pixel coordinates. This script also performs the polar transformation of the image, using the process described in Ostrowski et al. It is also capable of performing density analysis of the polar transformed image with user-selected polar grid size. Outputs of this script include the raw and normalized pixel coordinates for the DRG and cell bodies. These outputs are used in other scripts. Aggregate outputs from all DRG analyzed are stored in some of the files found in "DRG Cross Section Analysis/Matlab code/Required Files" (see component wiki). **CellDistributionSimulator.m** This script is simulates random arrangements of non-overlapping cell bodies. It also computes mean nearest-neighbor distances for comparison to actual arrangements in the DRG (see RandomnessAnalysis.m). Required inputs for this script are listed in the script header. For simplicity, simply load one of the DRG workspaces found in "DRG Cross Section Analysis/MATLAB code/Required Files." Alternatively, run PolarTransformer.m then this script without clearing the workspace. This script performs a user-selected number of simulations based on the number and area of cell bodies in the selected DRG. Cell bodies, simulated as perfect circles, are not allowed to overlap with each other or the edge of DRG. For each simulation, mean and standard deviation of nearest neighbor distance are calculated for use in RandomnessAnalysis.m. The values used for the paper can be found in "DRG Cross Section Analysis/MATLAB code/Required Files/summary_sim.mat" **RandomnessAnalysis.m** This script uses the aggregated outputs from PolarTransformer.m and CellDistributionSimulator.m to assess the degree of randomness in all analyzed DRG using the nearest-neighbor distance ratio method. Required inputs are summary_nonnormalized.mat and summary_sim.mat, both of which can be found in "DRG Cross Section Analysis/MATLAB code/Required Files." These variable repositories must be in the working directory. See component wiki for description of variables contained in those files. The script is written to analyze all DRG in bulk. However, altering the "coord" and "sim_r_all" variables to contain only DRG names of interest will allow for subsets to be analyzed instead. See note at top for naming scheme. This script works in the same way as RandomnessAnalysis.m but analyzes the actual DRG instead of simulations. It then calculates the ratio of mean nearest-neighbor distance between the actual and simulated DRG. This value, D, gives a metric of the degree of spatial randomness. The primary output from this script is D_sim_for_jmp, a matrix containing all the calculated D values. See script comments. **DensityCalculator.m** This script calculates cell density on a polar grid for every analyzed DRG. The only required input is summary.mat, found in "DRG Cross Section Analysis/MATLAB code/Required Files." See component wiki for a description of this variable repository. The script loads variables aggregated from PolarTransformer.m for all DRG. It calculates a histogram of the number of cell body pixels in each annular sector on a polar grid, the size of which can be defined in the script (for the paper, it was a 44 x 44 grid). The cell body pixel histogram bin counts are divided by a histogram calculated for the total number of pixels in each bin to yield density. The output from this script is an Excel spreadsheet containing the calculated densities in all bins for all DRG. See script comments for details.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.