Our analysis pipeline can be divided into three parts: (A) imaging, (B) quantification, and (C) statistics. (A) Schematic showing position of amphid neurons in head and maximum-intensity projection of a fourth larval stage (L4) animal expressing YFP, CFP, and mCherry in AWA, AFD, and ASE, respectively. Nose tip is at top. Arrowheads indicate approximate extent of bundle used for analysis in all experiments. (B) (i) To quantify dendrite order, a brightest-path algorithm first extracts the 3D coordinates of each dendrite. (ii) In cross-section, the dendrites define a triangle (A, AWA; D, AFD; E, ASE). The pairwise distances between dendrites are determined (d1, d2, d3). The longest distance is taken as a proxy for bundle width (d1 in the schematic). The dendrite opposite the longest side is defined as the dendrite ‘in the middle’ of the others (AFD in the schematic). (iii) For visualization, bundle width is plotted at each position along the bundle. The dendrite in the middle is plotted as a color bar (yellow, AWA; blue, AFD; red, ASE). Color bars from age- and genotype-matched individuals are arranged side-by-side to visualize patterns of dendrite order in a population. For simplicity, only n = 6 bundles are illustrated, yielding a distribution at the boxed position of 5 red, 1 blue, 0 yellow; for a typical sample size of n = 18, these would correspond to 15 red, 3 blue, 0 yellow. (C) (i) For statistical testing, the observed distribution (e.g. 15, 3, 0) is compared to a test distribution using Fisher’s 3 × 2 exact test as a test statistic to obtain a nominal ‘true’ p-value. Permutation testing is carried out by merging observed and test distributions and resampling 500 times, to obtain representative p-values for distributions with the same composition that differ only by sampling error. The ‘true’ p-value is ranked relative to these resampled p-values, with lower rankings (1/501) indicating the true distributions differ more than would be expected by sampling error. Rankings below 25/501 or 5/501 represent a corrected p-value of p<0.05 or p<0.01 respectively. (ii) This comparison is carried out at every position along the bundle and the p-value rankings are represented as a log-scale color bar. Pairwise distances, triangles, and p-value rankings at every position along each bundle in this study can be explored at http://heimanlab.com/ibb.