dvpdf - gal4 was provided by dr . j. h. park ; clk4.1m - gal4 was from dr .
hubert amrein ; pdf - gal80 and cry - gal80 are described by stoleru et al ; lexa - p2x2 and clk856-gal4 were from dr .
uas - vglut rnai 1 ( vdrc 104324 ) , uas - mglura rnai 1 ( vdrc 103736 ) , uas - mglura rnai 2 ( vdrc 1793 ) were from the vienna drosophila resource center ( vdrc ) .
the following lines were ordered from the bloomington stock center : pdfr ( r18h11)-gal4 ( 48832 ) , pdfr ( r18h11)-lexa ( 52535 ) , uas - cschrimson ( 55136 ) , uas - enphr3.0 ( 36350 ) , uas - denmark ( 33064 ) , uas - arclight ( 51056 ) , uas - gcamp6f ( 42747 ) , uas - syt - gfp ( 33064 ) , uas - vglut rnai 2 ( 40845 , 40927 ) , vglut - gal4 ( 60312 ) .
the adult flies were entrained in 12:12 light - dark ( ld ) cycles at 25c .
the flies carrying gal4 and uas - dtrpa1 were maintained at 21c to inhibit dtrpa1 activity .
locomotor activity of individual male flies ( aged 37 days ) was measured with trikinetics drosophila activity monitors ( waltham , ma ) or video recording system under 12:12 ld conditions .
the activity and sleep analysis was performed with a signal - processing toolbox implemented in matlab ( mathworks , natick , ma ) .
for dtrpa1-induced neuronal firing experiments ( fig . 3 and s9 ) , flies were entrained in ld for 34 days at 21c , transferred to 27c for two days , followed by 2 subsequent days at 21c . the evening activity index ( extended data fig .
9 ) was calculated by dividing the average activity from zt812 by the average activity from zt012 .
the sample size was chosen based on the pilot studies to ensure > 80% statistical power to detect significant difference between different groups .
we were not blind to the group allocation since the experimental design required specific genotypes for experimental and control groups .
normally distributed data were analyzed with 2-tailed , unpaired student s t - tests , one way analysis of variance ( anova ) followed by a tukey - kramer hsd test as the post hoc test or two - way analysis of variance ( anova ) with post - hoc bonferroni multiple comparisons .
data were presented as mean behavioral responses , and error bars represent the standard error of the mean ( sem ) .
differences between groups were considered significant if the probability of error was less than 0.05 ( p < 0.05 ) .
experiments were repeated at least 3 times and representative data was shown in figures . for mechanical stimulation , individual flies from different groups were loaded into 96-well plates and placed close to a small push - pull solenoid .
the tap frequency of the solenoid was directly driven by an arduino uno board ( smart projects , italy ) .
1 tap was used as a modest stimulus and 10 taps ( 1 hz ) was used as a strong stimulus .
arousal threshold was measured during the middle of the day ( zt6 ) and evening ( zt10 ) with different intensities .
the movement of flies before and after the stimulus was monitored by the web camera and the recording videos ( 1fps ) were processed by the mtrack2 plugin in fiji imagej software to convert the videos into binary images and to calculate the trajectory and moving area as well as the percentage of aroused flies .
all trans - retinal powder ( sigma ) was dissolved in alcohol to prepare a 100 mm stock solution for cschrimson experiments .
100 l of this stock solution was diluted in 25 ml of 5% sucrose and 1% agar medium to prepare 400 m of all trans - retinal ( atr ) food .
newly eclosed flies were transferred to atr food for at least 2 days prior to optogenetic experiments .
the behavioral setup for the optogenetics and video recording system is schematized in figure s1 .
briefly , flies were loaded into white 96-well microfluor 2 plates ( fisher ) containing 5% sucrose and 1% agar food with or without 400 m atr . back lighting for night vision was supplied by an 850 nm led board ( luxeon ) located under the plate .
two sets of high power leds ( 627 nm ) mounted on heat sinks ( 4 leds per heat sink ) were symmetrically placed above the plate to provide light stimulation .
the voltage and frequency of red light pulses were controlled by an arduino uno board ( smart projects , italy ) .
the flat surface and compact wells of the 96-well plate allow uniform illumination , which was difficult to achieve in trikinetics tubes .
we used 627 nm red light pulses at 10hz ( 0.08mw / mm ) to irradiate flies expressing the red - shifted channelrhodopsin cschrimson within the dn1s .
fly behavior was recorded by a web camera ( logistic c910 ) without an ir filter .
the ld cycle and temperature was controlled by the incubator , and the light intensity was maintained in a region that allowed entrainment of flies without activating cschrimson .
5 pixels per second ( 50% of the full body length ) was defined as a minimum movement threshold .
the activity and sleep analyses were performed with a signal - processing toolbox implemented in matlab ( mathworks ) as described above .
the design of the invention has been filed for patent . to monitor bioluminescence activity in living flies ,
white 96-well microfluor 2 plates ( fisher ) were loaded with 5% sucrose and 1% agar food containing 20 mm d - luciferin potassium salt ( goldbio ) .
individual male or female flies expressing calexa - luc were first anaesthetized with co2 and then transferred to the wells .
we used an adhesive transparent seal ( topseal - a plus , perkin elmer ) to cover the plate and poked 23 holes in the seal over each well for air exchange .
plates were loaded into the stacker of a topcount nxt luminescence counter ( perkin elmer ) .
4b ) , the incubator temperature was set to 21c for 3 days and then increased to 30c at zt 0 of the 4 day .
three different modes were used in our experiments : ( a ) to record calexa - luc activity only , 9 plates were placed in a stacker , and each plate was sequentially transferred to the topcount machine for luminescence reading .
every cycle took about 1 hour , and the recording was continued for several days .
6a ) , we replaced the stacker with a chamber of our own design ( fig .
627 nm leds mounted to a pair of heat sinks were symmetrically positioned in the chamber to ensure uniform illumination of the 96-well plate ( 0.08 mw / mm for cschrimson stimulation and 1mw / mm for enphr3.0 stimulation ) .
single plates stayed in the led chamber for 8 min and then automatically transferred to the topcount for luminescence reading for 2 min .
( c ) to assay fly movement in 96-well plates and calexa - luc activity at the same time , single plates were recorded using a web camera attached to the top of chamber ( fig .
, the plate sat in the video chamber for 58 min and then was automatically transferred to the topcount machine for a 2 min luminescence reading .
fly heads were removed and fixed in pbs with 4% paraformaldehyde and 0.008% triton x-100 for 4550 min at 4c .
the brains were blocked in 10% goat serum ( jackson immunoresearch , west grove , pa ) and subsequently incubated with primary antibodies at 4c overnight or longer . for vglut and gfp co - staining , a rabbit anti - dvglut ( 1:10000 ) and a mouse anti - gfp antibody ( invitrogen ; 1:1000 ) antibody were used as primary antibodies . for grasp staining , a mouse anti - gfp monoclonal antibody ( invitrogen ; 1:1000 ) and a rabbit anti - gfp antibody ( roche ; 1:200 ) were used . after washing with 0.5% pbst three times
, the brains were incubated with alexa fluor 633 conjugated anti - rabbit and alexa fluor 488 conjugated anti - mouse ( molecular probes , carlsbad , ca ) at 1:500 dilution .
the brains were washed three more times before being mounted in vectashield mounting medium ( vector laboratories , burlingame , ca ) and viewed sequentially in 1.1 m sections on a leica sp5 confocal microscope . to compare the fluorescence signals from different conditions ,
the laser intensity and other settings were set at the same level during each experiment .
dn1s and e cells were purified from clk4.1m - gal4 , uas - egfp flies ( dn1s ) and dv - pdf - gal4 , uas - egfp , pdf - rfp flies , ( e cells ; gfprfp cells ) , respectively .
flies were entrained for 3 days and then collected every 4 hours for a total of 6 time points .
gene expression was quantified using the end sequencing analysis toolkit ( esat ; publicly available at http://garberlab.umassmed.edu/software/esat/ ) .
adult male fly brains were dissected in ice - cold hemolymph - like saline ( ahl ) ( 108 mm nacl , 5 mm kcl , 2 mm cacl2 , 8.2 mm mgcl2 , 4 mm nahco3 , 1 mm nah2po4-h2o , 5 mm trehalose , 10 mm sucrose , 5 mm hepes ; ph 7.5 ) .
brain were then pinned to a layer of sylgard ( dow corning , midland , mi ) silicone under a small bath of ahl contained within a recording / perfusion chamber ( warner instruments , hamden , ct ) and bathed with room temperature ahl .
brains expressing gcamp6f and arclight were exposed to fluorescent light for approximately 30 s before imaging to allow for baseline fluorescence stabilization .
perfusion flow was established over the brain with a gravity - fed valvelink perfusion system ( automate scientific , berkeley , ca ) .
atp or glutamate was delivered by switching the perfusion flow from the main ahl line to another channel containing diluted compound after 30 s of baseline recording for the desired durations followed by a return to ahl flow .
for the mglura antagonist imaging experiments , 700 nm ly341495 ( tocris bioscience ) was used to block the glutamate - induced inhibition .
imaging was performed using an olympus bx51wi fluorescence microscope ( olympus , center valley , pa ) under an olympus x40 ( 0.80w , lumplanfl ) or x60 ( 0.90w , lumplanfi ) water - immersion objective , and all recordings were captured using a charge - coupled device camera ( hamamatsu orca c472 - 80 - 12ag ) . for gcamp6f and arclight imaging , the following filter sets were used ( chroma technology , bellows falls , vt ) : excitation , hq470/x40 ; dichroic , q495lp ; emission , hq525/50 m .
frames were captured at 2 hz with 4 binning for either 2 min or 4 min using manager acquisition software ( edelstein et al . , 2010 ) .
neutral density filters ( chroma technology ) were used for all experiments to reduce light intensity and to limit photobleaching . for recordings using gcamp6f and arclight ,
rois were analyzed using custom software developed in imagej ( schindelin et al . , 2012 and national institute of health , bethesda , md ) .
the fluorescence change was calculated by using the formula : f / f = ( fn  f0)/f0  100% , where fn is the fluorescence at time point n , and f0 is the fluorescence at time 0 .
to compare the fluorescence change between neurons in the same brain , fluorescence activities from different neurons were normalized to the highest fluorescence level during the recording time window .
dvpdf - gal4 was provided by dr . j. h. park ; clk4.1m - gal4 was from dr .
hubert amrein ; pdf - gal80 and cry - gal80 are described by stoleru et al ; lexa - p2x2 and clk856-gal4 were from dr .
uas - vglut rnai 1 ( vdrc 104324 ) , uas - mglura rnai 1 ( vdrc 103736 ) , uas - mglura rnai 2 ( vdrc 1793 ) were from the vienna drosophila resource center ( vdrc ) .
the following lines were ordered from the bloomington stock center : pdfr ( r18h11)-gal4 ( 48832 ) , pdfr ( r18h11)-lexa ( 52535 ) , uas - cschrimson ( 55136 ) , uas - enphr3.0 ( 36350 ) , uas - denmark ( 33064 ) , uas - arclight ( 51056 ) , uas - gcamp6f ( 42747 ) , uas - syt - gfp ( 33064 ) , uas - vglut rnai 2 ( 40845 , 40927 ) , vglut - gal4 ( 60312 ) .
the adult flies were entrained in 12:12 light - dark ( ld ) cycles at 25c .
the flies carrying gal4 and uas - dtrpa1 were maintained at 21c to inhibit dtrpa1 activity .
locomotor activity of individual male flies ( aged 37 days ) was measured with trikinetics drosophila activity monitors ( waltham , ma ) or video recording system under 12:12 ld conditions .
the activity and sleep analysis was performed with a signal - processing toolbox implemented in matlab ( mathworks , natick , ma ) .
group activity was also generated and analyzed with matlab . for dtrpa1-induced neuronal firing experiments ( fig . 3 and s9 )
, flies were entrained in ld for 34 days at 21c , transferred to 27c for two days , followed by 2 subsequent days at 21c . the evening activity index ( extended data fig .
9 ) was calculated by dividing the average activity from zt812 by the average activity from zt012 .
the sample size was chosen based on the pilot studies to ensure > 80% statistical power to detect significant difference between different groups .
we were not blind to the group allocation since the experimental design required specific genotypes for experimental and control groups .
normally distributed data were analyzed with 2-tailed , unpaired student s t - tests , one way analysis of variance ( anova ) followed by a tukey - kramer hsd test as the post hoc test or two - way analysis of variance ( anova ) with post - hoc bonferroni multiple comparisons .
data were presented as mean behavioral responses , and error bars represent the standard error of the mean ( sem ) .
differences between groups were considered significant if the probability of error was less than 0.05 ( p < 0.05 ) .
for mechanical stimulation , individual flies from different groups were loaded into 96-well plates and placed close to a small push - pull solenoid .
the tap frequency of the solenoid was directly driven by an arduino uno board ( smart projects , italy ) .
1 tap was used as a modest stimulus and 10 taps ( 1 hz ) was used as a strong stimulus .
arousal threshold was measured during the middle of the day ( zt6 ) and evening ( zt10 ) with different intensities .
the movement of flies before and after the stimulus was monitored by the web camera and the recording videos ( 1fps ) were processed by the mtrack2 plugin in fiji imagej software to convert the videos into binary images and to calculate the trajectory and moving area as well as the percentage of aroused flies .
all trans - retinal powder ( sigma ) was dissolved in alcohol to prepare a 100 mm stock solution for cschrimson experiments .
100 l of this stock solution was diluted in 25 ml of 5% sucrose and 1% agar medium to prepare 400 m of all trans - retinal ( atr ) food .
newly eclosed flies were transferred to atr food for at least 2 days prior to optogenetic experiments .
the behavioral setup for the optogenetics and video recording system is schematized in figure s1 .
briefly , flies were loaded into white 96-well microfluor 2 plates ( fisher ) containing 5% sucrose and 1% agar food with or without 400 m atr . back lighting for night vision
was supplied by an 850 nm led board ( luxeon ) located under the plate .
two sets of high power leds ( 627 nm ) mounted on heat sinks ( 4 leds per heat sink ) were symmetrically placed above the plate to provide light stimulation .
the voltage and frequency of red light pulses were controlled by an arduino uno board ( smart projects , italy ) .
the flat surface and compact wells of the 96-well plate allow uniform illumination , which was difficult to achieve in trikinetics tubes .
we used 627 nm red light pulses at 10hz ( 0.08mw / mm ) to irradiate flies expressing the red - shifted channelrhodopsin cschrimson within the dn1s .
fly behavior was recorded by a web camera ( logistic c910 ) without an ir filter .
the ld cycle and temperature was controlled by the incubator , and the light intensity was maintained in a region that allowed entrainment of flies without activating cschrimson .
5 pixels per second ( 50% of the full body length ) was defined as a minimum movement threshold .
the activity and sleep analyses were performed with a signal - processing toolbox implemented in matlab ( mathworks ) as described above .
white 96-well microfluor 2 plates ( fisher ) were loaded with 5% sucrose and 1% agar food containing 20 mm d - luciferin potassium salt ( goldbio ) .
individual male or female flies expressing calexa - luc were first anaesthetized with co2 and then transferred to the wells .
we used an adhesive transparent seal ( topseal - a plus , perkin elmer ) to cover the plate and poked 23 holes in the seal over each well for air exchange .
plates were loaded into the stacker of a topcount nxt luminescence counter ( perkin elmer ) .
4b ) , the incubator temperature was set to 21c for 3 days and then increased to 30c at zt 0 of the 4 day .
three different modes were used in our experiments : ( a ) to record calexa - luc activity only , 9 plates were placed in a stacker , and each plate was sequentially transferred to the topcount machine for luminescence reading .
every cycle took about 1 hour , and the recording was continued for several days .
6a ) , we replaced the stacker with a chamber of our own design ( fig .
627 nm leds mounted to a pair of heat sinks were symmetrically positioned in the chamber to ensure uniform illumination of the 96-well plate ( 0.08 mw / mm for cschrimson stimulation and 1mw / mm for enphr3.0 stimulation ) .
single plates stayed in the led chamber for 8 min and then automatically transferred to the topcount for luminescence reading for 2 min . ( c ) to assay fly movement in 96-well plates and calexa - luc activity at the same time , single plates were recorded using a web camera attached to the top of chamber ( fig .
, the plate sat in the video chamber for 58 min and then was automatically transferred to the topcount machine for a 2 min luminescence reading .
fly heads were removed and fixed in pbs with 4% paraformaldehyde and 0.008% triton x-100 for 4550 min at 4c .
the brains were blocked in 10% goat serum ( jackson immunoresearch , west grove , pa ) and subsequently incubated with primary antibodies at 4c overnight or longer . for vglut and gfp co - staining ,
a rabbit anti - dvglut ( 1:10000 ) and a mouse anti - gfp antibody ( invitrogen ; 1:1000 ) antibody were used as primary antibodies . for grasp staining ,
a mouse anti - gfp monoclonal antibody ( invitrogen ; 1:1000 ) and a rabbit anti - gfp antibody ( roche ; 1:200 ) were used . after washing with 0.5% pbst three times
, the brains were incubated with alexa fluor 633 conjugated anti - rabbit and alexa fluor 488 conjugated anti - mouse ( molecular probes , carlsbad , ca ) at 1:500 dilution .
the brains were washed three more times before being mounted in vectashield mounting medium ( vector laboratories , burlingame , ca ) and viewed sequentially in 1.1 m sections on a leica sp5 confocal microscope . to compare the fluorescence signals from different conditions ,
the laser intensity and other settings were set at the same level during each experiment .
dn1s and e cells were purified from clk4.1m - gal4 , uas - egfp flies ( dn1s ) and dv - pdf - gal4 , uas - egfp , pdf - rfp flies , ( e cells ; gfprfp cells ) , respectively .
flies were entrained for 3 days and then collected every 4 hours for a total of 6 time points .
gene expression was quantified using the end sequencing analysis toolkit ( esat ; publicly available at http://garberlab.umassmed.edu/software/esat/ ) .
adult male fly brains were dissected in ice - cold hemolymph - like saline ( ahl ) ( 108 mm nacl , 5 mm kcl , 2 mm cacl2 , 8.2 mm mgcl2 , 4 mm nahco3 , 1 mm nah2po4-h2o , 5 mm trehalose , 10 mm sucrose , 5 mm hepes ; ph 7.5 ) .
brain were then pinned to a layer of sylgard ( dow corning , midland , mi ) silicone under a small bath of ahl contained within a recording / perfusion chamber ( warner instruments , hamden , ct ) and bathed with room temperature ahl .
brains expressing gcamp6f and arclight were exposed to fluorescent light for approximately 30 s before imaging to allow for baseline fluorescence stabilization .
perfusion flow was established over the brain with a gravity - fed valvelink perfusion system ( automate scientific , berkeley , ca ) .
atp or glutamate was delivered by switching the perfusion flow from the main ahl line to another channel containing diluted compound after 30 s of baseline recording for the desired durations followed by a return to ahl flow . for the mglura antagonist imaging experiments ,
700 nm ly341495 ( tocris bioscience ) was used to block the glutamate - induced inhibition .
imaging was performed using an olympus bx51wi fluorescence microscope ( olympus , center valley , pa ) under an olympus x40 ( 0.80w , lumplanfl ) or x60 ( 0.90w , lumplanfi ) water - immersion objective , and all recordings were captured using a charge - coupled device camera ( hamamatsu orca c472 - 80 - 12ag ) . for gcamp6f and arclight imaging , the following filter sets were used ( chroma technology , bellows falls , vt ) : excitation , hq470/x40 ; dichroic , q495lp ; emission , hq525/50 m .
frames were captured at 2 hz with 4 binning for either 2 min or 4 min using manager acquisition software ( edelstein et al . , 2010 ) .
neutral density filters ( chroma technology ) were used for all experiments to reduce light intensity and to limit photobleaching . for recordings using gcamp6f and arclight ,
rois were analyzed using custom software developed in imagej ( schindelin et al . , 2012 and national institute of health , bethesda , md ) .
the fluorescence change was calculated by using the formula : f / f = ( fn  f0)/f0  100% , where fn is the fluorescence at time point n , and f0 is the fluorescence at time 0 .
the fluorescence was calibrated by subtracting the background fluorescence value . to compare the fluorescence change between neurons in the same brain ,
fluorescence activities from different neurons were normalized to the highest fluorescence level during the recording time window .
a , flies expressing cschrimson were placed in 96-well plates and video recorded with a camera without an infrared filter ( left panel ) .
an 850 nm infrared back light provides illumination for recording in both light and dark periods .
a set of 627 nm leds was carefully positioned and combined with a diffuser to ensure uniform irradiation for stimulation .
the voltage and pulse frequency were controlled by an arduino uno board as described in materials and methods .
representative data from a video recording of male and female activity ( right panel ) in ld are shown .
b , sleep data of two control genotypes in 96-well plate mode for several days .
confocal stack of images showing antibody staining for gfp ( left ) and rfp ( middle ) and the overlay ( right ) in the dorsal brain of r18h11-lexa / lexaop - mcd8::gfp;clk4.1m - gal4/uas - rcd2::rfp flies .
total sleep , maximum sleep bout duration and mean sleep bout duration of control groups ( r18h11-gal4/+ , uas - tnt/+ ) and the experimental group ( r18h11-gal4/uas - tnt ) have significant difference .
n=32 for each group . one - way anova detected significant genotype effects for ( a  b ) total sleep ( p<0.0001 ) , daytime sleep ( p<0.0001 ) , nighttime sleep ( p<0.0001 ) , ( d ) max bout duration ( p=0.00288 ) , max daytime bout duration ( p<0.0001 ) , max nighttime bout duration ( p=0.000388 ) , ( e ) mean bout duration ( p<0.0001 ) , mean daytime bout duration ( p<0.0001 ) , mean nighttime bout duration ( p<0.0001 ) .
asterisks denote significant differences from parental controls in tukey s post - hoc test ( p<0.01 ) .
locomotor behavior of control ( clk4.1m - gal4/uas - tet ) and experimental ( clk4.1m - gal4/uas - tnt ) male flies was monitored for 6 days in dd .
both control ( left panel ) and experimental ( right panel ) flies maintained strong rhythmicity .
note that the experimental group showed much less siesta ( dashed red arrow - right panel ) than the control group ( solid red arrow - left panel ) .
a , r18h11-gal4/uas - cschrimson ( left panel ) and r18h11-gal4 , cry - gal80/uas - cschrimson ( right panel ) brains were dissected and stained with anti - gfp ( green ) .
b , comparison of total sleep in the baseline day ( blue ) to total sleep during a 24 hour led stimulation day ( red ) for each genotype .
error bars represent sem .  * *  indicates p<0.001 by post - hoc bonferonni multiple comparisons .
two - way anova detected a significant led stimulation effect ( p=0.00227674 ) , a genotype effect ( p<0.0001 ) and interaction ( p<0.0001 ) .
a 96-well plate is loaded onto the device and a small push - pull solenoid is positioned on the side of the plate .
a web camera monitors fly movement in the wells , and the video is analyzed with fiji imagej software to track flies .
the left panel shows trajectories ( 5 min traces ) of experimental and control flies after a strong ( 10 tap ) stimulus at zt6 when the led is on .
the right panel shows the percentages of flies for the indicated genotypes that transitioned from immobility to an active state in response to the stimulus .
one - way anova detected significant genotype effects for arousal levels of r18h11>cschrimson led group ( p<0.0001 ) and r18h11>tnt group ( p<0.0001 ) , asterisks denote significant differences from parental controls in tukey s post - hoc test ( p<0.01 ) .
a , the luminescence traces from the calexa - luc sensor reflect neuronal activity after led - induced enphr3.0 inhibition from zt 2.5 to zt 9.5 .
the mean luc activity level ( arbitrary units ) from control and experimental groups is quantified on the right .
b , sleep from a baseline day and from a led stimulation day of r18h11>uas - enphr3.0 , uas - enphr3.0/+ and r18h11/+ flies .
clk4.1m - gal4>uas - synaptotagmin - gfp brains were dissected and stained with anti - gfp to identify the dn1 presynaptic regions ( green ; left panel ) . to identify the dendritic regions of e cells and m cells , dvpdf - gal4>uas - denmark brains were dissected and stained with anti - dsred ( red ; middle panel ) .
panel shows average maximum changes for lnvs and lnds . n=8 for control group ; n=7 for pdf cells and n=11 for lnds .  * *  indicates p<0.001 by unpaired two - tailed student s t - test and error bars correspond to sem .
b , normalized calcium traces in different circadian neuron subgroups imaged concurrently in same brain , panels show representative data of 5 brains .
d , 5 mm glutamate was applied to exposed dissected fly brains ( pdf - gal4>gcamp6f , c and pdf - gal4>arclight , d ) and induced a calcium decrease and hyperpolarized these core pacemakers ( f / f represents the evoked fluorescence change from baseline ) .
panels show representative data of 6 brains . reducing vglut activity within the dn1s decreases the dn1-activation effect ( left ) .
the locomotor activity patterns of uas - dtrpa1/+ ; clk4.1m - gal4/+ female flies ( upper panel ) and uas - dtrpa1/+ ; clk4.1m - gal4/uas - vglut rnai female flies ( lower panel ) at 21 c and 27 c are shown .
the color of the bars indicates either daytime ( white ) or nighttime ( black ) .
evening activity index was calculated as described in materials and methods for the indicated genotypes ( right ) .
white and black bars represent data from low and high temperature respectively .  * *  indicates p<0.001 by unpaired two - tailed student s t - test .
a , the peak decrease of gcamp6f in circadian cells after applying glutamate to control and mglura knockdown flies .
the genotypes are shown above the bars . n=6 for uas - dcr2 ; clk856-gal4 , uas - gcamp6f and n=89 for uas - dcr2 ; clk856-gal4 , uas - gcamp6f ; uas - mglura rnai groups .
b , comparison of total sleep , daytime siesta and nighttime sleep in different genotypes .
 *  indicates p<0.05 by one - way anova with tukey s post - hoc test .
c , a temporally constrained negative feedback core pacemaker - dn1 circuit regulates the fly activity / sleep pattern . early in the day
, m pacemaker neurons activate the dn1s via the pdf neuropeptide , and dn1s release dh31 to enhance morning arousal .
later in the day , glutamate release from dn1s inhibits m cells and e cells , promotes the siesta , decreases the evening activity peak and initiates nighttime sleep .
a cycling mrna that encodes inhibitory glutamate receptors in pacemaker cells may help direct this inhibition to the late day .
this feedback circadian circuit shapes the bimodal locomotor activity peak and sleep / wake cycles under normal conditions .
the higher daily neuronal activity in male dn1s compared to female dn1s promotes the sexually dimorphic activity / sleep pattern . dn1s
 summarylittle is known about the ability of drosophila circadian neurons to promote sleep . 
 we show here with optogenetic manipulations and video recording that a subset of dorsal clock neurons ( dn1s ) are potent sleep - promoting cells , releasing glutamate to directly inhibit key pacemaker neurons . 
 these pacemakers promote morning arousal by activating these same dn1s , implying that there is a late - day feedback circuit to drive siesta and nighttime sleep . 
 to address more plastic aspects of the sleep program , we used a novel calcium assay to monitor and compared the real - time dn1 activity of freely behaving males and females . 
 it revealed a dramatic sexual dimorphism , which parallels the well - known difference in daytime sleep . 
 dn1 activity is also enhanced by elevated temperature , consistent with its known effect on sleep . 
 these new approaches indicate that the dn1s have a major impact on the fly sleep - wake profile and integrate environmental information with the circadian molecular program . 
Method and Materials
Fly strains
Locomotor activity
Statistical analyses
Arousal thresholds assay
Feeding of retinal
Optogenetics and video recording system
None
Fly brain immunocytochemistry
mRNA profiling from E cells and DN1s
Functional fluorescence imaging
Extended Data
Supplementary Material