a–d Mock- and NaCl-conditioned behavior of animals expressing the tetanus toxin light chain (TeTx) in ASG, which blocks synaptic release63 (capa-1p::TeTx::mCherry). a Mean population position, b chemotactic, c biased random walk, and d klinotaxis indices on a 0–100 mM NaCl gradient after mock- or NaCl-conditioning. From left to right n = 51, 59, 43, 44 animals per condition. Results confirmed with a second independent strain (not shown). e The inhibitory opsin Arch expressed as Arch::YFP under control of the capa-1 promoter (top panel) co-localizes with ASG-specific mCherry expression43 (bottom panel). Scale bar, 20 µm. f Optogenetic silencing of ASG. Individual worms are illuminated with yellow–green light for silencing CAPA-1 neurons during conditioning (acquisition phase) or during the NaCl chemotaxis assay when worms are navigating a linear NaCl gradient (retrieval phase) (see Methods for details). Arch requires supplementation of the cofactor all-trans retinal (ATR) to the worm culture. Transgenic C. elegans not fed ATR-supplemented food serve as a negative control. After conditioning, worms are put in the middle of a chemotaxis plate with a linear NaCl gradient (0–50 mM) and kept in the field-of-view using an automated xy-stage. Right panel shows navigation trajectories of 10–14 worms per condition. g Positions of individual worms on the NaCl gradient through time and h chemotactic index. Corresponding biased random walk and klinotaxis indices shown in Supplementary Fig. 10a, b. The time interval for statistical comparison was reduced to 5 min to accommodate the small plate format. g, h From left to right n = 10, 12, 14, 14, 12, 12, 14, 11 animals per condition. Shaded regions on a and g represent S.E.M. while black bars indicate the time interval for calculating the mean gradient position and behavioral indices. Significances determined by two-way ANOVA with Tukey’s HSD post hoc test. n.s. not significant; *p ≤ 0.05; **p ≤ 0.01; ***p ≤ 0.001. Boxplots show medians, 25th and 75th percentiles as box limits. The whiskers extend to the most extreme data points not considered as outlier.