OSCR

Auricular vagus nerve stimulation drives analgesia via an auricle-brain axis in a mouse model of neuropathic pain.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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

MATLAB · 652 lines · 17 KB · GPL-3.0

  1. function varargout = MovieGUI(varargin)
  2. % MOVIEGUI MATLAB code for MovieGUI.fig
  3. % MOVIEGUI, by itself, creates a new MOVIEGUI or raises the existing
  4. % singleton*.
  5. %
  6. % H = MOVIEGUI returns the handle to a new MOVIEGUI or the handle to
  7. % the existing singleton*.
  8. %
  9. % MOVIEGUI('CALLBACK',hObject,eventData,h,...) calls the local
  10. % function named CALLBACK in MOVIEGUI.M with the given input arguments.
  11. %
  12. % MOVIEGUI('Property','Value',...) creates a new MOVIEGUI or raises the
  13. % existing singleton*. Starting from the left, property value pairs are
  14. % applied to the GUI before MovieGUI_OpeningFcn gets called. An
  15. % unrecognized property name or invalid value makes property application
  16. % stop. All inputs are passed to MovieGUI_OpeningFcn via varargin.
  17. %
  18. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
  19. % instance to run (singleton)".
  20. %
  21. % See also: GUIDE, GUIDATA, GUIh
  22. % Edit the above text to modify the response to help MovieGUI
  23. % Last Modified by GUIDE v2.5 11-Sep-2018 13:13:32
  24. % Begin initialization code - DO NOT EDIT
  25. gui_Singleton = 1;
  26. gui_State = struct('gui_Name', mfilename, ...
  27. 'gui_Singleton', gui_Singleton, ...
  28. 'gui_OpeningFcn', @MovieGUI_OpeningFcn, ...
  29. 'gui_OutputFcn', @MovieGUI_OutputFcn, ...
  30. 'gui_LayoutFcn', [] , ...
  31. 'gui_Callback', []);
  32. if nargin && ischar(varargin{1})
  33. gui_State.gui_Callback = str2func(varargin{1});
  34. end
  35. if nargout
  36. [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
  37. else
  38. gui_mainfcn(gui_State, varargin{:});
  39. end
  40. % End initialization code - DO NOT EDIT
  41. % --- Executes just before MovieGUI is made visible.
  42. function MovieGUI_OpeningFcn(hObject, eventdata, h, varargin)
  43. % This function has no output args, see OutputFcn.
  44. % hObject handle to figure
  45. % eventdata reserved - to be defined in a future version of MATLAB
  46. % h structure with h and user data (see GUIDATA)
  47. % varargin command line arguments to MovieGUI (see VARARGIN)
  48. % Choose default command line output for MovieGUI
  49. h.output = hObject;
  50. addpath(genpath('.')); % add all subdirectories here to path
  51. % default filepath for eye camera
  52. h.filepath = '/media/carsen/DATA2/grive/sample_movies/';
  53. h.suffix = {'.mj2','.mp4','.mkv','.avi','.mpeg','.mpg','.asf'}; % suffix of eye camera file!
  54. % use a GPU? default 1
  55. h.useGPU = 1;
  56. % default smoothing constants
  57. h.sc = 4;
  58. h.tsc = 1;
  59. % colors for ROIs
  60. h.colors = [1 0 1;...
  61. 1 .65 0;...
  62. .85 .3 .1;...
  63. .8 .8 0;...
  64. 0 1 0;...
  65. .3 .7 0;
  66. 0 0.5 0.5;
  67. 0 0.4 0.8];
  68. % default threshold for pupil
  69. h.thres = 4;
  70. set(h.slider2,'Min',0);
  71. set(h.slider2,'Max',1);
  72. set(h.slider2,'Value',0);
  73. set(h.edit1,'String',num2str(0));
  74. set(h.pupilsigma,'String',num2str(4));
  75. h.thres = 2;
  76. h.saturation = zeros(100,1);
  77. h.framesaturation = zeros(100,1);
  78. h.whichfile = 1;
  79. h.ROIfile = zeros(8,1);
  80. h.plotROIs = false(8,1);
  81. h.indROI = [];
  82. for k = 1:length(h.plotROIs)
  83. h.locROI{k} = [];
  84. end
  85. axes(h.axes1);
  86. set(gca,'xtick',[],'ytick',[]);
  87. box on;
  88. axes(h.axes4);
  89. set(gca,'xtick',[],'ytick',[]);
  90. box on;
  91. % Update h structure
  92. guidata(hObject, h);
  93. % UIWAIT makes MovieGUI wait for user response (see UIRESUME)
  94. % uiwait(h.figure1);
  95. % --- Outputs from this function are returned to the command line.
  96. function varargout = MovieGUI_OutputFcn(hObject, eventdata, h)
  97. % Get default command line output from h structure
  98. varargout{1} = h.output;
  99. %%%%% choose folder to write binary file
  100. function pushbutton18_Callback(hObject, eventdata, h)
  101. folder_name = uigetdir(h.binfolder);
  102. if folder_name ~= 0
  103. h.binfolder = folder_name;
  104. set(h.text21,'String',h.binfolder);
  105. end
  106. % Update h structure
  107. guidata(hObject, h);
  108. % ------------ choose folder -- can have multiple blocks!
  109. function folder_Callback(hObject, eventdata, h)
  110. folder_name = uigetdir(h.filepath);
  111. if folder_name ~= 0
  112. h.rootfolder = folder_name;
  113. [filename,folders,namef] = findMovieFolders(h,folder_name);
  114. namef
  115. if isempty(filename{1})
  116. msgbox('ahh! no movie files found!');
  117. else
  118. [filename,folders,namef] = chooseFiles(filename,folders,namef);
  119. axes(h.axes1);
  120. cla;
  121. axes(h.axes4);
  122. cla('reset');
  123. axis off;
  124. h.files = filename;
  125. h.folders = folders;
  126. h.vr = [];
  127. h.nX = [];
  128. h.nY = [];
  129. fstr{1}=[];
  130. for k = 1:size(filename,1)
  131. for j = 1:size(filename,2)
  132. h.vr{k,j} = VideoReader(filename{k,j});
  133. if j==1
  134. nX{k} = h.vr{k}.Width;
  135. nY{k} = h.vr{k}.Height;
  136. end
  137. fstr{k,j} = sprintf('%s/%s',folders{k,j},namef{k,j});
  138. end
  139. h.whichfile = k;
  140. h = resetROIs(h);
  141. end
  142. h.nX = nX;
  143. h.nY = nY;
  144. h.wROI = 1;
  145. h.rcurr = 0;
  146. h.whichfile = 1;
  147. h.whichview = 1;
  148. % delete small ROIs
  149. h.plotROIs(:) = 0;
  150. h.ROIfile(:) = 0;
  151. % string for movie choosing menu
  152. set(h.popupmenu6, 'String', fstr);
  153. set(h.popupmenu6, 'Value', h.whichfile);
  154. % reset ROIs to fit in video
  155. fprintf('displaying \n%s\n',filename{h.whichfile});
  156. if length(folder_name) > length(h.filepath)
  157. if strcmp(folder_name(1:length(h.filepath)),h.filepath)
  158. foldname = folder_name(length(h.filepath)+1:end);
  159. ns = strfind(foldname,'\');
  160. if isempty(ns)
  161. ns = strfind(foldname,'/');
  162. end
  163. if ~isempty(ns)
  164. ns = ns(1);
  165. foldname = sprintf('%s\n%s',foldname(1:ns),foldname(ns+1:end));
  166. set(h.text13,'String',foldname);
  167. else
  168. set(h.text13,'String',folder_name);
  169. end
  170. else
  171. set(h.text13,'String',folder_name);
  172. end
  173. else
  174. set(h.text13,'String',folder_name);
  175. end
  176. h.folder_name = folder_name;
  177. h.nframes = h.vr{h.whichfile}.Duration*h.vr{h.whichfile}.FrameRate - 1;
  178. disp(h.nframes+1)
  179. h.cframe = 1;
  180. set(h.slider1,'Value',0);
  181. set(h.slider4,'Value',0);
  182. set(h.edit3,'String','1');
  183. PlotFrame(h);
  184. end
  185. end
  186. guidata(hObject,h);
  187. % --------------- choose file to view! -------------------%
  188. function popupmenu6_Callback(hObject, eventdata, h)
  189. wfile0=h.whichfile;
  190. h.whichfile = get(hObject,'Value');
  191. [h.whichview, ~] = ind2sub(size(h.files), h.whichfile);
  192. h.cframe = 1;
  193. h.wROI = 1;
  194. set(h.checkbox16,'Value',1);
  195. axes(h.axes1);
  196. cla;
  197. if wfile0 ~= h.whichfile
  198. axes(h.axes4);
  199. cla('reset');
  200. h.indROI=[];
  201. box off;
  202. axis off;
  203. end
  204. PlotFrame(h);
  205. fprintf('displaying \n%s\n',h.files{h.whichfile});
  206. h.nframes = h.vr{h.whichfile}.Duration*h.vr{h.whichfile}.FrameRate-1;
  207. set(h.edit1,'String',sprintf('%1.2f',h.saturation(h.whichfile)));
  208. set(h.slider5,'Value',h.framesaturation(h.whichfile));
  209. guidata(hObject,h);
  210. % SET WHETHER OR NOT TO VIEW AREAS
  211. function checkbox16_Callback(hObject, eventdata, h)
  212. wc = get(hObject,'Value');
  213. h.wROI = wc;
  214. PlotFrame(h);
  215. guidata(hObject,h);
  216. % ------- DRAW INCLUDED ROIs FOR MULTIVIDEO SVD ----------------------- %
  217. function keepROI_Callback(hObject, eventdata, h)
  218. nxS = floor(h.nX{h.whichview} / h.sc);
  219. nyS = floor(h.nY{h.whichview} / h.sc);
  220. if isempty(h.ROI{h.whichview}{1})
  221. ROI0 = [1 1 nxS nyS];
  222. else
  223. ROI0 = [nxS*.25 nyS*.25 nxS*.5 nyS*.5];
  224. end
  225. ROI = drawROI(h,ROI0);
  226. ROI = onScreenROI(ROI, nxS, nyS);
  227. if isempty(h.ROI{h.whichview}{1})
  228. h.ROI{h.whichview}{1} = ROI;
  229. else
  230. h.ROI{h.whichview}{end+1} = ROI;
  231. end
  232. h.rcurr = 0;
  233. PlotFrame(h);
  234. guidata(hObject, h);
  235. % ------- DRAW EXCLUDED ROIs FOR MULTIVIDEO SVD ----------------------- %
  236. function excludeROI_Callback(hObject, eventdata, h)
  237. nxS = floor(h.nX{h.whichview} / h.sc);
  238. nyS = floor(h.nY{h.whichview} / h.sc);
  239. ROI0 = [nxS*.4 nyS*.4 nxS*.3 nyS*.3];
  240. ROI = drawROI(h,ROI0);
  241. ROI = onScreenROI(ROI, nxS, nyS);
  242. if isempty(h.eROI{h.whichview}{1})
  243. h.eROI{h.whichview}{1} = ROI;
  244. else
  245. h.eROI{h.whichview}{end+1} = ROI;
  246. end
  247. h.rcurr = 1;
  248. PlotFrame(h);
  249. guidata(hObject, h);
  250. % --- delete all multivideo SVD ROIs ---- %
  251. function deleteall_Callback(hObject, eventdata, h)
  252. h = resetROIs(h);
  253. PlotFrame(h);
  254. guidata(hObject, h);
  255. % --- delete last drawn multivideo SVD ROI ---- %
  256. function deleteone_Callback(hObject, eventdata, h)
  257. if h.rcurr
  258. if numel(h.eROI{h.whichview}) > 1
  259. h.eROI{h.whichview} = h.eROI{h.whichview}(1:end-1);
  260. else
  261. h.eROI{h.whichview}{1} = [];
  262. end
  263. else
  264. if numel(h.ROI{h.whichview}) > 1
  265. h.ROI{h.whichview} = h.ROI{h.whichview}(1:end-1);
  266. else
  267. h.ROI{h.whichview}{1} = [];
  268. end
  269. end
  270. PlotFrame(h);
  271. guidata(hObject, h);
  272. % use a GPU?
  273. function checkbox17_Callback(hObject, eventdata, h)
  274. wc = get(hObject,'Value');
  275. h.useGPU = wc;
  276. guidata(hObject,h);
  277. % --- SLIDER FOR CHOOSING DISPLAYED FRAME ------------------ %
  278. function slider1_CreateFcn(hObject, eventdata, h)
  279. set(hObject,'Interruptible','On');
  280. if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  281. set(hObject,'BackgroundColor',[.75 .75 .75]);
  282. end
  283. function slider1_Callback(hObject, eventdata, h)
  284. set(hObject,'Interruptible','On');
  285. set(hObject,'BusyAction','cancel');
  286. v = get(hObject,'Value');
  287. smin = get(hObject,'Min');
  288. smax = get(hObject,'Max');
  289. cframe = min(h.nframes-1,max(1,round(v/(smax-smin) * h.nframes)));
  290. h.cframe = cframe;
  291. set(h.edit3,'String',num2str(cframe));
  292. set(h.slider4,'Value',h.cframe/(h.nframes-1));
  293. PlotFrame(h);
  294. PlotROI(h);
  295. guidata(hObject,h);
  296. % --- FINESCALE SLIDER ------------------ %
  297. function slider4_Callback(hObject, eventdata, h)
  298. set(hObject,'Interruptible','On');
  299. set(hObject,'BusyAction','cancel');
  300. set(hObject,'SliderStep',[1/double(h.nframes-1) 2/double(h.nframes-1)]);
  301. v = get(hObject,'Value');
  302. cframe = min(h.nframes-1,max(1,round((v)*h.nframes)));%%/ h.nframes)));
  303. h.cframe = cframe;
  304. set(h.edit3,'String',num2str(cframe));
  305. set(h.slider1,'Value',h.cframe/h.nframes);
  306. PlotFrame(h);
  307. PlotROI(h);
  308. guidata(hObject,h);
  309. function slider4_CreateFcn(hObject, eventdata, h)
  310. if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  311. set(hObject,'BackgroundColor',[.9 .9 .9]);
  312. end
  313. set(hObject,'Min',0);
  314. set(hObject,'Max',1);
  315. % --- PLAY button
  316. function togglebutton1_Callback(hObject, eventdata, h)
  317. while get(hObject, 'value') && h.cframe+1 < h.nframes
  318. h.cframe = h.cframe+1;
  319. set(h.edit3,'String',num2str(h.cframe));
  320. set(h.slider1,'Value',h.cframe/h.nframes);
  321. PlotFrame(h);
  322. PlotROI(h);
  323. end
  324. set(h.slider4,'Value',h.cframe/(h.nframes-1));
  325. guidata(hObject,h);
  326. % --- Executes during object creation, after setting all properties.
  327. function slider5_CreateFcn(hObject, eventdata, h)
  328. if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  329. set(hObject,'BackgroundColor',[.9 .9 .9]);
  330. end
  331. % ***************** SATURATION SETTINGS ****************%
  332. % --- SLIDER FOR FULL FRAME SATURATION ---------------------%
  333. function slider5_Callback(hObject, eventdata, h)
  334. set(hObject,'Interruptible','On');
  335. set(hObject,'BusyAction','cancel');
  336. sats = get(hObject,'Value');
  337. h.framesaturation(h.whichview) = sats;
  338. PlotFrame(h);
  339. guidata(hObject,h);
  340. % --- SLIDER FOR SELECTED ROI SATURATION -------------------%
  341. function slider2_Callback(hObject, eventdata, h)
  342. set(hObject,'Interruptible','On');
  343. set(hObject,'BusyAction','cancel');
  344. sats = get(hObject,'Value');
  345. h.saturation(h.indROI) = sats;
  346. set(h.edit1,'String',sprintf('%1.2f',sats));
  347. %PlotFrame(h);
  348. axes(h.axes4);
  349. cla;
  350. PlotROI(h);
  351. guidata(hObject, h);
  352. function slider2_CreateFcn(hObject, eventdata, h)
  353. if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  354. set(hObject,'BackgroundColor',[.9 .9 .9]);
  355. end
  356. % saturation edit
  357. function edit1_Callback(hObject, eventdata, h)
  358. sval = get(hObject,'String');
  359. set(h.slider2,'Value',str2num(sval));
  360. h.saturation(h.whichfile) = str2num(sval);
  361. PlotFrame(h);
  362. guidata(hObject,h);
  363. function edit1_CreateFcn(hObject, eventdata, h)
  364. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  365. set(hObject,'BackgroundColor','white','String',num2str(h.pupLow));
  366. end
  367. % ****** Save ROI settings and keep list of saved folders ----- %
  368. function savesettings_Callback(hObject, eventdata,h)
  369. saveROI(h);
  370. guidata(hObject,h);
  371. % ****** ROIs will be processed across expts -------------------- %
  372. function processROIs_Callback(hObject, eventdata, h)
  373. h = processROIs(h);
  374. guidata(hObject,h);
  375. % **** initialize list of files box
  376. function popupmenu6_CreateFcn(hObject, eventdata, h)
  377. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  378. set(hObject,'BackgroundColor','white');
  379. end
  380. set(hObject,'String','first choose folder');
  381. set(hObject,'Value',1);
  382. if isfield(h,'folders')
  383. set(hObject,'String',folders);
  384. end
  385. %%%%%% ***************** TEXT BOXES *************** %%%%%%%
  386. %%%%% frame number edit box
  387. function edit3_Callback(hObject, eventdata, h)
  388. cframe = get(hObject,'String');
  389. if iscell(cframe)
  390. cframe = cframe{1};
  391. end
  392. h.cframe = max(1,min(h.nframes-1,round(str2num(cframe))));
  393. set(hObject,'String',sprintf('%d',h.cframe));
  394. set(h.slider1,'Value',h.cframe/h.nframes);
  395. set(h.slider4,'Value',h.cframe/h.nframes);
  396. PlotFrame(h);
  397. guidata(hObject,h);
  398. function edit3_CreateFcn(hObject, eventdata, h)
  399. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  400. set(hObject,'BackgroundColor','white');
  401. end
  402. %%%%% SPATIAL SMOOTHING BOX
  403. function edit4_Callback(hObject, eventdata, h)
  404. spatscale = get(hObject,'String');
  405. if iscell(spatscale)
  406. spatscale = spatscale{1};
  407. end
  408. spatscale = max(1, min(50, round(str2num(spatscale))));
  409. % resize ROIs
  410. h = resizeROIs(h, spatscale);
  411. h.sc = spatscale;
  412. set(hObject, 'String', sprintf('%d', h.sc));
  413. axes(h.axes1);
  414. cla;
  415. PlotFrame(h);
  416. axes(h.axes4);
  417. cla;
  418. PlotROI(h);
  419. guidata(hObject, h);
  420. function edit4_CreateFcn(hObject, eventdata, h)
  421. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  422. set(hObject,'BackgroundColor','white');
  423. end
  424. %%%%%% pupil threshold edit box ---------------------- %
  425. function pupilsigma_Callback(hObject, eventdata, h)
  426. thres = get(hObject,'String');
  427. if iscell(thres)
  428. thres = thres{1};
  429. end
  430. h.thres = max(1, min(10, (str2num(thres))));
  431. set(hObject, 'String', sprintf('%1.1f', h.thres));
  432. PlotROI(h);
  433. guidata(hObject,h);
  434. function pupilsigma_CreateFcn(hObject, eventdata, h)
  435. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  436. set(hObject,'BackgroundColor','white');
  437. end
  438. %%%%% temporal smoothing constant box --------------------- %
  439. function edit5_Callback(hObject, eventdata, h)
  440. tempscale = get(hObject,'String');
  441. if iscell(tempscale)
  442. tempscale = tempscale{1};
  443. end
  444. h.tsc = max(1, min(50, round(str2num(tempscale))));
  445. set(hObject, 'String', sprintf('%d', h.tsc));
  446. PlotFrame(h);
  447. guidata(hObject, h);
  448. function edit5_CreateFcn(hObject, eventdata, h)
  449. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  450. set(hObject,'BackgroundColor','white');
  451. end
  452. % --- SMALLER ROIs AND PUPILS ----------------------------------- %
  453. function running_Callback(hObject, eventdata, h)
  454. h.indROI = 1;
  455. h = drawSmallROI(h);
  456. guidata(hObject, h);
  457. function whisker_Callback(hObject, eventdata, h)
  458. h.indROI = 2;
  459. h = drawSmallROI(h);
  460. guidata(hObject, h);
  461. function snout_Callback(hObject, eventdata, h)
  462. h.indROI = 3;
  463. h = drawSmallROI(h);
  464. guidata(hObject, h);
  465. function otherROI_Callback(hObject, eventdata, h)
  466. h.indROI = 4;
  467. h = drawSmallROI(h);
  468. guidata(hObject, h);
  469. function pupil1_Callback(hObject, eventdata, h)
  470. h.indROI = 5;
  471. h = drawSmallROI(h);
  472. guidata(hObject, h);
  473. function pupil2_Callback(hObject, eventdata, h)
  474. h.indROI = 6;
  475. h = drawSmallROI(h);
  476. guidata(hObject, h);
  477. function blink1_Callback(hObject, eventdata, h)
  478. h.indROI = 7;
  479. h = drawSmallROI(h);
  480. guidata(hObject, h);
  481. function blink2_Callback(hObject, eventdata, h)
  482. h.indROI = 8;
  483. h = drawSmallROI(h);
  484. guidata(hObject, h);
  485. % --------- DELETE ROIs -------- %
  486. function runningdelete_Callback(hObject, eventdata, h)
  487. h.plotROIs(1) = 0;
  488. h.ROIfile(1) = 0;
  489. PlotFrame(h);
  490. axes(h.axes4);
  491. cla;
  492. title('');
  493. guidata(hObject,h);
  494. function whiskerdelete_Callback(hObject, eventdata, h)
  495. h.plotROIs(2) = 0;
  496. h.ROIfile(2) = 0;
  497. PlotFrame(h);
  498. axes(h.axes4);
  499. cla;
  500. title('');
  501. guidata(hObject,h);
  502. function snoutdelete_Callback(hObject, eventdata, h)
  503. h.plotROIs(3) = 0;
  504. h.ROIfile(3) = 0;
  505. PlotFrame(h);
  506. axes(h.axes4);
  507. cla;
  508. title('');
  509. guidata(hObject,h);
  510. function otherdelete_Callback(hObject, eventdata, h)
  511. h.plotROIs(4) = 0;
  512. h.ROIfile(4) = 0;
  513. PlotFrame(h);
  514. axes(h.axes4);
  515. cla;
  516. title('');
  517. guidata(hObject,h);
  518. function pupil1delete_Callback(hObject, eventdata, h)
  519. h.plotROIs(5) = 0;
  520. h.ROIfile(5) = 0;
  521. PlotFrame(h);
  522. axes(h.axes4);
  523. cla;
  524. title('');
  525. guidata(hObject,h);
  526. function pupil2delete_Callback(hObject, eventdata, h)
  527. h.plotROIs(6) = 0;
  528. h.ROIfile(6) = 0;
  529. PlotFrame(h);
  530. axes(h.axes4);
  531. cla;
  532. title('');
  533. guidata(hObject,h);
  534. function blink1delete_Callback(hObject, eventdata, h)
  535. h.plotROIs(7) = 0;
  536. h.ROIfile(7) = 0;
  537. PlotFrame(h);
  538. axes(h.axes4);
  539. cla;
  540. title('');
  541. guidata(hObject,h);
  542. function blink2delete_Callback(hObject, eventdata, h)
  543. h.plotROIs(8) = 0;
  544. h.ROIfile(8) = 0;
  545. PlotFrame(h);
  546. axes(h.axes4);
  547. cla;
  548. title('');
  549. guidata(hObject,h);
  550. function pushbutton23_Callback(hObject, eventdata, h)

MovieGUI.m at commit f8b5b51, under GPL-3.0 · at the source

Overview

Authors: Xiaoqi Peng1,2, Yehao Liu2, Yi Liu3, Yunfeng Mao4, Qianhui Xia2, An Liu2, Qian Dai5, Yingju Tai4, Bin Luo6, Hao Wang5, Yuanyin Wang7, Fang Kang4, Haitao Wang7, Zhi Zhang1,2,4,8
  1. Department of Pain Medicine, The First Affiliated Hospital of Anhui Medical University, Hefei, PR China
  2. Department of Anatomy, Anhui Provincial Key Laboratory for Brain Bank Construction and Resource Utilization, School of Basic Medical Sciences, Anhui Medical University, Hefei, PR China
  3. High Magnetic Field Laboratory of CAS (CHMFL), CAS Key Laboratory of High Magnetic Field and Ion Beam Physical Biology, HFIPS, Hefei, PR China
  4. Department of Anesthesiology and Pain Medicine, The First Affiliated Hospital of USTC, Hefei National Laboratory for Physical Sciences at the Microscale, Division of Life Sciences and Medicine, University of Science and Technology of China, Hefei, PR China
  5. School of Integrated Chinese and Western Medicine, Anhui University of Chinese Medicine, Hefei, PR China
  6. Department of Psychiatry, The First Affiliated Hospital of USTC, Hefei, PR China
  7. College & Hospital of Stomatology, Anhui Provincial Key Laboratory of Oral Diseases Research, Anhui Medical University, Hefei, PR China
  8. Center for Advanced Interdisciplinary Science and Biomedicine of IHM, Hefei, PR China
Journal: Nature communications, volume 17, issue 1, article 5481
Dates: received 15 February 2026; accepted 7 April 2026; published online 21 April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-72214-0 · PMID 42014724 · PMCID PMC13284397 · OpenAlex W7155068815
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: mouse (organism), pain (population), systems (subfield)
Methods: Statistics, Preprocessing, Single-unit activity, calcium imaging, Physiology & signal measures
Keywords: Neural circuits, Sensory processing
MeSH: Analgesia*, Brain*, Ear Auricle*, Neuralgia*, Vagus Nerve Stimulation*, Animals, Disease Models, Animal, Male, Mice, Mice, Inbred C57BL, Neurons, Optogenetics, Periaqueductal Gray, Vagus Nerve (* major topic)
Topic: Vagus Nerve Stimulation Research (Neurology, Neuroscience), according to OpenAlex
Funding: National Natural Science Foundation of China (National Science Foundation of China) (32025017, 32471182, 32530043)
Citations: cited by 2 papers (Europe PMC); 60 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

Its files are read in the Code ↔ Paper reader above.

mouseland/facemap

License: GPL-3.0
State: the link answers, verified on 31 October 2026
Evidence: files inventoried
Commit: f8b5b518efcde8b4aae7727283bf017b23641c7f, 21 July 2025
Languages: Python (43), MATLAB (34), Jupyter (5), Shell (1)
Size: 141 files, 83 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (environment.yml, setup.cfg, setup.py, docs/requirements.txt), tests, continuous integration, documentation, 5 notebooks
Not found: CITATION.cff
Tools: NumPy (35 files), PyTorch (19 files), SciPy (16 files), Matplotlib (15 files), OpenCV (7 files), scikit-learn (5 files), h5py (3 files), Parallel Computing Toolbox (3 files), Numba (2 files), pandas (1 file), PyWavelets (1 file), UMAP (1 file)
Availability: 2 checks, the latest on 31 October 2026: the link answers
  • 31 October 2026: the link answers
  • 29 September 2026: the link answers
85 files

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-72214-0.

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;
  • 83 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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

No dataset and no data link were found in the paper.

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • no repository, dataset or request procedure was recognized in it

Read it in the paper: doi.org/10.1038/s41467-026-72214-0.

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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 14 authors, 2 keywords, 14 MeSH terms, 1 funder, 60 references.

Cite

This paper

Peng, X., Liu, Y., Liu, Y., Mao, Y., Xia, Q., Liu, A., Dai, Q., Tai, Y., Luo, B., Wang, H., Wang, Y., Kang, F., Wang, H., & Zhang, Z. (2026). Auricular vagus nerve stimulation drives analgesia via an auricle-brain axis in a mouse model of neuropathic pain. Nature communications, 17(1), 5481. https://doi.org/10.1038/s41467-026-72214-0

BibTeX

@article{peng2026auricular,
author = {Peng, Xiaoqi and Liu, Yehao and Liu, Yi and Mao, Yunfeng and Xia, Qianhui and Liu, An and Dai, Qian and Tai, Yingju and Luo, Bin and Wang, Hao and Wang, Yuanyin and Kang, Fang and Wang, Haitao and Zhang, Zhi},
title = {{Auricular vagus nerve stimulation drives analgesia via an auricle-brain axis in a mouse model of neuropathic pain}},
journal = {Nature communications},
year = {2026},
month = apr,
volume = {17},
number = {1},
pages = {5481},
publisher = {Nature Portfolio},
issn = {2041-1723},
doi = {10.1038/s41467-026-72214-0},
url = {https://doi.org/10.1038/s41467-026-72214-0},
pmid = {42014724},
pmcid = {PMC13284397}
}

RIS

TY - JOUR
AU - Peng, Xiaoqi
AU - Liu, Yehao
AU - Liu, Yi
AU - Mao, Yunfeng
AU - Xia, Qianhui
AU - Liu, An
AU - Dai, Qian
AU - Tai, Yingju
AU - Luo, Bin
AU - Wang, Hao
AU - Wang, Yuanyin
AU - Kang, Fang
AU - Wang, Haitao
AU - Zhang, Zhi
TI - Auricular vagus nerve stimulation drives analgesia via an auricle-brain axis in a mouse model of neuropathic pain
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/04/21
VL - 17
IS - 1
SP - 5481
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/s41467-026-72214-0
UR - https://doi.org/10.1038/s41467-026-72214-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-72214-0",
"type": "article-journal",
"title": "Auricular vagus nerve stimulation drives analgesia via an auricle-brain axis in a mouse model of neuropathic pain",
"container-title": "Nature communications",
"author": [
{
"family": "Peng",
"given": "Xiaoqi"
},
{
"family": "Liu",
"given": "Yehao"
},
{
"family": "Liu",
"given": "Yi"
},
{
"family": "Mao",
"given": "Yunfeng"
},
{
"family": "Xia",
"given": "Qianhui"
},
{
"family": "Liu",
"given": "An"
},
{
"family": "Dai",
"given": "Qian"
},
{
"family": "Tai",
"given": "Yingju"
},
{
"family": "Luo",
"given": "Bin"
},
{
"family": "Wang",
"given": "Hao"
},
{
"family": "Wang",
"given": "Yuanyin"
},
{
"family": "Kang",
"given": "Fang"
},
{
"family": "Wang",
"given": "Haitao"
},
{
"family": "Zhang",
"given": "Zhi"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "5481",
"DOI": "10.1038/s41467-026-72214-0",
"PMID": "42014724",
"PMCID": "PMC13284397",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41467-026-72214-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
21
]
]
}
}

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/s41593-023-01490-6 [code]
Facemap: a framework for modeling neural activity based on orofacial tracking.
Journal: Nature neuroscience
In common: PyWavelets, UMAP, Numba, 9 other tools, systems, mouse, 1 reference
[2] doi:10.1073/pnas.2527641122
Galectin-related protein, a key contributor, drives diabetes-associated neuropathic pain.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: pain, 1 reference, 2 authors
[3] doi:10.1038/s41467-026-72057-9 [code]
Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.
Journal: Nature communications
In common: PyWavelets, UMAP, Numba, 8 other tools, systems
[4] doi:10.1016/j.brs.2026.103044
Cortical potentials evoked by stimulation of cervical vagus vs. auricular nerve: a comparative, parametric study in nonhuman primates.
Journal: Brain stimulation
In common: 8 references
[5] doi:10.1038/s41592-026-03057-2 [code]
CREsted: modeling genomic and synthetic cell-type-specific enhancers across tissues and species.
Journal: Nature methods
In common: PyWavelets, UMAP, Numba, 7 other tools, mouse
[6] doi:10.1016/j.neuron.2021.10.031 [code]
Multisensory coding of angular head velocity in the retrosplenial cortex.
Journal: Neuron
In common: PyWavelets, Numba, Parallel Computing Toolbox, 7 other tools, mouse
[7] doi:10.1038/s41598-021-02307-x [code]
Human intracranial recordings reveal distinct cortical activity patterns during invasive and non-invasive vagus nerve stimulation.
Journal: Scientific reports
In common: 7 references
[8] doi:10.1371/journal.pone.0310917 [code]
Vibrotactile auricular vagus nerve stimulation alters limbic system connectivity in humans: A pilot study.
Journal: PloS one
In common: Parallel Computing Toolbox, 6 references
[9] doi:10.1007/s12021-021-09556-1 [code]
Stable Deep Neural Network Architectures for Mitochondria Segmentation on Electron Microscopy Volumes.
Journal: Neuroinformatics
In common: PyWavelets, Numba, OpenCV, 7 other tools
[10] doi:10.1016/j.crmeth.2024.100964 [code]
Unifying community whole-brain imaging datasets enables robust neuron identification and reveals determinants of neuron position in C. elegans.
Journal: Cell reports methods
In common: PyWavelets, Parallel Computing Toolbox, OpenCV, 7 other tools

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.1038/s41467-026-72214-0.svg)](https://openscicode.org/badge/doi/10.1038/s41467-026-72214-0)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-72214-0.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41467-026-72214-0
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-72214-0"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-72214-0.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

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)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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