OSCR

A state-dependent neural circuit resolves approach-avoidance conflict.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 2 matches
  1. [1] § MATERIALS AND METHODS › Connectomics search ↔ Connectomics search/ConnectivitySearch_MaleCNS_MCNSv9_clean.R, lines 1 to 75 · score 0.92 · Male CNS, FlyEM, NeuronBridge, split GAL4, matches, query · block oscr:b:1RNSGARJ0SR0N-7 · Report a mismatch
  2. [2] § MATERIALS AND METHODS › Connectomics search ↔ Connectomics search/ConnectivitySearch_MaleCNS_MCNSv9_clean.R, lines 1 to 75 · score 0.85 · male cns, neuPrint, ggplot2, adjacency, v0, FB2B · block oscr:b:1RNSGARJ0SR0N-7 · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 543 lines · 15 KB · GPL-3.0 · 2 matches

  1. # ============================================================
  2. # PVK1 (LHON) -> FB2B Connectivity Analysis
  3. # FlyEM Male CNS v0.9
  4. # ============================================================
  5. # This script:
  6. # 1. Reads a candidate PVK1 (LHON) upstream neuron list from
  7. # a NeuronBridge CSV
  8. # 2. Queries direct PVK1 -> FB2B connectivity in neuPrint
  9. # 3. Identifies PVK1 candidates among the top FB2B input
  10. # partners
  11. # 4. Generates a 2D projection figure of FB2B neurons and
  12. # PVK1 hits
  13. # ------------------------------------------------------------
  14. # ------------------------------------------------------------
  15. # 0. Setup
  16. # ------------------------------------------------------------
  17. # Install once if needed:
  18. # install.packages(c(
  19. # "natmanager", "remotes", "readr", "dplyr", "tidyr",
  20. # "tibble", "stringr", "ggplot2", "purrr", "patchwork"
  21. # ))
  22. # natmanager::install(pkgs = "natverse/malecns")
  23. library(malecns)
  24. library(neuprintr)
  25. library(nat)
  26. library(dplyr)
  27. library(tidyr)
  28. library(tibble)
  29. library(stringr)
  30. library(readr)
  31. library(purrr)
  32. library(ggplot2)
  33. library(patchwork)
  34. library(grid)
  35. # ------------------------------------------------------------
  36. # 1. User configuration
  37. # ------------------------------------------------------------
  38. DATASET <- "male-cns:v0.9"
  39. NEUPRINT_SERVER <- "https://neuprint.janelia.org"
  40. # Use a neuPrint token (not a FlyWire token).
  41. # Best practice: set this in ~/.Renviron:
  42. # NEUPRINT_TOKEN="YOUR_NEUPRINT_TOKEN"
  43. # NeuronBridge CSV with PVK1 candidate matches
  44. INPUT_CSV <- "LH1478_20000-threshold_FlyEM Male CNS Brain v0.9.csv"
  45. # FB2B target neurons (split-GAL4 line SS49376)
  46. FB2B_IDS <- c("43040", "29537", "18221", "32805") #annotated in FlyWire
  47. FB2B_NAMES <- c(
  48. "43040" = "FB2B_a1",
  49. "29537" = "FB2B_a2",
  50. "18221" = "FB2B_a3",
  51. "32805" = "FB2B_a4"
  52. )
  53. OUTPUT_PREFIX <- "MaleCNS_PVK1_FB2B_projection_2D"
  54. # Analysis thresholds
  55. CONNECTIVITY_THRESHOLD <- 1 # min synapses for adjacency query
  56. HIT_WEIGHT_THRESHOLD <- 20 # min synapses for "high-weight" hits
  57. TOP_N_INPUTS <- 10 # rank cutoff for top input partners
  58. # Plot orientation and colours
  59. PLOT_YAW <- 0
  60. PLOT_PITCH <- 180
  61. PLOT_ROLL <- 0
  62. FB2B_COLOUR <- "#F2A93B"
  63. UPSTREAM_COLOUR <- "#7B6DE8"
  64. # ------------------------------------------------------------
  65. # 2. neuPrint setup
  66. # ------------------------------------------------------------
  67. setup_neuprint <- function(dataset = DATASET, server = NEUPRINT_SERVER) {
  68. neuprint_login(server = server, dataset = dataset)
  69. choose_mcns_dataset(dataset)
  70. }
  71. setup_neuprint()
  72. # ------------------------------------------------------------
  73. # 3. Data-loading helpers
  74. # ------------------------------------------------------------
  75. read_upstream_candidates <- function(path) {
  76. read_csv(path, show_col_types = FALSE) |>
  77. mutate(upstream_id = str_extract(`Neuron ID`, "[0-9]{3,}")) |>
  78. filter(!is.na(upstream_id)) |>
  79. select(upstream_id, Score, everything()) |>
  80. distinct(upstream_id, .keep_all = TRUE)
  81. }
  82. get_body_metadata <- function(body_ids, dataset = DATASET) {
  83. neuprint_get_meta(bodyids = body_ids, dataset = dataset) |>
  84. as_tibble() |>
  85. transmute(
  86. upstream_id = as.character(bodyid),
  87. upstream_name = name,
  88. upstream_type = type
  89. )
  90. }
  91. # ------------------------------------------------------------
  92. # 4. Connectivity helpers
  93. # ------------------------------------------------------------
  94. # Direct connectivity from PVK1 candidates to FB2B targets.
  95. # Carries the NeuronBridge Score column through to the output.
  96. get_direct_connectivity <- function(upstream_candidates,
  97. target_ids,
  98. target_names,
  99. dataset = DATASET) {
  100. upstream_ids <- upstream_candidates$upstream_id
  101. adjacency <- neuprint_get_adjacency_matrix(
  102. inputids = upstream_ids,
  103. outputids = target_ids,
  104. threshold = CONNECTIVITY_THRESHOLD,
  105. dataset = dataset,
  106. sparse = FALSE
  107. )
  108. upstream_meta <- get_body_metadata(upstream_ids, dataset = dataset)
  109. upstream_score <- upstream_candidates |> select(upstream_id, Score)
  110. connectivity_clean <- as.data.frame(adjacency) |>
  111. rownames_to_column("upstream_id") |>
  112. mutate(upstream_id = as.character(upstream_id)) |>
  113. left_join(upstream_meta, by = "upstream_id") |>
  114. left_join(upstream_score, by = "upstream_id") |>
  115. rename_with(
  116. .fn = ~ unname(target_names[.x]),
  117. .cols = all_of(names(target_names))
  118. ) |>
  119. mutate(
  120. total_synapses = rowSums(
  121. across(all_of(unname(target_names))),
  122. na.rm = TRUE
  123. )
  124. )
  125. edge_table <- as.data.frame(adjacency) |>
  126. rownames_to_column("upstream_id") |>
  127. pivot_longer(
  128. cols = -upstream_id,
  129. names_to = "FB2B_id",
  130. values_to = "weight"
  131. ) |>
  132. mutate(
  133. upstream_id = as.character(upstream_id),
  134. FB2B_id = as.character(FB2B_id),
  135. FB2B_name = unname(target_names[FB2B_id])
  136. ) |>
  137. filter(weight > 0) |>
  138. left_join(upstream_score, by = "upstream_id")
  139. list(
  140. adjacency = adjacency,
  141. connectivity_clean = connectivity_clean,
  142. edge_table = edge_table
  143. )
  144. }
  145. # Full presynaptic partner list for each FB2B target.
  146. get_all_fb2b_inputs <- function(target_ids, dataset = DATASET) {
  147. map_dfr(target_ids, function(target_id) {
  148. neuprint_connection_table(
  149. bodyids = target_id,
  150. partners = "inputs",
  151. threshold = CONNECTIVITY_THRESHOLD,
  152. dataset = dataset,
  153. details = TRUE
  154. ) |>
  155. arrange(desc(weight)) |>
  156. mutate(FB2B_id = target_id)
  157. })
  158. }
  159. # Among the top-N strongest inputs to each FB2B neuron,
  160. # keep only those that are PVK1 candidates.
  161. find_top_lhon_hits <- function(all_inputs, upstream_ids, top_n = TOP_N_INPUTS) {
  162. all_inputs |>
  163. group_by(FB2B_id) |>
  164. slice_head(n = top_n) |>
  165. ungroup() |>
  166. mutate(upstream_id = as.character(partner)) |>
  167. filter(upstream_id %in% upstream_ids) |>
  168. select(FB2B_id, upstream_id, weight, everything()) |>
  169. arrange(FB2B_id, desc(weight))
  170. }
  171. # ------------------------------------------------------------
  172. # 5. Neuron plotting helpers
  173. # ------------------------------------------------------------
  174. extract_neuron_segments <- function(neurons, fb2b_ids) {
  175. imap_dfr(neurons, function(neuron, neuron_id) {
  176. nodes <- neuron$d |>
  177. as_tibble() |>
  178. mutate(
  179. neuron_id = as.character(neuron_id),
  180. group = if_else(neuron_id %in% fb2b_ids, "FB2B_a", "Upstream")
  181. )
  182. parent_nodes <- nodes |>
  183. select(
  184. parent_id = PointNo,
  185. X_parent = X,
  186. Y_parent = Y,
  187. Z_parent = Z
  188. )
  189. nodes |>
  190. filter(Parent != -1) |>
  191. left_join(parent_nodes, by = c("Parent" = "parent_id"))
  192. })
  193. }
  194. extract_soma_points <- function(neurons, fb2b_ids) {
  195. imap_dfr(neurons, function(neuron, neuron_id) {
  196. nodes <- neuron$d |> as_tibble()
  197. soma_row <- nodes |>
  198. filter(Label == "soma" | grepl("soma", Label, ignore.case = TRUE)) |>
  199. slice_head(n = 1)
  200. if (nrow(soma_row) == 0) {
  201. soma_row <- nodes |> slice_max(W, n = 1)
  202. }
  203. soma_row |>
  204. transmute(
  205. neuron_id = as.character(neuron_id),
  206. group = if_else(neuron_id %in% fb2b_ids, "FB2B_a", "Upstream"),
  207. X, Y, Z
  208. )
  209. })
  210. }
  211. make_rotation_matrix <- function(yaw = 0, pitch = 0, roll = 0) {
  212. radians <- pi / 180
  213. yaw <- yaw * radians
  214. pitch <- pitch * radians
  215. roll <- roll * radians
  216. rotation_y <- matrix(
  217. c( cos(yaw), 0, sin(yaw),
  218. 0, 1, 0,
  219. -sin(yaw), 0, cos(yaw)),
  220. nrow = 3, byrow = TRUE
  221. )
  222. rotation_x <- matrix(
  223. c(1, 0, 0,
  224. 0, cos(pitch), -sin(pitch),
  225. 0, sin(pitch), cos(pitch)),
  226. nrow = 3, byrow = TRUE
  227. )
  228. rotation_z <- matrix(
  229. c(cos(roll), -sin(roll), 0,
  230. sin(roll), cos(roll), 0,
  231. 0, 0, 1),
  232. nrow = 3, byrow = TRUE
  233. )
  234. rotation_z %*% rotation_x %*% rotation_y
  235. }
  236. project_3d_to_2d <- function(df, center, yaw = 0, pitch = 0, roll = 0) {
  237. rotation <- make_rotation_matrix(yaw = yaw, pitch = pitch, roll = roll)
  238. child_xyz <- sweep(
  239. as.matrix(df[, c("X", "Y", "Z")]),
  240. 2, center, "-"
  241. ) %*% t(rotation)
  242. projected <- df |>
  243. mutate(
  244. xr = child_xyz[, 1],
  245. yr = child_xyz[, 2],
  246. zr = child_xyz[, 3]
  247. )
  248. has_parent_coordinates <- all(c("X_parent", "Y_parent", "Z_parent") %in% names(df))
  249. if (has_parent_coordinates) {
  250. parent_xyz <- sweep(
  251. as.matrix(df[, c("X_parent", "Y_parent", "Z_parent")]),
  252. 2, center, "-"
  253. ) %*% t(rotation)
  254. projected <- projected |>
  255. mutate(
  256. xr_parent = parent_xyz[, 1],
  257. yr_parent = parent_xyz[, 2],
  258. zr_parent = parent_xyz[, 3]
  259. )
  260. }
  261. projected
  262. }
  263. get_projection_center <- function(neuron_segments) {
  264. c(
  265. mean(c(neuron_segments$X, neuron_segments$X_parent), na.rm = TRUE),
  266. mean(c(neuron_segments$Y, neuron_segments$Y_parent), na.rm = TRUE),
  267. mean(c(neuron_segments$Z, neuron_segments$Z_parent), na.rm = TRUE)
  268. )
  269. }
  270. make_axis_dataframe <- function(plot_df, yaw = 0, pitch = 0, roll = 0) {
  271. rotation <- make_rotation_matrix(yaw = yaw, pitch = pitch, roll = roll)
  272. x_range <- range(plot_df$xr, na.rm = TRUE)
  273. y_range <- range(plot_df$yr, na.rm = TRUE)
  274. axis_origin <- c(
  275. x_range[1] - 0.12 * diff(x_range),
  276. y_range[1] - 0.12 * diff(y_range)
  277. )
  278. axis_length <- 0.14 * diff(x_range)
  279. x_axis <- as.numeric(c(1, 0, 0) %*% t(rotation))
  280. y_axis <- as.numeric(c(0, 1, 0) %*% t(rotation))
  281. z_axis <- as.numeric(c(0, 0, 1) %*% t(rotation))
  282. tibble(
  283. axis = c("x", "y", "z"),
  284. dx = c(x_axis[1], y_axis[1], z_axis[1]),
  285. dy = c(x_axis[2], y_axis[2], z_axis[2])
  286. ) |>
  287. mutate(
  288. x0 = axis_origin[1],
  289. y0 = axis_origin[2],
  290. x1 = x0 + axis_length * dx,
  291. y1 = y0 + axis_length * dy,
  292. label_x = x0 + axis_length * 1.25 * dx,
  293. label_y = y0 + axis_length * 1.25 * dy
  294. )
  295. }
  296. make_neuron_projection_plot <- function(neuron_segments,
  297. soma_points,
  298. center,
  299. yaw = 0,
  300. pitch = 180,
  301. roll = 0,
  302. title = NULL,
  303. show_xyz = TRUE,
  304. show_soma = FALSE) {
  305. plot_df <- project_3d_to_2d(
  306. neuron_segments,
  307. center = center, yaw = yaw, pitch = pitch, roll = roll
  308. )
  309. soma_df <- project_3d_to_2d(
  310. soma_points,
  311. center = center, yaw = yaw, pitch = pitch, roll = roll
  312. )
  313. axis_df <- make_axis_dataframe(plot_df, yaw = yaw, pitch = pitch, roll = roll)
  314. p <- ggplot(plot_df) +
  315. geom_segment(
  316. aes(
  317. x = xr_parent,
  318. y = yr_parent,
  319. xend = xr,
  320. yend = yr,
  321. colour = group,
  322. alpha = group
  323. ),
  324. linewidth = 0.40
  325. ) +
  326. scale_colour_manual(
  327. values = c(
  328. "FB2B_a" = FB2B_COLOUR,
  329. "Upstream" = UPSTREAM_COLOUR,
  330. "x" = "red",
  331. "y" = "darkgreen",
  332. "z" = "blue"
  333. ),
  334. breaks = c("FB2B_a", "Upstream")
  335. ) +
  336. scale_alpha_manual(
  337. values = c("FB2B_a" = 1, "Upstream" = 0.5),
  338. guide = "none"
  339. ) +
  340. coord_equal(clip = "off") +
  341. theme_void() +
  342. theme(
  343. legend.position = "bottom",
  344. legend.title = element_blank(),
  345. legend.text = element_text(size = 14),
  346. plot.title = element_text(hjust = 0.5, size = 12),
  347. plot.margin = margin(40, 60, 40, 60)
  348. ) +
  349. labs(title = title)
  350. if (show_soma) {
  351. p <- p +
  352. geom_point(
  353. data = soma_df,
  354. aes(x = xr, y = yr, fill = group),
  355. shape = 21,
  356. colour = "black",
  357. stroke = 0.25,
  358. size = 1.4,
  359. alpha = 1,
  360. inherit.aes = FALSE
  361. ) +
  362. scale_fill_manual(
  363. values = c("FB2B_a" = FB2B_COLOUR, "Upstream" = UPSTREAM_COLOUR),
  364. guide = "none"
  365. )
  366. }
  367. if (show_xyz) {
  368. p <- p +
  369. geom_segment(
  370. data = axis_df,
  371. aes(x = x0, y = y0, xend = x1, yend = y1, colour = axis),
  372. arrow = arrow(length = unit(0.16, "cm")),
  373. linewidth = 1.2,
  374. alpha = 1,
  375. inherit.aes = FALSE,
  376. show.legend = FALSE
  377. ) +
  378. geom_text(
  379. data = axis_df,
  380. aes(x = label_x, y = label_y, label = axis, colour = axis),
  381. size = 5,
  382. fontface = "bold",
  383. alpha = 1,
  384. inherit.aes = FALSE,
  385. show.legend = FALSE
  386. )
  387. }
  388. p
  389. }
  390. # Diagnostic panel of orientations to help pick PLOT_PITCH.
  391. make_orientation_panel <- function(neuron_segments, soma_points, center) {
  392. pitches <- c(10, 120, 140, 160, 180, 190)
  393. plots <- map(pitches, function(pitch_value) {
  394. make_neuron_projection_plot(
  395. neuron_segments = neuron_segments,
  396. soma_points = soma_points,
  397. center = center,
  398. yaw = 0,
  399. pitch = pitch_value,
  400. roll = 0,
  401. title = paste("pitch", pitch_value),
  402. show_xyz = FALSE,
  403. show_soma = FALSE
  404. )
  405. })
  406. (plots[[1]] | plots[[2]] | plots[[3]]) /
  407. (plots[[4]] | plots[[5]] | plots[[6]])
  408. }
  409. # ------------------------------------------------------------
  410. # 6. Run analysis
  411. # ------------------------------------------------------------
  412. upstream_candidates <- read_upstream_candidates(INPUT_CSV)
  413. upstream_ids <- upstream_candidates$upstream_id
  414. direct_connectivity <- get_direct_connectivity(
  415. upstream_candidates = upstream_candidates,
  416. target_ids = FB2B_IDS,
  417. target_names = FB2B_NAMES,
  418. dataset = DATASET
  419. )
  420. connectivity_clean <- direct_connectivity$connectivity_clean
  421. edge_table <- direct_connectivity$edge_table
  422. all_fb2b_inputs <- get_all_fb2b_inputs(FB2B_IDS, dataset = DATASET)
  423. top10_lhon_hits <- find_top_lhon_hits(
  424. all_inputs = all_fb2b_inputs,
  425. upstream_ids = upstream_ids,
  426. top_n = TOP_N_INPUTS
  427. )
  428. # Optional exports:
  429. # write_csv(connectivity_clean, "MaleCNS_FB2B_direct_connectivity.csv")
  430. # write_csv(edge_table, "MaleCNS_FB2B_direct_edges.csv")
  431. # write_csv(top10_lhon_hits, "MaleCNS_FB2B_PVK1_top10.csv")
  432. # ------------------------------------------------------------
  433. # 7. Generate 2D projection figure
  434. # ------------------------------------------------------------
  435. upstream_plot_ids <- unique(top10_lhon_hits$upstream_id)
  436. plot_ids <- c(FB2B_IDS, upstream_plot_ids)
  437. neurons <- neuprint_read_neurons(plot_ids, dataset = DATASET)
  438. neuron_segments <- extract_neuron_segments(neurons, fb2b_ids = FB2B_IDS)
  439. soma_points <- extract_soma_points(neurons, fb2b_ids = FB2B_IDS)
  440. projection_center <- get_projection_center(neuron_segments)
  441. orientation_panel <- make_orientation_panel(
  442. neuron_segments = neuron_segments,
  443. soma_points = soma_points,
  444. center = projection_center
  445. )
  446. print(orientation_panel)
  447. final_plot <- make_neuron_projection_plot(
  448. neuron_segments = neuron_segments,
  449. soma_points = soma_points,
  450. center = projection_center,
  451. yaw = PLOT_YAW,
  452. pitch = PLOT_PITCH,
  453. roll = PLOT_ROLL,
  454. title = NULL,
  455. show_xyz = TRUE,
  456. show_soma = FALSE
  457. )
  458. print(final_plot)
  459. # ggsave(
  460. # filename = paste0(OUTPUT_PREFIX, ".pdf"),
  461. # plot = final_plot,
  462. # width = 5,
  463. # height = 2.5
  464. # )

ConnectivitySearch_MaleCNS_MCNSv9_clean.R, under GPL-3.0 · at the source

Overview

  1. School of Biosciences, University of Birmingham, Birmingham, UK
  2. Birmingham Centre for Neurogenetics, University of Birmingham, Birmingham, UK
  3. Institute of Biology, Freie Universität Berlin, Berlin, Germany
Institutions: University of Birmingham (United Kingdom); Freie Universität Berlin (Germany)
Journal: Science advances, volume 12, issue 47, article eaeg1944
Dates: received 5 February 2026; accepted 19 October 2026; published online 18 November 2026; in print November 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1126/sciadv.aeg1944 · PMID 43050517 · PMCID PMC13781089 · OpenAlex W7128314157
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: drosophila (organism), systems (subfield)
Methods: Spectral & time-frequency, Statistics, Evoked potentials, fMRI & imaging, Single-unit activity, calcium imaging, Smoothing, state filtering, decompositions
MeSH: Avoidance Learning*, Drosophila melanogaster*, Neurons*, Animals, Behavior, Animal, Cues, Hunger, Odorants (* major topic)
Journal subjects: Neuroscience, Cellular Neuroscience
Topic: Neurobiology and Insect Physiology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Funding: Wellcome (330471/Z/25/Z); Biotechnology and Biological Sciences Research Council (BBSRC) (BB/W016249/1, BB/S009299/1, BB/T00746X/1); Leverhulme Trust (RPG-2023-009); Deutsche Forschungsgemeinschaft (Germany’s Excellence Strategy (EXC-2049, 390688087)); Emmy Noether Programme (495407463)
Citations: not cited yet (Europe PMC); 75 references in the paper
Research resources: ChromoTtek #5f8) and mouse anti-nc82 RRID:AB_2314866, Kavanagh RRID:SCR_027189

Abstract

To survive, animals must balance opportunity and risk, yet how internal motivational state biases this trade-off remains poorly understood. Here, we show that hunger gates avoidance of a noxious stimulus in Drosophila to enable food approach under conflict. Using a behavioral assay in which flies must cross an electric shock barrier to reach food, we find that starvation promotes shock tolerance only when food-related olfactory cues are present. This state- and context-dependent behavioral shift is mediated by a defined neuromodulatory circuit. Leucokinin neurons encode hunger and convey this information to PV5K1 lateral horn output neurons, which integrate internal state signals with food odor cues and suppress shock-responsive FB2B neurons in the ventral fan-shaped body. Accordingly, electric shock-evoked activity in FB2B neurons is suppressed in starved flies exposed to food cues. These findings identify a circuit mechanism by which motivational state gates aversive processing to bias action selection towards goal-directed behavior.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

Zenodo 21418198

License: GPL-3.0
State: the link answers, verified on 21 November 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data, code, and materials availability:”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: ggplot2 (1 file), NumPy (1 file), pandas (1 file), patchwork (1 file), SciPy (1 file), statsmodels (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 21 November 2026: the link answers (HTTP 200)
  • 21 November 2026: the link answers (HTTP 200)
3 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 2 scripts, each with its path and the digest of its content;
  • 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Data links

  • zenodo:21418198, Zenodo; found in “Data, code, and materials availability:”; this record also holds the authors' code (see Code)

Data, code, and materials availability

All data and code needed to evaluate and reproduce the conclusions in the paper are present in the paper and/or the Supplementary Materials and are archived in Zenodo at https://zenodo.org/records/21418198. No new materials were generated in this study.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 21 November 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 8 MeSH terms, 5 funders, 72 references, 2 RRIDs.

Cite

This paper

Bodas, D., Demirci, Ş., Procenko, O., Balcou, M., Baumeister, L., Segal, D., Scheunemann, L., & Rezaval, C. (2026). A state-dependent neural circuit resolves approach-avoidance conflict. Science advances, 12(47), eaeg1944. https://doi.org/10.1126/sciadv.aeg1944

BibTeX

@article{bodas2026state,
author = {Bodas, Devika and Demirci, Şevval and Procenko, Olga and Balcou, Marine and Baumeister, Lennart and Segal, Darryl and Scheunemann, Lisa and Rezaval, Carolina},
title = {{A state-dependent neural circuit resolves approach-avoidance conflict}},
journal = {Science advances},
year = {2026},
month = nov,
volume = {12},
number = {47},
pages = {eaeg1944},
publisher = {American Association for the Advancement of Science},
issn = {2375-2548},
doi = {10.1126/sciadv.aeg1944},
url = {https://doi.org/10.1126/sciadv.aeg1944},
pmid = {43050517},
pmcid = {PMC13781089}
}

RIS

TY - JOUR
AU - Bodas, Devika
AU - Demirci, Şevval
AU - Procenko, Olga
AU - Balcou, Marine
AU - Baumeister, Lennart
AU - Segal, Darryl
AU - Scheunemann, Lisa
AU - Rezaval, Carolina
TI - A state-dependent neural circuit resolves approach-avoidance conflict
T2 - Science advances
J2 - Sci Adv
PY - 2026
DA - 2026/11/18
VL - 12
IS - 47
SP - eaeg1944
SN - 2375-2548
PB - American Association for the Advancement of Science
DO - 10.1126/sciadv.aeg1944
UR - https://doi.org/10.1126/sciadv.aeg1944
LA - en
ER -

CSL-JSON

{
"id": "10.1126/sciadv.aeg1944",
"type": "article-journal",
"title": "A state-dependent neural circuit resolves approach-avoidance conflict",
"container-title": "Science advances",
"author": [
{
"family": "Bodas",
"given": "Devika"
},
{
"family": "Demirci",
"given": "Şevval"
},
{
"family": "Procenko",
"given": "Olga"
},
{
"family": "Balcou",
"given": "Marine"
},
{
"family": "Baumeister",
"given": "Lennart"
},
{
"family": "Segal",
"given": "Darryl"
},
{
"family": "Scheunemann",
"given": "Lisa"
},
{
"family": "Rezaval",
"given": "Carolina"
}
],
"container-title-short": "Sci Adv",
"volume": "12",
"issue": "47",
"page": "eaeg1944",
"DOI": "10.1126/sciadv.aeg1944",
"PMID": "43050517",
"PMCID": "PMC13781089",
"ISSN": "2375-2548",
"publisher": "American Association for the Advancement of Science",
"URL": "https://doi.org/10.1126/sciadv.aeg1944",
"language": "en",
"issued": {
"date-parts": [
[
2026,
11,
18
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41586-026-10735-w [code]
Distributed control circuits across a brain-and-cord connectome.
Journal: Nature
In common: patchwork, ggplot2, tidyverse, 3 other tools, drosophila, 9 references
[2] doi:10.1038/s41586-024-07890-3 [code]
Mating proximity blinds threat perception.
Journal: Nature
In common: statsmodels, ggplot2, tidyverse, 3 other tools, drosophila, 5 references, author Carolina Rezaval
[3] doi:10.1016/j.cell.2024.03.016 [code]
Neurotransmitter classification from electron microscopy images at synaptic sites in Drosophila melanogaster.
Journal: Cell
In common: pandas, SciPy, NumPy, drosophila, 10 references
[4] doi:10.3389/fnsys.2026.1822122 [code]
Convergence-divergence circuits for multimodal integration of innate and learned opponent valences.
Journal: Frontiers in systems neuroscience
In common: pandas, SciPy, NumPy, systems, 9 references
[5] doi:10.1038/s41467-026-69443-8 [code]
Feeding decision-making by a single neuron via disparate neurotransmitters.
Journal: Nature communications
In common: tidyverse, pandas, NumPy, drosophila, 7 references
[6] doi:10.7554/elife.100947 [code]
Molecular characterization of gustatory second-order neurons reveals integrative mechanisms of gustatory and metabolic information.
Journal: eLife
In common: ggplot2, tidyverse, drosophila, 7 references
[7] doi:10.7554/elife.62567 [code]
Circuits for integrating learned and innate valences in the insect brain.
Journal: eLife
In common: drosophila, systems, 8 references
[8] doi:10.1073/pnas.2530544123
Insulin and leucokinin pathways coordinate adaptive salt appetite in &lt;i&gt;Drosophila&lt;/i&gt;.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: drosophila, 7 references
[9] doi:10.7554/elife.66039 [code]
A connectome of the &lt;i&gt;Drosophila&lt;/i&gt; central complex reveals network motifs suitable for flexible navigation and context-dependent action selection.
Journal: eLife
In common: patchwork, ggplot2, tidyverse, 3 other tools, drosophila, systems, 3 references
[10] doi:10.1073/pnas.2418481122
A hormone-to-neuropeptide pathway inhibits sexual receptivity in immature &lt;i&gt;Drosophila&lt;/i&gt; females.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: drosophila, 6 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1126/sciadv.aeg1944.svg)](https://openscicode.org/badge/doi/10.1126/sciadv.aeg1944)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1126/sciadv.aeg1944.svg
   :target: https://openscicode.org/badge/doi/10.1126/sciadv.aeg1944
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1126/sciadv.aeg1944"><img src="https://openscicode.org/badge/doi/10.1126/sciadv.aeg1944.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.