Coder Social home page Coder Social logo

hulab-code's Projects

mrc icon mrc

This code was writen by David Miller (Northwestern University) for RGC clustering.

onhv icon onhv

Based on previously developed measurement of the anatomic features of the macaque ONH (He et al., 2014; Yang et al., 2017), we applied the Visualization Toolkit (VTK) to generate an algorithm for 3D reconstruction to delineate the OCT imaging data. We used inner limiting membrane (ILM), Bruch’s membrane opening (BMO), the two discrete points at either side of the neural canal, and the BMO reference plane as references to measure the ONH connective tissue parameters, including minimum rim width (MRW), rim volume (RimV), and cup volume (CupV). Obvious shortening of MRW, shrinking of RimV, and enlarging of CupV were detected in the SOHU eye compared to contralateral control eye.

rcc icon rcc

RGC Ca2+ Clustering(RCC): The clustering and grouping procedures that we developed and detail below were based on previously described principles and protocols (3). First, we determined the range of non-specific fluctuation of fluorescence intensity in in vivo RGC imaging, which is in between +15% to -20% (ΔF/F0). Thus, we defined the RGCs with fluorescence changes within this range in response to UV stimulation as no-response (NR) RGCs. We then analyzed the rest of the RGCs with significant changes of fluorescence intensity in response to light stimulation using sparse principal component analysis (sPCA) (4, 5), which extracted 16 unbiased sparse response features in response to UV ON-OFF stimulation and therefore resulted in a 16-dimensional feature vector for each RGC. We fit each data set with a Gaussians mixture distribution model using an iterative expectation-maximization (EM) algorithm (MATLAB’s fitgmdist object) (6) with a maximum of 2000 optimization iterations. In the setup, we constrained the covariance matrix for each component to be diagonal, resulting in 32 parameters per component (16 for the mean, 16 for the variances). To avoid local minima, we set the EM algorithm repeating 20 times per candidate number of clusters and used the solution with the greatest likelihood. To find the optimal number of clusters, we evaluated the Bayesian information criterion (BIC) (7), which resulted in 47 automatically defined RGC clusters. These RGC clusters were further re-grouped with a custom-made one-dimensional hierarchical clustering MATLAB script (github.com/HuLab-Code/RCC) to combine similar clusters to achieve a good compromise between clustering complexity and quality. In this step, we used the unweighted average distance (UPGMA) algorithm to calculate the standard linkage (linkage) of the means of the RGC clusters and obtain the correlation distance. We presented the linkage result as a dendrogram plot (using linkage and dendrogram). The leaf order was optimized using the MATLAB’s optimalleaforder function and modified for clarity of presentation. By setting the grouping distance threshold as 0.28, 9 RGC functional groups were identified based on their similarity as presented in the main manuscript and the grouped individual data points were projected to a two-dimensional space by using t-Distributed Stochastic Neighbor Embedding (tSNE) (8) for visualization. For the clustering analysis under different conditions, each detected RGC fluorescent signal trace was normalized by its Euclidean norm (norm function) and compared with the normalized mean intensity of each group by performing the cross-correlation (xcross function in MATLAB, with lag range set as 0). The RGC trace was then assigned to the group that has the highest cross-correlation value that is larger than 0.75.

rrc icon rrc

RGC Referencing Clustering(RRC): By referencing correlation fitting, for RGC clustering analysis in disease models, each detected RGC fluorescent signal trace was normalized by its Euclidean norm (norm function) and compared with the normalized mean intensity of each group by performing the cross-correlation (xcross function in MATLAB, with lag range set as 0). The RGC trace was then assigned to the group that has the highest cross-correlation value that is larger than 0.75. The RGC group assignment based on the 9 RGC functional groups was performed with a custom-made RGC referencing clustering MATLAB script (github.com/HuLab-Code/RRC).

rsd-for-nnri-calculation- icon rsd-for-nnri-calculation-

5.Nearest neighbors regularity indices (NNRI) analysis with a custom-made MATLAB script (github.com/HuLab-Code/RSD): To calculate the NNRI of the detected RGCs within the same group, the registered RGC ROIs from the same group were subtracted and their center positions within the image were collected. Paired distance between each RGC ROI center with the rest was quantified and the nearest neighbor distance (Dnn) were assigned as the smallest distance value. Next, the NNRI was quantified as . represents the mean nearest neighbor distance of all ROIs from the same group, represents the area of the image, represents the number of ROIs in the group.

rse icon rse

RGC Segmentation Extraction(RSE): In each selected raw image (I), the original image was filtered with a 2-D Gaussian smoothing kernel (imgaussfilt) with sigma=20 pixels to get a blurred background image (IF), and the mean intensity (IM) of the raw image was calculated. Further, a binary image (BW) was generated through image thresholding with the following parameter: BW= I>IF*1.25 & I > IM. Then, bwareaopen(BW,40) was performed to remove connected components (objects) in the binary image with fewer than 40 pixels. Next, the ROIs from each selected image were detected and registered using imfindcircles (2) with a radius range from 5 to 15 pixels. Finally, registered ROIs from selected images were merged by combining ROIs within 10 pixels of each other to determine individual RGC soma. The averaged center position and radius of the merged ROIs were assigned to the new ROIs of detected RGCs. Because different RGCs may show peak fluorescence intensity at different time frames due to their specific response dynamics to the visual stimulus, every 5th image frame (about 1 second interval) was used to detect the ROIs. The mean RGC fluorescence intensities for all time points within the ROIs were then extracted as the raw fluorescence intensity for individual RGCs. To minimize the effect of background intensity change during recording, the blood vessel area was segmented from the maximum projection image through thresholding. The average intensity with respect to time within the segmented region was extracted as a reference background intensity. This background intensity signal was subtracted from the fluorescent intensity signals for each RGC to acquire the normalized fluorescence intensity (F) at a given time. A time series of fluorescent intensity (F0 was at the first 10 seconds before UV light stimulation and F was during the next 50 seconds after initial UV onset) from all segmented RGCs was then generated with an embedded stimulus time marker. Each neuronal response was normalized by subtracting the average signal intensity before UV stimulus, F0, from all time points and dividing the resulting signal by F0. This process can be summarized as ΔF/F0 = (F-F0)/F0. Finally, the pooled RGCs’ time series of neuronal responses (ΔF/F0) was denoised by a low-pass filter (lowpass) below normalized passband frequency (0.3 π rad/sample) to remove high-frequency noise before further clustering and grouping.

rssr icon rssr

code used for DEGs between regRGCs and surRGCs

synchronizeuvspectralis icon synchronizeuvspectralis

This code controls the arduino chip to synchronize the UV light stimulation and Heidelberg SLO recording.

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.