all animal procedures were approved by the massachusetts institute of technology ( mit ) committee on animal care .
adult male c57bl/6 mice , 812 weeks old , were purchased from taconic.upon arrival , the mice were housed in standard cages in the mit animal facility with ad libitum food and water in a controlled light - dark cycle environment , with standard monitoring by veterinary staff , for the period before the experiment . on the day of the experiment , they were anesthetized using ketamine / xylazine ( initially at 100 mg / kg and 10 mg / kg , and redosed at 3045 minute intervals with 1015% of the initial ketamine dose as needed , using toe pinch reflex as a standard metric of anesthesia depth )
. the scalp was shaved , and the mouse placed in a custom stereotax , with ophthalmic ointment applied to the eyes , and with betadine and 70% ethanol used to sterilize the surgical area .
three self - tapping screws ( f000ce094 , morris precision screws and parts ) were attached to the skull and a plastic headplate affixed using dental acrylic , as previously described .
once set ( ~20 minutes ) , the mice were removed from the stereotactic aparatus and placed in a custom - built low profile holder .
a dental drill was used to open up one or more craniotomies ( 12 mm diameter ) by thinning the skull until ~100 m thick , and then a small aperture was opened up with a 30 gauge needle tip .
cortical craniotomies occurred at stereotaxic coordinates : anteroposterior , 0 mm relative to bregma ; mediolateral , 01 mm left or right of the midline ; neuron hunting began at 400 m depth .
hippocampal craniotomies occurred at stereotaxic coordinates : anteroposterior , 2 mm relative to bregma ; mediolateral , 0.751.25 mm left or right of the midline ; neuron hunting began at 1100 m depth .
it is critical to ensure that bleeding is minimal and the craniotomy is clean , as this allows good visualization of the pipette , and minimizes the number of pipettes blocked after insertion into the brain .
the craniotomy was superfused with artificial cerebrospinal fluid ( acsf , consisting of 126 mm nacl , 3 mm kcl , 1.25 mm nah2po4 , 2 mm cacl2 , 2 mm mgso4 , 24 mm nahco3 , and 10 mm glucose ) , to keep the brain moist until the moment of pipette insertion .
2 ) . 16 mice were used to validate the robot for the primary test - set ( fig .
3c ) , we used 4 mice . for the development of the suction - based autopatching variant ( supplementary fig . 5 , 6 )
out of the 5 mice used for suction - based autopatching , 3 mice were used for the throughput estimations ( supplementary note 6 ) . for biocytin filling experiments ( fig .
4 ) and validation of heartbeat modulation as a method for confirming neuronal detection ( supplementary note 1 ) , we used 6 additional mice .
at the end of the patch clamp recording , mice were euthanized , while still fully anesthetized , via cervical dislocation , unless biocytin filling was attempted . in the case of biocytin
filling , the mice were isoflurane anesthetized , then transcardially perfused in 4% ice - cold through the left cardiac ventricle with ~40 ml of ice - cold 4% paraformaldehyde in phosphate buffered saline ( pbs ) ( see histology and imaging section for more details ) . borosilicate glass pipettes ( warner ) were pulled using a filament micropipette puller ( flaming - brown p97 model , sutter instruments ) , within a few hours before beginning the experiment , and stored in a closed petri dish to reduce dust contamination .
we pulled glass pipettes with resistances between 39 m. the intracellular pipette solution consisted of ( in mm ) : 125 potassium gluconate ( with more added empirically at the end , to bring osmolarity up to ~290 mosm ) , 0.1 cacl2 , 0.6 mgcl2 , 1 egta , 10 hepes , 4 mg atp , 0.4 na gtp , 8 nacl ( ph 7.23 , osmolarity 289 mosm ) , similar as to what has been used in the past . for experiments with biocytin ,
0.5% biocytin ( weight / volume ) was added to the solution before the final gluconate - based osmolarity adjustment , and osmolarity then adjusted ( to 292 mosm ) with potassium gluconate .
we performed manual patch clamping using previously described protocols , with some modifications and iterations as explained in the text , in order to prototype algorithm steps and to test them .
the standard system comprised a 3-axis linear actuator ( mc1000e , siskiyou inc ) for holding the patch headstage , and a patch amplifier ( multiclamp 700b , molecular devices ) that connects its patch headstage to a computer through a analog / digital interface board ( digidata 1440a , molecular devices ) . for programmable actuation of the pipette in the vertical direction
, we mounted a programmable linear motor ( pzc12 , newport ) onto the 3-axis linear actuator . for experiments where we attempted biocytin filling , we mounted the programmable linear motor at a 45 angle to the vertical axis , to reduce the amount of background staining in the coronal plane that we did histological sectioning along .
the headstage was in turn mounted on the programmable linear motor through a custom mounting plate .
the programmable linear motor was controlled using a motor controller ( pzc200 , newport inc ) that was connected to the computer through a serial com port .
an additional data acquisition ( daq ) board ( usb 6259 bnc , national instruments inc ) was connected to the computer via a usb port , and to the patch amplifier through bnc cables , for control of patch pipette voltage commands , and acquisition of pipette current data , during the execution of the autopatcher algorithm . during autopatcher operation ,
the usb 6259 board sent commands to the patch amplifier ; after acquisition of cell - attached or whole - cell - patched neurons , the patch amplifier would instead receive commands from the digidata ; we used a software - controlled ttl co - axial bnc relay ( cx230 , tohtsu ) for driving signal switching between the usb 6259 bnc and the digidata , so that only one would be empowered to command the patch amplifier at any time .
the patch amplifier streamed its data to the analog input ports of both the usb daq and the digidata throughout and after autopatching . for pneumatic control of pipette pressure
, we used a set of three solenoid valves ( 2-input , 1-output , lhda0533215h - a , lee company ) .
1 . the autopatcher program was coded in , and run by , labview 8.6 ( national instruments ) .
detailed instructions for robot construction are described in the supplementary software ( autopatcher user manual ) .
the usb6259 daq sampled the patch amplifier at 30 khz and with unity gain applied , and then filtered the signal using a moving average smoothening filter ( half width , 6 samples , with triangular envelope ) , and the amplitude of the current pulses was measured using the peak - to - peak measurement function of labview . during the entire procedure ,
a square wave of voltage was applied , 10 mv in amplitude , at 10 hz , to the pipette via the usb6259 daq analog output .
resistance values were then computed , by dividing applied voltage by the peak - to - peak current observed , for 5 consecutive voltage pulses , and then these 5 values were averaged .
once the autopatch process was complete , neurons were recorded using clampex software ( molecular devices ) .
signals were acquired at standard rates ( e.g. , 3050 khz ) , and low - pass filtered ( bessel filter , 10 khz cutoff ) .
all data was analyzed using clampfit software ( molecular devices ) and matlab ( mathworks ) . at the beginning of the experiment , we installed a pipette and filled it with pipette solution using a thin polyimide / fused silica needle ( microfil ) attached to a syringe filter ( 0.2 m ) attached to a syringe ( 1 ml ) .
we removed excess acsf to improve visualization of the brain surface in the pipette lowering stage , and then applied positive pressure ( 8001000 mbar ) , low positive pressure ( 2530 mbar ) , and suction pressure ( 15 to 20 mbar ) at the designated ports ( fig . 1 , supplementary fig . 1 ) and clamped the tubing to the input ports with butterfly clips
; the initial state of high positive pressure was present at this time ( with all valves electrically off ) .
we used the 3-axis linear actuator ( siskiyou ) to manually position the pipette tip over the craniotomy using a control joystick with the aid of a stereomicroscope ( nikon ) .
the pipette was lowered until it just touched the brain surface ( indicated by dimpling of surface ) and retracted back by 2030 micrometers .
the autopatcher software then denotes this position , just above the brain surface , as z = 0 for the purposes of executing the algorithm ( supplementary fig .
2 ) , acquiring the baseline value r(0 ) of the pipette resistance at this time ( the z - axis is the vertical axis perpendicular to the earth s surface , with greater values going downwards ) .
the pipette voltage offset was automatically nullified by the  pipette offset  function in the multiclamp commander ( molecular devices ) .
we ensured that electrode wire in the pipette was chlorided enough so as to minimize pipette current drift which can affect the detection of the small resistance measurements that occur during autopatcher operation .
see included supplementary software ( autopatcher user manual ) for detailed description of running the labview program for autopatching .
updated versions of the software and user manual will be made available online at http://autopatcher.org .
the autopatcher evaluates the pipette electrical resistance is evaluated outside the brain ( e.g. , between 39 m is typical ) for 3060 seconds to see if agcl pellets or other particulates internally clog the pipette ( indicated by increases in resistance ) .
if the pipette resistance remains constant and is of acceptable resistance , the autopatcher program is started .
the program records the resistance of the pipette outside the brain and automatically lowers the pipette to a pre - specified target region within the brain ( the stage labeled  regional pipette localization  in fig .
1a ) , followed by a second critical examination of the pipette resistance for quality control .
this check is followed by an iterative process of lowering the pipette by small increments , while looking for a pipette resistance change indicative of proximity to a neuron suitable for recording ( the  neuron hunting  stage ) . during this stage
, the robot looks for a specific sequence of resistance changes that indicates that a neuron is proximal , attempting to avoid false positives that would waste time and decrease cell yield . after detecting this signature , the robot halts movement , and begins to actuate suction and pipette voltage changes so as to form a high - quality seal connecting the pipette electrically to the outside of the cell membrane ( the  gigaseal formation  stage ) , thus resulting in a gigaseal cell - attached recording .
if whole - cell access is desired , the robot can then be used to perform controlled application of suction in combination with brief electrical pulses to break into the cell ( the  break - in  stage , supplementary fig .
3 ) . alternately , break - in can also be achieved using pulses of suction ( supplementary fig .
, the robot applies a voltage square wave to the pipette ( 10 hz , 10 mv alternating with 0 mv relative to pipette holding voltage ) , and the current is measured , in order to calculate the resistance of the pipette at a given depth or stage of the process . throughout the entire process of robot operation
, this pipette resistance is the chief indicator of pipette quality , cell presence , seal quality , and recording quality , and the algorithm attempts to make decisions  such as whether to advance to the next stage , or to restart a stage , or to halt the process  entirely on the temporal trajectory taken by the pipette resistance during the experiment .
the performance of the robot is enabled by two critical abilities of the robot : its ability to monitor the pipette resistance quantitatively over time , and its ability to execute actions in a temporally precise fashion upon the measured pipette resistance reaching quantitative milestones .
focusing on the data for the n = 47 neurons in the main validation test set : the neuron - hunting stage took on average 2.5  1.7 minutes ( n = 47 ) , with the time to find a target that later led to successful gigaseal not differing significantly from the time to find a target that does not lead to a gigaseal ( p = 0.8114 ; t - test ; n = 58 unsuccessful gigaseal formation trials ) , that is , failed trials did not take longer than successful ones .
the gigaseal formation took 2.6  1.0 minutes , including for the whole cell autopatched case the few seconds required for break - in ; failed attempts to form gigaseals were truncated at the end of the ramp down procedure and thus took ~85 seconds .
these durations are similar to those obtained by trained human investigators practicing published protocols . for experiments with biocytin filling of cells
, mice were perfused through the left cardiac ventricle with ~40 ml of ice - cold 4% paraformaldehyde in phosphate buffered saline ( pbs ) while anesthetized with isoflurane .
perfused brains were then removed from the skull then postfixed overnight in the same solution at 4 c .
the fixed brains were incubated in 30% sucrose solution for 2 days until cryoprotected ( i.e. , the brains sank ) .
the brains were flash frozen in isopentane cooled using dry ice at temperatures between 30 c to 40 c .
the flash frozen brains were mounted on mounting plates using oct as base , and covered with tissue embedding matrix to preserve tissue integrity , and 40 m thick slices were cut at 20 c using a cryostat ( leica ) .
the brain slices were mounted on charged glass slides ( e.g. , superfrost ) and incubated at room temperature for 4 hours in pbs containing 0.5% triton - x ( vol / vol ) and 2% goat serum ( vol / vol ) .
this was followed by 1214 hours of incubation at 4 c in pbs containing 0.5% triton - x ( vol / vol ) , 2% goat serum ( vol / vol ) and alexa 594 conjugated with streptavidin ( life technologies , diluted 1:200 ) .
after incubation , the slices were thoroughly washed in pbs containing 100 mm glycine and 0.5% triton - x ( vol / vol ) followed by washing in pbs with 100 mm glycine .
slices were then mounted in vectashield with dapi ( vector labs ) , covered using a coverslip , and sealed using nail polish .
image stacks were obtained using a confocal microscope ( zeiss ) with 20 objective lens .
maximum intensity projections of the image stacks were taken using imagej software . if needed to reconstruct full neuron morphology , multiple such maximum intensity projection images were auto - leveled , then montaged , using photoshop cs5 software .
all animal procedures were approved by the massachusetts institute of technology ( mit ) committee on animal care .
adult male c57bl/6 mice , 812 weeks old , were purchased from taconic.upon arrival , the mice were housed in standard cages in the mit animal facility with ad libitum food and water in a controlled light - dark cycle environment , with standard monitoring by veterinary staff , for the period before the experiment . on the day of the experiment , they were anesthetized using ketamine / xylazine ( initially at 100 mg / kg and 10 mg / kg , and redosed at 3045 minute intervals with 1015% of the initial ketamine dose as needed , using toe pinch reflex as a standard metric of anesthesia depth )
. the scalp was shaved , and the mouse placed in a custom stereotax , with ophthalmic ointment applied to the eyes , and with betadine and 70% ethanol used to sterilize the surgical area .
three self - tapping screws ( f000ce094 , morris precision screws and parts ) were attached to the skull and a plastic headplate affixed using dental acrylic , as previously described .
once set ( ~20 minutes ) , the mice were removed from the stereotactic aparatus and placed in a custom - built low profile holder .
a dental drill was used to open up one or more craniotomies ( 12 mm diameter ) by thinning the skull until ~100 m thick , and then a small aperture was opened up with a 30 gauge needle tip .
cortical craniotomies occurred at stereotaxic coordinates : anteroposterior , 0 mm relative to bregma ; mediolateral , 01 mm left or right of the midline ; neuron hunting began at 400 m depth .
hippocampal craniotomies occurred at stereotaxic coordinates : anteroposterior , 2 mm relative to bregma ; mediolateral , 0.751.25 mm left or right of the midline ; neuron hunting began at 1100 m depth .
it is critical to ensure that bleeding is minimal and the craniotomy is clean , as this allows good visualization of the pipette , and minimizes the number of pipettes blocked after insertion into the brain .
the craniotomy was superfused with artificial cerebrospinal fluid ( acsf , consisting of 126 mm nacl , 3 mm kcl , 1.25 mm nah2po4 , 2 mm cacl2 , 2 mm mgso4 , 24 mm nahco3 , and 10 mm glucose ) , to keep the brain moist until the moment of pipette insertion .
2 ) . 16 mice were used to validate the robot for the primary test - set ( fig .
3c ) , we used 4 mice . for the development of the suction - based autopatching variant ( supplementary fig . 5 , 6 )
out of the 5 mice used for suction - based autopatching , 3 mice were used for the throughput estimations ( supplementary note 6 ) . for biocytin filling experiments ( fig .
4 ) and validation of heartbeat modulation as a method for confirming neuronal detection ( supplementary note 1 ) , we used 6 additional mice .
at the end of the patch clamp recording , mice were euthanized , while still fully anesthetized , via cervical dislocation , unless biocytin filling was attempted . in the case of biocytin
filling , the mice were isoflurane anesthetized , then transcardially perfused in 4% ice - cold through the left cardiac ventricle with ~40 ml of ice - cold 4% paraformaldehyde in phosphate buffered saline ( pbs ) ( see histology and imaging section for more details ) .
borosilicate glass pipettes ( warner ) were pulled using a filament micropipette puller ( flaming - brown p97 model , sutter instruments ) , within a few hours before beginning the experiment , and stored in a closed petri dish to reduce dust contamination .
we pulled glass pipettes with resistances between 39 m. the intracellular pipette solution consisted of ( in mm ) : 125 potassium gluconate ( with more added empirically at the end , to bring osmolarity up to ~290 mosm ) , 0.1 cacl2 , 0.6 mgcl2 , 1 egta , 10 hepes , 4 mg atp , 0.4 na gtp , 8 nacl ( ph 7.23 , osmolarity 289 mosm ) , similar as to what has been used in the past . for experiments with biocytin ,
0.5% biocytin ( weight / volume ) was added to the solution before the final gluconate - based osmolarity adjustment , and osmolarity then adjusted ( to 292 mosm ) with potassium gluconate .
we performed manual patch clamping using previously described protocols , with some modifications and iterations as explained in the text , in order to prototype algorithm steps and to test them .
the standard system comprised a 3-axis linear actuator ( mc1000e , siskiyou inc ) for holding the patch headstage , and a patch amplifier ( multiclamp 700b , molecular devices ) that connects its patch headstage to a computer through a analog / digital interface board ( digidata 1440a , molecular devices ) . for programmable actuation of the pipette in the vertical direction
, we mounted a programmable linear motor ( pzc12 , newport ) onto the 3-axis linear actuator . for experiments
where we attempted biocytin filling , we mounted the programmable linear motor at a 45 angle to the vertical axis , to reduce the amount of background staining in the coronal plane that we did histological sectioning along .
the headstage was in turn mounted on the programmable linear motor through a custom mounting plate .
the programmable linear motor was controlled using a motor controller ( pzc200 , newport inc ) that was connected to the computer through a serial com port .
an additional data acquisition ( daq ) board ( usb 6259 bnc , national instruments inc ) was connected to the computer via a usb port , and to the patch amplifier through bnc cables , for control of patch pipette voltage commands , and acquisition of pipette current data , during the execution of the autopatcher algorithm . during autopatcher operation ,
the usb 6259 board sent commands to the patch amplifier ; after acquisition of cell - attached or whole - cell - patched neurons , the patch amplifier would instead receive commands from the digidata ; we used a software - controlled ttl co - axial bnc relay ( cx230 , tohtsu ) for driving signal switching between the usb 6259 bnc and the digidata , so that only one would be empowered to command the patch amplifier at any time .
the patch amplifier streamed its data to the analog input ports of both the usb daq and the digidata throughout and after autopatching . for pneumatic control of pipette pressure
, we used a set of three solenoid valves ( 2-input , 1-output , lhda0533215h - a , lee company ) .
1 . the autopatcher program was coded in , and run by , labview 8.6 ( national instruments ) .
detailed instructions for robot construction are described in the supplementary software ( autopatcher user manual ) .
the usb6259 daq sampled the patch amplifier at 30 khz and with unity gain applied , and then filtered the signal using a moving average smoothening filter ( half width , 6 samples , with triangular envelope ) , and the amplitude of the current pulses was measured using the peak - to - peak measurement function of labview . during the entire procedure ,
a square wave of voltage was applied , 10 mv in amplitude , at 10 hz , to the pipette via the usb6259 daq analog output .
resistance values were then computed , by dividing applied voltage by the peak - to - peak current observed , for 5 consecutive voltage pulses , and then these 5 values were averaged .
once the autopatch process was complete , neurons were recorded using clampex software ( molecular devices ) .
signals were acquired at standard rates ( e.g. , 3050 khz ) , and low - pass filtered ( bessel filter , 10 khz cutoff ) .
all data was analyzed using clampfit software ( molecular devices ) and matlab ( mathworks ) .
at the beginning of the experiment , we installed a pipette and filled it with pipette solution using a thin polyimide / fused silica needle ( microfil ) attached to a syringe filter ( 0.2 m ) attached to a syringe ( 1 ml ) .
we removed excess acsf to improve visualization of the brain surface in the pipette lowering stage , and then applied positive pressure ( 8001000 mbar ) , low positive pressure ( 2530 mbar ) , and suction pressure ( 15 to 20 mbar ) at the designated ports ( fig . 1 , supplementary fig . 1 ) and clamped the tubing to the input ports with butterfly clips ; the initial state of high positive pressure was present at this time ( with all valves electrically off ) .
we used the 3-axis linear actuator ( siskiyou ) to manually position the pipette tip over the craniotomy using a control joystick with the aid of a stereomicroscope ( nikon ) .
the pipette was lowered until it just touched the brain surface ( indicated by dimpling of surface ) and retracted back by 2030 micrometers .
the autopatcher software then denotes this position , just above the brain surface , as z = 0 for the purposes of executing the algorithm ( supplementary fig .
2 ) , acquiring the baseline value r(0 ) of the pipette resistance at this time ( the z - axis is the vertical axis perpendicular to the earth s surface , with greater values going downwards ) .
the pipette voltage offset was automatically nullified by the  pipette offset  function in the multiclamp commander ( molecular devices ) .
we ensured that electrode wire in the pipette was chlorided enough so as to minimize pipette current drift which can affect the detection of the small resistance measurements that occur during autopatcher operation .
see included supplementary software ( autopatcher user manual ) for detailed description of running the labview program for autopatching .
updated versions of the software and user manual will be made available online at http://autopatcher.org .
the autopatcher evaluates the pipette electrical resistance is evaluated outside the brain ( e.g. , between 39 m is typical ) for 3060 seconds to see if agcl pellets or other particulates internally clog the pipette ( indicated by increases in resistance ) .
if the pipette resistance remains constant and is of acceptable resistance , the autopatcher program is started .
the program records the resistance of the pipette outside the brain and automatically lowers the pipette to a pre - specified target region within the brain ( the stage labeled  regional pipette localization  in fig .
1a ) , followed by a second critical examination of the pipette resistance for quality control .
this check is followed by an iterative process of lowering the pipette by small increments , while looking for a pipette resistance change indicative of proximity to a neuron suitable for recording ( the  neuron hunting  stage ) . during this stage
, the robot looks for a specific sequence of resistance changes that indicates that a neuron is proximal , attempting to avoid false positives that would waste time and decrease cell yield . after detecting this signature , the robot halts movement , and begins to actuate suction and pipette voltage changes so as to form a high - quality seal connecting the pipette electrically to the outside of the cell membrane ( the  gigaseal formation  stage ) , thus resulting in a gigaseal cell - attached recording .
if whole - cell access is desired , the robot can then be used to perform controlled application of suction in combination with brief electrical pulses to break into the cell ( the  break - in  stage , supplementary fig .
alternately , break - in can also be achieved using pulses of suction ( supplementary fig .
, the robot applies a voltage square wave to the pipette ( 10 hz , 10 mv alternating with 0 mv relative to pipette holding voltage ) , and the current is measured , in order to calculate the resistance of the pipette at a given depth or stage of the process . throughout the entire process of robot operation
, this pipette resistance is the chief indicator of pipette quality , cell presence , seal quality , and recording quality , and the algorithm attempts to make decisions  such as whether to advance to the next stage , or to restart a stage , or to halt the process  entirely on the temporal trajectory taken by the pipette resistance during the experiment .
the performance of the robot is enabled by two critical abilities of the robot : its ability to monitor the pipette resistance quantitatively over time , and its ability to execute actions in a temporally precise fashion upon the measured pipette resistance reaching quantitative milestones .
focusing on the data for the n = 47 neurons in the main validation test set : the neuron - hunting stage took on average 2.5  1.7 minutes ( n = 47 ) , with the time to find a target that later led to successful gigaseal not differing significantly from the time to find a target that does not lead to a gigaseal ( p = 0.8114 ; t - test ; n = 58 unsuccessful gigaseal formation trials ) , that is , failed trials did not take longer than successful ones .
the gigaseal formation took 2.6  1.0 minutes , including for the whole cell autopatched case the few seconds required for break - in ; failed attempts to form gigaseals were truncated at the end of the ramp down procedure and thus took ~85 seconds .
these durations are similar to those obtained by trained human investigators practicing published protocols . for experiments with biocytin filling of cells
, mice were perfused through the left cardiac ventricle with ~40 ml of ice - cold 4% paraformaldehyde in phosphate buffered saline ( pbs ) while anesthetized with isoflurane .
perfused brains were then removed from the skull then postfixed overnight in the same solution at 4 c .
the fixed brains were incubated in 30% sucrose solution for 2 days until cryoprotected ( i.e. , the brains sank ) .
the brains were flash frozen in isopentane cooled using dry ice at temperatures between 30 c to 40 c .
the flash frozen brains were mounted on mounting plates using oct as base , and covered with tissue embedding matrix to preserve tissue integrity , and 40 m thick slices were cut at 20 c using a cryostat ( leica ) .
the brain slices were mounted on charged glass slides ( e.g. , superfrost ) and incubated at room temperature for 4 hours in pbs containing 0.5% triton - x ( vol / vol ) and 2% goat serum ( vol / vol ) .
this was followed by 1214 hours of incubation at 4 c in pbs containing 0.5% triton - x ( vol / vol ) , 2% goat serum ( vol / vol ) and alexa 594 conjugated with streptavidin ( life technologies , diluted 1:200 ) .
after incubation , the slices were thoroughly washed in pbs containing 100 mm glycine and 0.5% triton - x ( vol / vol ) followed by washing in pbs with 100 mm glycine .
slices were then mounted in vectashield with dapi ( vector labs ) , covered using a coverslip , and sealed using nail polish .
image stacks were obtained using a confocal microscope ( zeiss ) with 20 objective lens .
maximum intensity projections of the image stacks were taken using imagej software . if needed to reconstruct full neuron morphology , multiple such maximum intensity projection images were auto - leveled , then montaged , using photoshop cs5 software .
for experiments with biocytin filling of cells , mice were perfused through the left cardiac ventricle with ~40 ml of ice - cold 4% paraformaldehyde in phosphate buffered saline ( pbs ) while anesthetized with isoflurane .
perfused brains were then removed from the skull then postfixed overnight in the same solution at 4 c .
the fixed brains were incubated in 30% sucrose solution for 2 days until cryoprotected ( i.e. , the brains sank ) .
the brains were flash frozen in isopentane cooled using dry ice at temperatures between 30 c to 40 c .
the flash frozen brains were mounted on mounting plates using oct as base , and covered with tissue embedding matrix to preserve tissue integrity , and 40 m thick slices were cut at 20 c using a cryostat ( leica ) .
the brain slices were mounted on charged glass slides ( e.g. , superfrost ) and incubated at room temperature for 4 hours in pbs containing 0.5% triton - x ( vol / vol ) and 2% goat serum ( vol / vol ) .
this was followed by 1214 hours of incubation at 4 c in pbs containing 0.5% triton - x ( vol / vol ) , 2% goat serum ( vol / vol ) and alexa 594 conjugated with streptavidin ( life technologies , diluted 1:200 ) .
after incubation , the slices were thoroughly washed in pbs containing 100 mm glycine and 0.5% triton - x ( vol / vol ) followed by washing in pbs with 100 mm glycine .
slices were then mounted in vectashield with dapi ( vector labs ) , covered using a coverslip , and sealed using nail polish .
image stacks were obtained using a confocal microscope ( zeiss ) with 20 objective lens .
maximum intensity projections of the image stacks were taken using imagej software . if needed to reconstruct full neuron morphology , multiple such maximum intensity projection images were auto - leveled , then montaged , using photoshop cs5 software .
 whole - cell patch clamp electrophysiology of neurons is a gold standard technique for high - fidelity analysis of the biophysical mechanisms of neural computation and pathology but it requires great skill to perform . 
 we have developed a robot that automatically performs patch clamping in vivo , algorithmically detecting cells by analyzing the temporal sequence of electrode impedance changes . 
 we demonstrate good yield , throughput , and quality of automated intracellular recording in mouse cortex and hippocampus . 
Online Methods
Surgical procedures
Electrophysiology
Robot construction
Robot Operation
Details of Autopatcher Program Execution
Histology and Imaging
Supplementary Material