Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blind manuscript submission changes #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 109 additions & 113 deletions Analysis/Paper Analysis/EphysExample.ipynb

Large diffs are not rendered by default.

Binary file modified Analysis/PaperFigures.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions Manuscript/00_Article_Merge.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
\renewcommand\familydefault{\sfdefault}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{setspace}
\doublespacing

\begin{document}

Expand Down
68 changes: 39 additions & 29 deletions Manuscript/01_Article_MainText.tex
Original file line number Diff line number Diff line change
@@ -1,55 +1,65 @@
\leadauthor{Cruz}
%\leadauthor{Cruz}

\title{A flexible fluid delivery system for rodent behavior experiments}
\shorttitle{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep the author list for now and remove it only when generating the pdf for submission

%\title{A flexible fluid delivery system for rodent behavior experiments}
%\shorttitle{}

\author[1,2,3]{Bruno F. Cruz}
\author[1]{Paulo Carriço}
\author[1]{Luís Teixeira}
\author[1]{Sofia Freitas}
\author[1]{Filipe Mendes}
\author[1]{Dario Bento}
\author[1,\Letter]{Artur Silva}
\affil[1]{Champalimaud Research, Champalimaud Foundation, Lisbon, Portugal}
\affil[2]{NeuroGEARS Ltd, London, United Kingdom}
\affil[3]{Current address: Allen Institute for Neural Dynamics, Seattle, United States}
\date{}
%\author[1,2,3]{Bruno F. Cruz}
%\author[1]{Paulo Carriço}
%\author[1]{Luís Teixeira}
%\author[1]{Sofia Freitas}
%\author[1]{Filipe Mendes}
%\author[1]{Dario Bento}
%\author[1,\Letter]{Artur Silva}
%\affil[1]{Champalimaud Research, Champalimaud Foundation, Lisbon, Portugal}
%\affil[2]{NeuroGEARS Ltd, London, United Kingdom}
%\affil[3]{Current address: Allen Institute for Neural Dynamics, Seattle, United States}
%\date{}

\maketitle
%\maketitle

\begin{abstract}
\input{Chapters/Abstract.tex}


%\input{Chapters/Abstract.tex}

{\Huge A flexible fluid delivery system for rodent behavior experiments}
\\ \\ \\
\input{Chapters/Abstract.tex}
\\
\\
\\
\input{Chapters/SignificanceStatement.tex}
\end{abstract}

%\begin{corrauthor}
%artur.silva\at research.fchampalimaud.org
%\end{corrauthor}

\begin{corrauthor}
artur.silva\at research.fchampalimaud.org
\end{corrauthor}

\section*{Introduction}\label{s:introduction}
\input{Chapters/Introduction.tex}

\section*{Materials and Methods}\label{s:methods}
\input{Chapters/MaterialsAndMethods.tex}

\section*{Results}\label{s:results}
\input{Chapters/Results.tex}

\section*{Discussion}\label{s:discussion}
\input{Chapters/Discussion.tex}

\section*{Methods}\label{s:methods}
\input{Chapters/MaterialsAndMethods.tex}

\subsection*{Code and data availability}\label{s:code_availability}
All code and data related to the device characterization shown in this manuscript are available from \url{https://github.com/fchampalimaud/syringe.pump.manuscript}.

\subsection*{Acknowledgments}\label{s:acknowledgments}
We thank Cindy Poo, Hugo Marques and Tiago Monteiro for comments on the manuscript, and Gonçalo Lopes for help with the Bonsai interface.
%\subsection*{Code and data availability}\label{s:code_availability}
%All code and data related to the device characterization shown in this manuscript are %available from \url{https://github.com/fchampalimaud/syringe.pump.manuscript}.

%\subsection*{Acknowledgments}\label{s:acknowledgments}
%We thank Cindy Poo, Hugo Marques and Tiago Monteiro for comments on the manuscript, and %Gonçalo Lopes for help with the Bonsai interface.

\subsection*{Author's Contribution}\label{s:contributions}
B.C. and A.S. collected and analyzed data for the device characterization. P.C. and F.M designed and build the mechanical device. A.S. designed the PCB. D.B. assembled the PCB and initial data collection. L.T. wrote the firmware and graphical user interface, with input from A.S.. S.F. and B.C. designed the animal experiments. S.F. collected and analyzed data from rat behavior experiments. B.C. collected and analyzed data from the acute electrophysical experiments. B.C. made the figures in the manuscript. B.C. and A.S. wrote the manuscript with input from S.F. and L.T.
%\subsection*{Author's Contribution}\label{s:contributions}
%B.C. and A.S. collected and analyzed data for the device characterization. P.C. and F.M %designed and build the mechanical device. A.S. designed the PCB. D.B. assembled the PCB and %initial data collection. L.T. wrote the firmware and graphical user interface, with input %from A.S.. S.F. and B.C. designed the animal experiments. S.F. collected and analyzed data %from rat behavior experiments. B.C. collected and analyzed data from the acute %electrophysical experiments. B.C. made the figures in the manuscript. B.C. and A.S. wrote %the manuscript with input from S.F. and L.T.


\section*{Bibliography}
\section*{References}

\bibliography{refslist}

6 changes: 4 additions & 2 deletions Manuscript/Chapters/Abstract.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Experimental behavioral neuroscience relies on the ability to deliver precise amounts of liquid volumes to animal subjects. Among others, it allows the progressive shaping of behavior through successive, automated, reinforcement, thus allowing training in more demanding behavioral tasks and the manipulation of variables that underlie the decision making process (\textit{e.g.:} reward magnitude).
{\large Abstract}
\newline
\textnormal{Experimental behavioral neuroscience relies on the ability to deliver precise amounts of liquid volumes to animal subjects. Among others, it allows the progressive shaping of behavior through successive, automated, reinforcement, thus allowing training in more demanding behavioral tasks and the manipulation of variables that underlie the decision making process (\textit{e.g.:} reward magnitude).
Here we introduce a stepper-motor-based, fully integrated, open-source solution, that allows the reproducible delivery of small (<1 $\mu L$) liquid volumes.
The system can be controlled via software using the Harp protocol (\textit{e.g.:} from Bonsai or Python interfaces), or directly through a low-level I/O interface. Both the control software and electronics are compatible with a wide variety of motor models and mechanical designs. However, we also provide schematics, and step-by-step assembly instructions, for the mechanical design used and characterized in this manuscript.
We provide benchmarks of the full integrated system using a computer-vision method capable of measuring across-trial delivery of small volumes, an important metric when having behavior experiments in mind. Finally, we provide experimental validation of our system by employing it in a psychophysics rodent task, and during electrophysiological recordings.
We provide benchmarks of the full integrated system using a computer-vision method capable of measuring across-trial delivery of small volumes, an important metric when having behavior experiments in mind. Finally, we provide experimental validation of our system by employing it in a psychophysics rodent task, and during electrophysiological recordings.}
25 changes: 20 additions & 5 deletions Manuscript/Chapters/Discussion.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
Inspired by previous projects (\citep{Amarante2019, Wijnen2014}), we present a fully integrated, and characterized, system for micro-litter range fluid delivery targeted towards neuroscience behavior experiments.
Inspired by previous projects (\citep{Amarante2019, Wijnen2014}), we present a fully integrated, and characterized system for microliter range fluid delivery targeted towards neuroscience behavior experiments.

We designed a simple protocol which allowed us provide an extensive characterization of trial-to-trial variability in the fluid delivery dynamics. An import stack of tests when considering the intended use of this system for rodent behavior experiments.

We provide an alternative to gravity-based passive systems, by designing a scalable and affordable solution that allows for dynamic control over reward delivery, without suffering from the long-term stability issues often associated with the former systems. Additionally, we also highlight the afforded control gained over flow-rate that such an non-passive system allows.
Importantly, we also tested the compatibility of the system with common neuroscience experimental demands by deploying it during rodent behavior and electrophysiological recording experiments.

Finally, we provide users with several options to interface with the system, affording flexible configuration and easy integration into already-existing experimental rigs.
In addition to the mechanical design of the syringe pump, we also developed a custom PCB that not only controls the presented pump but can also serve as a generic controller for various types of stepper motor-based syringe pumps. This allows users to design and assemble their own pump configurations. Furthermore, by implementing the Harp protocol, the firmware affords precise timestamping and synchronization with other Harp devices, facilitating scalable and reliable experimental data collection pipelines.

All the necessary design and production files for the system, including the PCB, firmware, and GUI, have been made freely available, along with detailed assembly instructions. By providing these files, our goal is not only to enable users to replicate the design but also to make modifications according to their specific needs.

To ensure seamless integration with already-existing experimental rigs (such as replacing gravity-based fluid delivery systems), we offer users with several options to interface with the system, affording a very flexible configuration and compatibility. By using pre-existent controllers available in the experimental setups, the syringe pump can be fully controlled through its low level interface, a trigger based protocol, the GUI or the Harp API. The integration of this API is already available in Bonsai, which is particularly relevant since it leverages the capabilities of the syringe pump, by offering a powerful tool for real-time data stream processing, video acquisition, close-loop tasks and real time data visualization, in a visual programming language environment.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To ensure seamless integration with already-existing experimental rigs (such as replacing gravity-based fluid delivery systems), we offer users with several options to interface with the system, affording a very flexible configuration and compatibility. By using pre-existent controllers available in the experimental setups, the syringe pump can be fully controlled through its low level interface, a trigger based protocol, the GUI or the Harp API. The integration of this API is already available in Bonsai, which is particularly relevant since it leverages the capabilities of the syringe pump, by offering a powerful tool for real-time data stream processing, video acquisition, close-loop tasks and real time data visualization, in a visual programming language environment.
To ensure seamless integration with already-existing experimental rigs (such as replacing gravity-based fluid delivery systems), our design provides different levels of operation control. Specifically, the syringe pump can be fully controlled through its low-level interface, trigger-baed protocol, graphical user interface or, more generically, via the Harp API. The integration of this API is already available in the Bonsai programming language. This integration is particularly relevant since it offers a powerful ecosystem of tools for real-time data stream processing, video acquisition, close-loop tasks and real-time data visualization, in a visual programming language environment.


We also designed a novel and simple protocol which allowed us provide an extensive characterization of trial-to-trial variability in the fluid delivery dynamics. An import stack of tests when considering the intended use of this system for rodent behavior experiments. Traditionally, fluid volume characterization relies on repeating multiple fluid deliveries and then weighing the total volume. However, this approach only provides the mean volume over multiple deliveries and fails to assess variability across single fluid delivery events. Due to the mechanical nature of the syringe pump design, factors such as defective rods, material hysteresis, syringes construction, among others, can potentially introduce variations in small-volume deliveries. This makes it important to assess single delivery events. However, we acknowledge that measuring single small-volume delivery events presents a technical challenge in that equipment capable of reliably measuring such small amounts is rarely available.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We also designed a novel and simple protocol which allowed us provide an extensive characterization of trial-to-trial variability in the fluid delivery dynamics. An import stack of tests when considering the intended use of this system for rodent behavior experiments. Traditionally, fluid volume characterization relies on repeating multiple fluid deliveries and then weighing the total volume. However, this approach only provides the mean volume over multiple deliveries and fails to assess variability across single fluid delivery events. Due to the mechanical nature of the syringe pump design, factors such as defective rods, material hysteresis, syringes construction, among others, can potentially introduce variations in small-volume deliveries. This makes it important to assess single delivery events. However, we acknowledge that measuring single small-volume delivery events presents a technical challenge in that equipment capable of reliably measuring such small amounts is rarely available.
We also report on the fluid-delivery capabilities of the system by providing a comprehensive stack of tests and benchmarks. Traditionally, fluid volume characterization relies on repeating multiple fluid deliveries and then weighing the total volume. However, this approach only provides the mean volume over multiple deliveries and fails to assess variability across single fluid delivery events. Due to the mechanical nature of the syringe pump design, factors such as defective rods, material hysteresis, syringe construction, among others, can easily introduce variations in microliter-range protocols.


Importantly, we also tested the compatibility of the system with common neuroscience experimental demands by deploying it during rodent behavior, where we successfully demonstrated the controlled variation of delivered reward amounts. Additionally, we conducted electrophysiological recording experiments, confirming that no electrical artifacts were observed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Importantly, we also tested the compatibility of the system with common neuroscience experimental demands by deploying it during rodent behavior, where we successfully demonstrated the controlled variation of delivered reward amounts. Additionally, we conducted electrophysiological recording experiments, confirming that no electrical artifacts were observed.
Finally, we also tested the compatibility of the system with common neuroscience experimental demands by successfully deploying it in rodent behavior experiments and, highlighting the system's compatibility electrophysiological recordings.```











16 changes: 9 additions & 7 deletions Manuscript/Chapters/Introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

Due to their simplicity and compactness, gravity-based passive systems, most commonly implemented using valves, are widely adopted by the neuroscience community. With this approach, the volume of the delivered fluid is determined by the duration a valve remains open. Despite their convenience, gravity-based systems routinely face operational issues. First, due to changes in the fluid resistance (e.g.: biofilm growth in tubing), calibration values tend to drift across days, requiring frequent maintenance and re-calibration. Second, the relationship between reward amount and valve opening time is often non-linear, especially for small volumes, requiring calibration over several reward sizes. Finally, since the fluid flow rate is constant under a given value of hydraulic pressure, it is challenging to decouple delivered liquid volume from the total delivery time.

Alternative active systems, such as syringe pumps, have the potential to solve all the aforementioned problems. Unfortunately, currently available commercial systems are prohibitively expensive, often lack a flexible control system to fully satisfy the experimental needs of the users, and are difficult to implement at scale.
Alternative active systems, such as syringe pumps, have the potential to solve all the aforementioned problems. Open-source solutions based on syringe pump designs been developed over the years, targeting microfluid \citep{Lake2017,Booeshaghi2019,Park2024}, chemistry and analytical laboratories \citep{Cubberley2016,Garcia2018,Samokhin2020}, and fluid delivery applications \citep{Amarante2019}, among others. Commercial systems currently available are prohibitively expensive, often lack a flexible control system to fully satisfy the experimental needs of the users, and are difficult to implement at scale.

Here, we present and characterize an open-source syringe pump system (\cref{fig:PumpDrawing}) with scalable neuroscience experiments in mind. We provide detailed instructions and a parts-list that allow the system to be fully assembled using widely available off-the-shelf and custom 3D printed parts.
In addition to mechanical designs, we also developed a flexible control system that affords a large range of customizability over the system's function. This control is implemented in a custom-designed printed circuit board (PCB) that implements the Harp protocol.
Here, we present and characterize an open-source syringe pump system (\cref{fig:PumpDrawing}) with scalable neuroscience experiments in mind. It does not only allows the reproducible delivery of liquid volumes in the microliter range, but also implements the Harp protocol \url{https://github.com/harp-tech/protocol}, enabling precise timestamping and synchronization with other Harp devices.
We provide detailed instructions and a parts-list that allow the system to be fully assembled using widely available off-the-shelf and custom 3D printed parts.
In addition to mechanical designs, we also developed a flexible control system that affords a large range of customizability over the system's function. This control is implemented in a custom-designed printed circuit board (PCB) that implements the Harp protocol

Additionally, the provided designs allow users to control the pump in a variety of ways. From triggering pre-defined protocols with a single square pulse to fully specify the behavior of the pump using the Harp Protocol. The latter interface, affords communication with Bonsai \citep{Lopes2015}, which in turn integrates the device in an ever increasing ecosystem of software for experimental behavior control and acquisition.
Additionally, the provided designs allow users to control the pump in a variety of ways. From triggering pre-defined protocols with a single square pulse to fully specify the behavior of the pump using the Harp protocol. The latter interface, affords communication with Bonsai \citep{Lopes2015}, which in turn integrates the device in an ever increasing ecosystem of software for experimental behavior control and acquisition.

Similarly to other open-source systems \citep{Wijnen2014, Amarante2019}, we characterized the error associated with the delivery of large volumes. Additionally, since rodent experiments often rely on the delivery of microlitre range rewards we also designed a simple assay, leveraging computer vision, to characterize the performance of the pump in single-bolus events.
Similarly to other open-source systems \citep{Wijnen2014, Amarante2019}, we characterized the error associated with the delivery of large volumes. Additionally, since rodent experiments often rely on the delivery of microliter range rewards we also designed a simple assay, leveraging computer vision, to characterize the performance of the pump in single-bolus events.

To validate the usefulness of the system, we varied the amount of reward delivered and show that this manipulation can quickly and reversibly alter rat's choice behavior. Finally, we highlight the high compatibility of the described syringe pump with electrophysiology recordings, and demonstrate no detectable electric artifact was observed.


\begin{figure*}
\centering
\includegraphics[width=1.0\linewidth]{Figures/Artboard 1.pdf}
\includegraphics[width=1.0\linewidth]{Figures/Artboard 1_blind.pdf}
\caption{\textbf{Syringe pump system.}\\
(\textbf{a}) 3D model of the fully assembled syringe pump system. Controller PCB, syringe, switches, and stepper motor are highlighted. (\textbf{b}) Diagram of Controller PCB. The three main sections of the board are highlighted: Microcontroller, which implements the Harp protocol. Motor driver and power, which provide the low-level logic to drive the stepper motor, and the I/O breakout, that affords users with input and output lines which can be used to control and monitor the function of the system, respectively. See \hyperref[s:methods]{Methods} for further details}
\doublespacing
(\textbf{a}) 3D model of the fully assembled syringe pump system. Controller printed circuit board (PCB), syringe, switches, and stepper motor are highlighted. (\textbf{b}) Diagram of Controller PCB. The three main sections of the board are highlighted: microcontroller, which implements the Harp protocol; motor driver and power, which provide the low-level logic to drive the stepper motor; and the I/O breakout, that affords users with input and output lines which can be used to control and monitor the function of the system, respectively. See \hyperref[s:methods]{Materials and Methods} for further details}
\label{fig:PumpDrawing}
\end{figure*}
Loading