scieee Science in your language
[en] (orig)

Automated macro approach to quantify synapse density in 2D confocal images from fixed immunolabeled neural tissue sections

Author: Rebollo, Elena
Publisher: Zenodo
DOI: 10.5281/zenodo.17645549
Source: https://zenodo.org/records/17645549/files/Rebollo_SynapseDensityQuantification_2019_preprint.pdf
Running i le
Synapse densi y quan i ica ion using Fiji
Co esponding au ho
Elena Rebollo
Molecula Imaging Pla o m (MIP), Molecula Biology Ins i u e o Ba celona IBMB-CSIC, Spain
Baldi i Reixac 15-20, 08028 Ba celona, Spain.
e [email protected]
Au oma ed mac o app oach o quan i y synapse densi y in 2D con ocal images om
ixed immunolabeled neu al issue sec ions
E. Rebollo1,2*, J. Boix-Fab és1,2, M.L. A bones1
1 Molecula Biology Ins i u e o Ba celona (IBMB-CSIC), Spain.
2 Molecula Imaging Pla o m IBMB-PCB, Ba celona, Spain.
*Co esponding au ho : e [email protected]
Summa y
This chap e desc ibes an Image J/Fiji au oma ed mac o app oach o es ima e synapse
densi ies in 2D luo escence con ocal mic oscopy images. The main s ep-by-s ep imaging
wo k low is explained, including example mac o language sc ip s ha pe o m all s eps
au oma ically o mul iple images. Such ool p o ides a s aigh o wa d me hod o
explo a o y synapse sc eenings whe e hund eds- o- housands o images need o be
analyzed in o de o ende signi ican s a is ical in o ma ion. The me hod can be adap ed
o any pa icula se o images whe e ixed b ain slices ha e been immunolabeled agains
alida ed p esynap ic and pos synap ic ma ke s.
!
Key Wo ds
Synapse densi y, ImageJ Mac o language, Punc a segmen a ion, Nuclei segmen a ion,
Ch oma ic shi co ec ion.
1. In oduc ion
Synapses a e he poin s o communica ion be ween neu ons whe eby elec ical o
chemical signals a e ansmi ed om one neu on o ano he . Ana omically, hey a e
composed o a p esynap ic and a pos synap ic e minal, espec i ely loca ed in di e en
neu ons and sepa a ed by a gap called synap ic cle , whose wid h anges be ween 15 and
200 nm. The synap ic esicles unde go calcium-dependen usion wi h he p esynap ic
memb ane, hus eleasing hei con en s o he synap ic cle , whe e hey in e ac wi h
ecep o s loca ed a he pos synap ic memb ane. These ecep o s a e held in place by a
as p o ein sca old, which con ains almos 1500 p o eins ( e iewed by Ha is and
Weinbe g [1]).
The e is an inc easing body o e idence sugges ing ha al e ed b ain ne wo k ac i i y
unde lays many o he mos common neu ological diseases [2,3]. To a la ge deg ee, hese
ad ances ha e been made possible hanks o he de elopmen o new image analysis
me hodologies ha acili a e he quan i ica ion o synapse mo phology, numbe and
dis ibu ion in neu al cells and issues isualized unde he ligh mic oscope [4-7]. Some o
he main a ailable quan i ica ion echniques ocus on di e en aspec s o b ain
connec i i y, such as he dis ibu ion o indi idual synap ic p o eins on o a cell o in e es ,
he assessmen o cell- o-cell con ac s, and he ela ionship be ween di e en synap ic
p o eins ( e iewed in [8]). The i s wo a e usually con ined o a small subse o cells,
gene ally s ained by a cell ill ma ke and a single synapse ma ke . The las , howe e ,
ackles he spa ial p oximi y be ween a p esynap ic and a pos synap ic ma ke , as a way
o iden i ying bona ide synap ic si es.
Fluo escence con ocal mic oscopy emains he wo kho se echnology o ixed issue
imaging up o 100 µm and, o he o eseeable u u e, will emain one o he dominan
ools o s udying synapses and hei associa ed p o eins in he cen al ne ous sys em. On
he one hand, many an ibodies agains di e en p esynap ic and pos synap ic componen s
a e a ailable, which ha e been ex ensi ely alida ed o loca e synapsis [9]. On he o he
hand, mode n con ocal mic oscopes a e nowadays eadily a ailable in mos labo a o ies
and many di e en cus omized ou ines can be easily es ablished o pe o m
mul idimensional da a acquisi ions. A he ligh mic oscope, immunolabeled pos synap ic
e minals gene ally appea as well-de ined punc a, whe eas p esynap ic esicles deli e a
mo e i egula ly shaped pa e n (see Fig. 1). Add essing hei spa ial associa ion unde he
con ocal mic oscope o en elies, due o he di ac ion-limi ed esolu ion, on in e ing
me hodologies such as colocaliza ion [8,10]. Howe e , co ela ion coe icien s be ween
p esynap ic and pos synap ic ma ke s end o be low due o di e en easons: i)
P esynap ic ma ke s mos ly label all synapse esicles; ii) imma u e pos synap ic punc a
may no ye o m synapses [11], and iii) many pos synap ic ma ke s only label a subse o
pos synap ic si es. A mo e di ec app oach consis s in es ima ing he deg ee o apposi ion
be ween he wo ma ke s by de ining egions o in e es (ROIs) a ound he pos synap ic
punc a; he in ensi y o he p esynap ic ma ke can hen be measu ed wi hin hese ROIs in
o de o selec hose o e an in ensi y h eshold ha quali y as synapses. On his line,
masking punc a in 3D has p obed a highly sensi i e echnique [5].
This chap e desc ibes an open sou ce au oma ed p ocedu e, de eloped as a Fiji [12]
mac o language sc ip , o es ima e synapse densi ies in 2D luo escence con ocal
mic oscopy images om ixed b ain slices immunos ained agains alida ed p esynap ic
and pos synap ic ma ke s. Al hough such app oach does no ende accu a e in o ma ion
on synapse dis ibu ion o mo phology, i s s aigh o wa dness makes i sui able o
add ess al e ed connec i i y in explo a o y and high con en s udies whe e, o ins ance,
di e en gene ic backg ounds o d ug ea men s a e compa ed. I is known ha sub le
changes in he s uc u e o neu onal ci cui s may pass unpe cei ed and ne e heless ha e
se iously de imen al e ec s [13]. De ec ing such sligh di e ences by es ima ing synapse
densi ies equi es sys ema ic andom sampling o b ain egions in ol ing a high numbe
o images in o de o ob ain obus compa isons ha yield enough s a is ical in o ma ion.
An au oma ed image analysis p ocedu e is he e o e equi ed o ex ac synapse densi ies
om hund eds o housands o images.
The image p ocessing wo k low (Fig. 2) includes wo main segmen a ion s eps. On he
i s one, he nuclea s aining is used o e ie e he nuclea bounda ies (Fig. 2B). Since
andom sampling o issue sec ions will mos likely gene a e images ha ing di e en
numbe o nuclei, his s ep is necessa y o co ec he ac ual a ea alue ha will be used o
no malize he numbe o synapses pe image (Fig. 2C). The second main segmen a ion
s ep is ocused on pos synap ic spo -like signal. Spo de ec ion is a undamen al p ocedu e
o biologis s in many imaging applica ions. One o he bes poin de ec ion me hods is he
Laplacian o Gaussian (LoG) algo i hm [14], which is used he e o enhance he signal o he
pos synap ic punc a. Once de ec ed, u he ope a ions be ween he so ob ained bina y
masks a e used o elimina e unspeci ic nuclea signal pa icles (Fig. 2E). A e
segmen a ion, synapse de ec ion is pe o med by a double disc imina ion es . Fi s , low
quali y punc a a e disca ded based on he in ensi y densi y o he pa icles de ec ed. This
s ep helps elimina e ou o ocus punc a as well as weak o - a ge pa icles. Second, he
emaining punc a a e es ed o he p esence o he p esynap ic label. These wo s eps a e
pe o med using global h esholds, so ha he same c i e ia o synapsis disc imina ion is
applied o all he images and condi ions compa ed.
This chap e is de eloped using as example inhibi o y GABAe gic synapses [3,11,15],
iden i ied by he pos synap ic sca old p o ein Gephy in and he p esynap ic esicula
GABA anspo e VGAT. The p o ocol a ionale can ne e heless be ex ended o
p ospec i e s udies o exci a o y glu ama e gic synapses [1,16]. Sample images a e gi en
o bo h synapse ypes, oge he wi h hei co esponding mac os.
2. Ma e ials
2.1 Images
1. 2D con ocal images o mice b ain slices immunolabeled agains alida ed p esynap ic
and pos synap ic componen s and con aining DNA s aining. 4 sample images a e
p o ided wi h he chap e o es he p o ocol (Supp. Ma e ial and Gi Hub public
eposi o y [17]). The i s wo (“synapses_inh_01.lsm” and “synapses_inh_02.lsm”)
show GABAe gic synapses as shown by immunos aining using an ibodies (Abs)
agains he pos synap ic sca old p o ein Gephy in and he p esynap ic esicle
componen VGAT. The o he wo (“synapses_exc_01.lsm” and “synapses-exc_02.lsm”)
con ain glu ama e gic synapses by immunos aining using p ima y Abs agains he
pos synap ic sca olding p o ein Homme and he p esynap ic esicula glu ama e
anspo e VGLUT. Alexa Fluo -488 and Alexa Fluo -568 we e espec i ely used as
seconda y Abs. The DNA was s ained using Dapi. See No es 1 and 2 o sample
p epa a ion and acquisi ion se up ips.
2. 2D con ocal image o sub-di ac ion luo escen mic osphe es labelled wi h
luo opho es ha abso b/emi in anges simila o hose o he seconda y Abs used in
he biological samples and acqui ed in he same condi ions (see No e 3). A sample
image (“Beads. i ”) is p o ided as supplemen al ma e ial ha co esponds o he same

example expe imen .
2.2. So wa e and mac os
1. ImageJ is an open sou ce image p ocessing and analysis pla o m [18] o iginally
de eloped a he Na ional Ins i u es o Heal h (Be hesda, Ma yland, USA). In his
chap e we use he Fiji Li e-line 22 h Decembe 2015 dis ibu ion [12]. This e sion can be
downloaded a [19] and equi es Ja a 6. The desc ip ion o he ImageJ buil -in mac o
unc ions used can be ound a [20].
2. Mac os (see No e 4) de eloped as indica ed in his me hods p o ocol. Two mac os a e
p o ided as supplemen al ma e ial: one o calcula e he ch oma ic shi
(“Ch oma ic_Shi _Calcula o .ijm”) and ano he ha es ima es he densi y o synapses
in a se o n images (“Synapse_Coun e .ijm”). Bo h hese mac os a e a ailable a [17].
3. Me hods
This me hod i s desc ibes how o calcula e he xy ch oma ic shi in a con ol image, o be
used in he co ec ion o he biological images i necessa y. Second, he main s ep-by-s ep
manual wo k lows aimed o es ima e synapse densi y a e p o ided, oge he wi h he
a ionale o build a cus omized mac o ha can be applied o any pa icula se o images.
Finally, a sec ion is dedica ed on how o pe o m he analysis using he main mac o
p o ided in his chap e .
3.1. Calcula ing ch oma ic shi
In he la e al dimension, ch oma ic abe a ion p o okes ha di e en wa eleng hs a e
imaged a sligh ly shi ed la e al (xy) posi ions. This sec ion explains he manual s eps
necessa y o ob ain, om a 2D e e ence image o luo escen beads, he x and y o se
alues ha will la e on be used o co ec he biological images using ansla ion (see
Figu e 3). Al e na i ely, he p o ided mac o (“Ch oma ic_Shi _Calcula o .ijm”) can be
used o au oma ically calcula e he x and y o se alues on he con ol image.
1. Open sample image “Beads. i ” in Fiji by [File > Open...] o by d ag and d op o he ile
on he Fiji ba (see No e 5). To ollow he manual pipeline, go o s ep 2, o he wise jump
o s ep 15 o use he p o ided mac o.
2. Remo e image calib a ion a [Image < P ope ies…]; se pixel as uni o leng h and use
1 o bo h pixel wid h and heigh .!
3. Sepa a e channels a [Images > Colo > Spli Channels].
4. Rename each independen channel by [Image > Rename…]; we will he e name he
images “ ed” and “g een”, acco ding o hei espec i e channel colo s (see No e 6).
5. Selec one channel (e.g. “ ed”) and apply a LoG il e (see No e 7) a [Plugins > Fea u e
Ex ac ion > Fea u eJ > Fea u eJ Laplacian]; choose a smoo hing scale adius o 2.
6. Con e he image o 8-bi a [Image > Type > 8-bi ].
7. Th eshold he image a [Image > Adjus > Th eshold…]; choose an app op ia e
me hod ( he De aul me hod wo ks ine o he p o ided images, o he wise see No e 8);
unclick he op ion Da k backg ound and hi Apply.
8. On he bina y mask gene a ed, apply he Wa e shed algo i hm a [P ocess > Bina y
Wa e shed] o u he sepa a e con iguous objec s (see No e 9).
9. Selec cen oid as pa ame e o measu e a [Analyze > Se Measu emen s…].
10. De ec objec s a [Analyze > Analyze Pa icles…], using he op ions Exclude on edges
and Add o manage (see No e 10).
11. By clicking i s Deselec and hen Measu e a he ROI Manage menu, he esul s able
will open con aining he cen oid posi ion o all he de ec ed beads. This able can be
sa ed as a ex ile o be opened la e on a sp eadshee o u he analysis.
12. Repea s eps 5 o 11 on he o he channel (e.g. “g een”).
13. Once he cen oid posi ions o all he beads ha e been ob ained in bo h channels, he
indi idual x and y shi s can be compu ed by sub ac ing he alues om one channel
espec o he o he . Then, he X and Y a e age shi s will be used o ansla e one o
he channels, hus co ec ing he ch oma ic shi (see No e 11).
14. To es he ob ained x and y shi alues, selec he o iginal channel “ ed” and ansla e
i a [Image > T ans o m > T ansla e…]; in oduce he x and y o se alues in pixels
and choose bilinea in e pola ion (see No e 11). The ansla ed “ ed” channel and he
o iginal “g een” channel can now be me ged a [Image > Colo > Me ge Channels…].
The esul should be simila o ha shown in Fig 3.
15. To pe o m he p e ious s eps au oma ically, open he mac o
“Ch oma ic_Shi _Calcula o .ijm” by d agging i o he Fiji ba . Wi h he image opened
and selec ed, hi he mac o edi o Run bu on. The mac o will e ie e he a e age x
and y shi alues di ec ly in pixels. These alues will be used o co ec he biological
images in he nex sec ion.
3.2. C ea e mac o o quan i y synapse densi ies in a se o n images
The ollowing subsec ions explain he main image p ocessing s eps (Fig. 2) in he o m o
manual s ep-by-s ep imaging p o ocols; as a gene al ule, he mac o eco de can be kep
opened du ing manual execu ion, so ha p elimina y sc ip s a e c ea ed ( e ise No e 4).
Fu he de eloped sc ip s a e p o ided in each subsec ion, which sequen ially execu ed,
will shape he inal mac o. Too gene al o epe i i e pipelines ha e been edi ed as use -
de ined unc ions (see No e 12). Such sc ip s can be execu ed by copy/pas e in he Fiji
sc ip edi o .
3.2.1. Channel p epa a ion
A his ini ial s ep, he image needs o be manually open and each luo escen channel
mus be p epa ed as an independen image wi h a sho desc ip i e name ha can be
easily encoded in he mac o sc ip . The e ined mac o sc ip ha au oma es he s eps
below is p o ided in Fig. 4.
1. Open he sample image “Synapses_inh_01. i ” in Fiji by [File > Open...] o by d ag and
d op o he ile on he Fiji ba . The image includes calib a ion.
2. Sepa a e channels a [Images > Colo > Spli Channels].
3. Rename each independen channel by [Image > Rename…]; we will use he names
“ ed”, “g een” and “blue” acco ding o he channel´s colo s ( e ise No e 6).
3.2.2. Nuclei bounda ies segmen a ion
Nuclei segmen a ion, based on DNA s aining, is widely used o e ie e nuclea
bounda ies in images om ixed issues o cells. A p e-p ocessing s ep is necessa y in
o de o homogenize he backg ound and smoo h ou he shape o he objec s o be
de ined (see No e 13). Au oma ic in ensi y h esholding is hen applied o de ec he
nuclea objec s, which a e he ea e con e ed in o a bina y image also called mask.
I egula DNA s aining, due o a ia ions in expe imen al condi ions o cell cycle s age,
may hinde he delimi a ion o he nuclea bounda ies (see No e 14). In cases whe e a
second nuclea signal exis s, such as unspeci ic nuclea Gephy in in his example, a
segmen a ion s a egy can be used ha combines he p elimina y masks ob ained om
bo h channels, so ha a mo e comple e nuclea mask is gene a ed (see Fig. 5); small non-
nuclea pa icles can be u he il e ed by size o c ea e he ul ima e mask s ic ly
con aining he segmen ed nuclei. The codes o pe o m his s ep a e p o ided in Fig. 6.
1. Duplica e channel “blue” a [Image > Duplica e…] in o de o lea e he o iginal image
un ouched; ename i a he Duplica e menu window so as o iden i y i s pu pose, e.g.
“blueNucleiMask”.
2. Apply a Gaussian il e a [P ocess > Fil e s > Gaussian Blu …], using a adius o 2.
3. Th eshold he image a [Image > Adjus > Th eshold…]; he bes esul o his
example image is ob ained using he Li me hod [21]. Se he backg ound op ion so as
o p oduce a bina y image whe e objec s a e black and ha e an in ensi y alue o 255.
Hi Apply.
4. Fill holes a [P ocess > Bina y > Fill Holes…]. This s ep is used o comple e he nuclea
mask by emo ing g oups o backg ound le el pixels wi hin he selec ed objec s.
5. Pe o m s eps 1 o 4 in channel “g een”; we ha e enamed his image as
“g eenNucleiMask” (acco ding o he sc ip pipeline in Fig. 6); use a adius o 5 o he
Gaussian il e .
6. Combine he c ea ed bina y images “blueNucleiMask” and “g eenNucleiMask” a
[P ocess > Image Calcula o …]; choose bo h images as inpu 1 and 2 espec i ely in he
popup menu and selec OR as ope a o (see No e 15). By unclicking he op ion C ea e
washing p ima y Abs, sec ions we e incuba ed wi h he co esponding bio inyla ed
seconda y Abs, washed and incuba ed wi h Alexa-488 conjuga ed s ep a idin.
2. The images we e acqui ed using a con ocal LSM Zeiss780 mic oscope, equipped wi h
an apoch oma ic 63x oil (NA=1.4) objec i e (see no e 2). The h ee channels we e
sequen ially acqui ed using a pinhole ape u e o 0.8 AU. Pixel size was adjus ed o
50x50 nm. Images (sampling uni s) o 25.95 x 25.95 mic on (512x512 pixels) we e
andomly aken a he p ima y soma osenso y co ex, wi hin laye 4. Any
mul ichannel con ocal mic oscope is app op ia e as long as i con ains he lase lines
necessa y o exci e he di e en dyes and/o luo opho es used. Line sequen ial
acquisi ion o he di e en channels is ecommended o be able o speed up he image
cap u e while a oiding c oss- alk emission con amina ion; ne e heless, when
possible, simul aneous acquisi ion should be he as es choice. Pinhole ape u e can be
minimized in o de o educe he hickness o he sec ions, as long as he de ec ion
e iciency is no se e ely a ec ed; his should be easie in sys ems ha ing high
quan um e iciency and low noise de ec o s, such as hose based in he Gallium
A senide Phosphide echnology. Pixel size should be a leas adjus ed acco ding o he
Nyquis -Shannon c i e ia, as a unc ion o he objec i e nume ical ape u e (see [22]).
A sligh o e sampling is ne e heless ecommended in o de o imp o e he in ensi y
p o ile o indi idual spo -like signals.
3. Ch oma ic abe a ions a e wa eleng h-dependen a e ac s ha occu because he
e ac i e index o e e y op ical glass o mula ion a ies wi h wa eleng h. In o de o
minimize he ch oma ic abe a ion: i) Apoch oma ic objec i es a e p e e ed, ii)
co e slip hickness should be he one ecommended o he pa icula lens used,
unless he la e has he p ope hickness co ec ion colla , and iii) he e ac ion index
o he moun ing media should ma ch ha o he objec i e imme sion medium. The
samples used in his chap e we e moun ed using a mix o 97% 2,2′-Thiodie hanol
(TDE, Sigma-Ald ich) and 3 % H2O in o de o ma ch he e ac ion index (IR = 1.52)
o he objec i e imme sion oil [23]. In any case, since a sligh ch oma ic xy shi may be
una oidable, he use o beads is impe a i e in o de o pe o m he inal shi

co ec ion be o e colla ing he channels. Mic osphe es should be acqui ed unde he
exac same de ec ion windows and sampling condi ions as he biological samples o be
co ec ed. Any sub-di ac ion beads (100-200nm) ha ing labels simila o hose used
in he biological samples should be all igh . Finally, o a oid changes in he
o ien a ion o he ch oma ic abe a ion, he scanning a ea should be cen ed and ne e
o a ed, so ha he shi o he di e en images is iden ical.
4. ImageJ mac o language (IJM) is a sc ip ing language buil -in in o ImageJ, which allows
w i ing simple p og ams called mac os ha au oma e se ies o image p ocessing
ac ions. By opening he mac o eco de a [Plugins > Mac os > Reco d…], he
manually pe o med ac ions a e sequen ially eco ded in o an IJM p elimina y sc ip .
Hi ing he bu on c ea e will open he eco ded ins uc ions in o he sc ip edi o we e
addi ional edi ing can be made in o de o make he code usable. Fo mo e in o ma ion
abou mac os see [24].
5. ImageJ/Fiji can open many di e en ile o ma s along wi h hei impo an me ada a,
ia [File > Impo > Bio- o ma s] o di ec ly a he [File > Open] menu. The lis o
ImageJ suppo ed ile o ma s can be checked a [25]. O iginal o ma s will by de aul
con ain image calib a ion, i is impo an o ake his in o accoun when measu emen s
a e going o be pe o med, so ha he esul ing alues can be in e p e ed in ei he
pixels, mic ome e s o any o he uni . Image calib a ion can be checked a [Image >
P ope ies…]. In his chap e , o he ch oma ic shi calcula ion we p e e o emo e
image calib a ion i s , as he inal uni s o be used in image ansla ion will be in
pixels. !
6. Images can be iden i ied in he mac o sc ip s by hei names. In gene al, enaming
images will help sho ening he names and iden i ying he cu en image p ocessing
s ep, hus simpli ying he sc ip . The names used in he p o ided p o ocol a e
a bi a y. I o he names a e chosen, he co esponding code should be changed
acco dingly. !
7. The LoG il e is used o enhance spo -like signals. I highligh s egions o apid
in ensi y change, which a e he pixels whe e he Laplacian unc ion changes sign, also
called ze o c ossing poin s. By smoo hing he image i s wi h a Gaussian il e , he
numbe o ze o c ossing poin s will change acco ding o he in e se o he Gaussian
adius, being he op imal smoo hing scale adius ela ed o he adius o he spo s o be
enhanced. ImageJ con ains a LoG algo i hm loca ed wi hin he Fea u eJ plugin [26]. The
ope a o e ie es a new 32-bi image whe e he enhanced do s appea da k on a ligh
backg ound. By de aul , he e m “Laplacian” will be added o he image name in he
esul ing image window.
8. Th esholding is used o ex ac objec s in an image based on hei in ensi y, by se ing
one o wo (uppe and lowe ) cu -o alue(s) ha sepa a e speci ic pixel in ensi ies
om each o he . Mos algo i hms used o au oma ic h esholding a e de eloped o a
speci ic pu pose o ex ac ion p oblem. Thus, pe o mance depends on he image
con en and quali y, and he in ended use o he pa e n ex ac ed. ImageJ p o ides 16
di e en me hods o au oma ically compu e global h esholds, all o which can be
es ed a once using he Au o h eshold plugin a [Image > Adjus > Au o h eshold].
9. The Wa e shed algo i hm implemen ed in ImageJ/Fiji is a egion-based segmen a ion
app oach ha sepa a es di e en objec s ha ouch. I i s calcula es he peaks o local
maxima o all objec s, based on hei euclidian dis ance map. I hen dila es each peak
as a as possible, ei he un il he edge o he pa icle is eached, o he edge o ano he
g owing peak is ound. Fo mo e in o ma ion abou Wa e shed algo i hm
implemen a ions see [27].
10. The Analyze pa icles plugin coun s and measu es objec s in bina y o h esholded
images, based on an algo i hm ha inds he edges. Size and ci cula i y anges a e
gene ally used o selec he objec s o in e es ha will o m he bina y mask. Size
e e s o a ea, in squa ed mic on unless speci ied, and ci cula i y e e s o he
calcula ion 4π×[A ea]/[Pe ime e ] 2. The op ion Exclude on edges is used he disca d
incomple e objec s ha lie on he edge o he image. The op ion Add o manage will
load all selec ed egions in o he ROI Manage ool, whe e hey can be u he
analyzed.
!
11. The T ansla e unc ion a [Image > T ans o m > T ansla e…] mo es he image in x and
y by a se numbe o pixels. The inpu alues mus be pixels. I he x and y shi s we e
calcula ed on a calib a ed image, hey should be di ided by he pixel size, which can
be ob ained a [Image > P ope ies…]. In he p esen pipeline, he shi s a e di ec ly
calib a ed in pixels. Since he esul ing pixel shi s a e no in ege s, a esampling
me hod can be applied du ing ansla ion o e ine he co ec ion; his can be done by
selec ing an in e pola ion me hod, ei he bilinea o bicubic, a he ansla e dialog box.!
12. A used-de ined unc ion is a block o code ha pe o ms a gene al o epe i i e ask
always in he same way. I can be passed alues (de ined as a gumen s) and i can
e u n a alue by means o he e u n s a emen . Func ions can be ins alled o simply
w i en a he end o he mac o. They a e called om he sc ip by name(a gumen s
sepa a ed by coma);. Fo mo e in o ma ion abou unc ions isi [28].!
13. Une en image backg ounds can be success ully es o ed using he olling ball
algo i hm implemen ed in ImageJ, which de i es om he Rolling ball algo i hm
desc ibed in S anley S e nbe g's a icle [29], modi ied o use a pa aboloid o o a ion
ins ead o a ball. The Rolling ball adius is he adius o cu a u e o he pa aboloid and
should be a leas as la ge as he adius o he la ges objec in he image ha is no pa
o he backg ound. The ImageJ implemen a ion includes some addi ional code o a oid
sub ac ing objec co ne s ( his choice is ac i a ed by selec ing he Sliding pa aboloid
op ion a he Sub ac backg ound dialog box). Mo e in o ma ion can be ound a [30].
Applying il e s such as Gaussian o Median il e s may also help denoising, and
he e o e acili a e objec segmen a ion. Ca e need o be aken as o choose he il e
ha be e p ese es he objec p ope ies and de ails o be analyzed. Fo mo e ips on
image denoising using il e s see [31].
14. Mos likely each pa icula se o images will need a cus omized app oach o nuclei
segmen a ion. Depending on he quali y o he labeling, global h esholding me hods
may no wo k well enough. Adap i e h esholding may be a good al e na i e; his
me hod changes he h eshold dynamically o e he image by compu ing local
pa ame e s con ined o smalle egions, which a e mo e likely o ha e homogeneous
illumina ion. The Au o Local Th eshold plugin implemen ed in ImageJ and Fiji con ains
up o 9 di e en local h esholding me hods. The T y all op ion allows o explo ing
how he di e en algo i hms pe o m on a pa icula image. Fo mo e in o ma ion see
[32]. A second possibili y ( he one used in he p o ided pipeline) is o complemen he
nuclea mask using a second image whe e he nucleus is also s ained and
dis inguishable. No e ha , o each pa icula image da a se , he nuclea segmen a ion
s a egy will ha e o be adap ed and modi ied in he co esponding sc ip .
15. The Image Calcula o command pe o ms a i hme ic and logical ope a ions be ween
wo images selec ed om popup menus, by applying one o 12 possible ope a o s.
Among hese, he logical OR ope a o gene a es an image whe e ei he pixel con ained
in he sou ce images in included. By selec ing he op ion C ea e a new window, he
sou ce images a e main ained; o he wise he esul is o e w i en on he i s inpu
image.
16. Di ec bina y con e sion o he Laplacian il e ed 32-bi image is chosen he e. The esul
is iden ical o ha p oduced by 8-bi con e sion plus h esholding, using he De aul
me hod. Mo e se e e h esholding is no used a his s ep since he idea is o de ec as
many spo s as possible.
17. Using mean in ensi y as cu o alue helps dis ega d weak objec s in gene al bu may
also emo e biological meaning ul s uc u es. Fo ins ance, a iny bu e y b igh
pa icle may con ain less p o ein con en han ano he pa icle ha is bigge bu less
b igh . In eg a ed densi y is calcula ed as a ea o he ROI mul iplied by he mean
in ensi y o he ROI; using his pa ame e as cu o alue helps emo e hose de ec ed
oci whe e p o ein con en is lowe . The same a gumen a ion is used o disc imina e
hose punc a whose deg ee o apposi ion o he p esynap ic esicles lies below a
h eshold, based on he in ensi y densi y o he p esynap ic signal.
18. A e do enhancing and segmen a ion, many de ec ed ROIs will mos likely con ain
low signal in ensi y alues; a mix u e o low p o ein con en , ou o ocus signal o
unspeci ic backg ound mos likely accoun o hese low in ensi ies. As a esul , he
dis ibu ion o In ensi y densi y alues o he whole ROI popula ion is skewed o he
igh (Fig 11 b, c). The pa ame e ha be e e lec s he cen al endency is skewed
dis ibu ions in he median, which is used he e as a i s guess disc imina ion
h eshold. Such s a is ical app oxima ion p o ides good esul s o la ge-scale
compa a i e s udies. Howe e , his s a egy may yield biased esul s when he 50%
disca ded popula ion con ains quali a i ely di e en pa icles. The possibili y o adjus
he pe cen age o “good quali y” ROIs has been implemen ed in he p o ided
h eshold selec ion unc ion; a cu o alue om 1 o 5 modula es he pe cen age o
selec ed pa icles, a in e als o 10%, om 50% o 90%. This acili a es he h eshold
de e mina ion o be used in he inal compa a i e s udy.
19. Nuclei segmen a ion in he op ion using only he “blue” channel is based on he local
h esholding s a egy explained in No e 14. Any o he s a egy can ne e heless be
easily implemen ed in he p o ided code o adap i o any pa icula se o images.
Acknowledgemen s
We a e g a e ul o Juan A anz o immuno luo escence expe imen s and Manel Bosch o
use ul ad ice on mac o p og amming. MLA p o ided samples and biological inpu . JBF
con ibu ed he ch oma ic shi calcula ion mac o. ER pe o med he imaging, designed
and p og ammed he mac o analysis pipeline and w o e he pape . Images we e acqui ed
a he Molecula Imaging Pla o m IBMB (CSIC) wi h he suppo om he Spanish
Minis y o Economy and Compe i i eness and he Eu opean Regional de elopmen Fund
CSIC13-4E-2065.
Re e ences
1. Ha is KM, Weinbe g RJ (2012) Ul as uc u e o synapses in he mammalian b ain.
Cold Sp ing Ha b Pe spec Biol 4 (5). doi:10.1101/cshpe spec .a005587
2. Rakic P, Bou geois JP, Goldman-Rakic PS (1994) Synap ic de elopmen o he ce eb al
co ex: implica ions o lea ning, memo y, and men al illness. P og B ain Res 102:227-243.
doi:10.1016/S0079-6123(08)60543-9

3. Hens idge CM, Picke E, Spi es-Jones TL (2016) Synap ic pa hology: A sha ed
mechanism in neu ological disease. Ageing Res Re 28:72-84. doi:10.1016/j.a .2016.04.005
4. G. M, He as J, Mo ales M, Rome o A, Rubio J (2016) SynapCoun J: A Tool o Analyzing
Synap ic Densi ies in Neu ons. P oceedings o he 9 h In e na ional Join Con e ence on
Biomedical Enginee ng Sys ems and Technologies (BIOSTEC 2016) 2: BIOIMAGING:25-31
5. Fish K, Swee R, Deo A, Lewis D (2008) An au oma ed segmen a ion me hodology o
quan i ying immuno eac i e punc a numbe and luo escence in ensi y in issue sec ions.
B ain Res 1240:62-72
6. Danielson E, Lee SH (2014) SynPAnal: so wa e o apid quan i ica ion o he densi y
and in ensi y o p o ein punc a om luo escence mic oscopy images o neu ons. PLoS
One 9 (12):e115298. doi:10.1371/jou nal.pone.0115298
7. Mokin M, Kei e J (2006) Quan i a i e analysis o immuno luo escen punc a e s aining
o synap ically localized p o eins using con ocal mic oscopy and s e eology. Jou nal o
Neu osciences Me hods (157):218-224
8. Hoon M, Sinha R, Okawa H (2017) Using Fluo escen Ma ke s o Es ima e Synap ic
Connec i i y In Si u. Me hods in Molecula Biology 1538:293-320. doi:10.1007/978-1-4939-
6688-2_20
9. Weile NC, Collman F, Vogels ein JT, Bu ns R, Smi h SJ (2014) Synap ic molecula
imaging in spa ed and dep i ed columns o mouse ba el co ex wi h a ay omog aphy.
Sci Da a 1:140046. doi:10.1038/sda a.2014.46
10. Co deliè es F, Bol e S (2014) Expe imen e s' guide o colocaliza ion s udies: inding a
way h ough indica o s and quan i ie s, in p ac ice. Me hods in Cell Biololy 123:395-408
11. Dobie FA, C aig AM (2011) Inhibi o y synapse dynamics: coo dina ed p esynap ic and
pos synap ic mobili y and he majo con ibu ion o ecycled esicles o new synapse
o ma ion. J Neu osci 31 (29):10481-10493. doi:10.1523/JNEUROSCI.6023-10.2011
12. Schindelin J, A ganda-Ca e as I, F ise E, Kaynig V, Longai M, Pie zsch T, P eibisch S,
Ruede C, Saal eld S, Schmid B, Tine ez J, Whi e D, Ha ensch ein V, Elicei i K, Tomancak
P, Ca dona A (2012) Fiji: an open-sou ce pla o m o biological-image analysis. Na u e
Me hods (9):676–682
13. Dicks ein D, Kabaso D, Roche A, Luebke J, Wea ne S, Ho P (2007) Changes in he
s uc u al complexi y o he aged b ain. Aging Cell 6 (3):275-284
14. Smal I, Loog M, Niessen W, Meije ing E (2010) Quan i a i e compa ison o spo
de ec ion me hods in luo escence mic oscopy. IEEE T ans Med Imaging 29 (2):282-301.
doi:10.1109/TMI.2009.2025127
15. Sassoe-Pogne o M, Panzanelli P, Siegha W, F i schy JM (2000) Colocaliza ion o
mul iple GABA(A) ecep o sub ypes wi h gephy in a pos synap ic si es. J Comp Neu ol
420 (4):481-498
16. A anz J, Balducci E, A a o K, Sanchez-Elexpu u G, Najas S, Pa as A, Rebollo E, Pijuan
I, E b I, Ve de G, Sahun I, Ba allob e M, Lucas J, Sanchez M, de la Luna S, A bones M
(2019) Impai ed de elopmen o neoco ical ci cui s con ibu es o he neu ological
al e a ions in DYRK1A haploinsu iciency synd ome. Neu obiology o Disease In p ess
17. Gi hub websi e MI, Synapse Coun e
h ps://gi hub.com/Molecula ImagingPla o mIBMB/Synapse_Coun e .gi .
18. Schneide CA, Rasband WS, KW E (2102) NIH Image o ImageJ: 25 yea s o image
analysis. Na u e Me hods 9 (7):671-675
19. Fiji download websi e h ps://imagej.ne /Fiji/Downloads). .
20. ImageJ mac o unc ions websi e
h ps://imagej.nih.go /ij/de elope /mac o/ unc ions.h ml.
21. Li CH, Tam PKS (1998.) An i e a i e algo i hm o minimum c oss en opy
h esholding. Pa e n Recogni ion Le e s 19 (8):771-776
22. Pawley J (2000) The 39 s eps: a cau iona y ale o quan i a i e 3-D luo escence
mic oscopy. Bio echniques 28 (5):884-886, 888
23. S aud T, Lang MC, Medda R, Engelha d J, Hell SW (2007) 2,2'- hiodie hanol: a new
wa e soluble moun ing medium o high esolu ion op ical mic oscopy. Mic osc Res Tech
70 (1):1-9. doi:10.1002/jem .20396
24. ImageJ mac o p og amming h ps://imagej.nih.go /ij/docs/guide/146-14.h ml.
25. o ma s Is h ps://docs.openmic oscopy.o g/bio- o ma s/5.7.3/suppo ed-
o ma s.h ml.
26. Fea u eJ h p://imagescience.o g/meije ing/so wa e/ ea u ej/.
27. Roe dink J, Meijs e A (2001) The Wa e shed T ans o m: De ini ions, Algo i hms and
Pa alleliza ion S a egies. Fundamen a In o ma icae 41 (187-228)
28. unc ions Iu-d h ps://imagej.nih.go /ij/de elope /mac o/mac os.h ml# unc ions.
29. S e nbe g S (1983) Biomedical Image P ocessing. Compu e 16 (1):22-34
30. ImageJ's Sub ac Backg ound
h ps://imagej.nih.go /ij/de elope /api/ij/plugin/ il e /Backg oundSub ac e .h ml.
31. Singh I, Nee u N (2014) Pe o mance Compa ison o Va ious Image Denoising Fil e s
Unde Spa ial Domain. In e na ional Jou nal o Compu e Applica ions 96 (19):21-30
32. Au o Local Th eshold h ps://imagej.ne /Au o_Local_Th eshold.
FIGURES
Figu e 1. Synapses iden i ica ion in con ocal mic oscopy. (A) Con ocal mic oscopy
image showing inhibi o y synapses as s ained wi h an ibodies agains he pos synap ic
sca old p o ein Gephy in (g een a owhead) and he p esynap ic esicle componen V-
GAT ( ed a owhead). The whi e line indica es he ROI used o he in ensi y plo shown
in panel B. Ba is 1 µm. (B) G aph showing he in ensi y plo s o he p esynap ic ( ed) and
pos synap ic (g een) signals along he line d awn in panel A. The dis ance be ween he
wo peaks lies beyond he esolu ion limi o he con ocal mic oscope. The o e lay egion
is shown in yellow.
Figu e 8. P ep ocess p e and pos synap ic signals. Fi s , ansla ion is applied o one o
he channels o co ec o ch oma ic misma ch. Then, a use -de ined unc ion called
p ep ocessSignal(image, ollingRadius, medianRadius) is used o emo e noise in bo h images;
he image is selec ed by name using he i s a gumen , and he pa ame e s o he Rolling
ball algo i hm and he Median il e a e selec ed using he o he wo a gumen s. To execu e
his code, copy i in he Fiji sc ip edi o and hi Run.
!
! !

Figu e 9. Punc a segmen a ion. The uppe panel con ains an example agmen o he
channel image con aining pos synap ic punc a (a); he i e LUT has been applied o be e
puc a isualiza ion. The backg ound is i s emo ed by a Rolling ball algo i hm (b); hen,
he LoG ans o ma ion is applied (c); he esul ing image is bina y con e ed (d) and he
Wha e shed algo i hm is u he used o sepa a e con iguous objec s (e, a owhead); inally,
he segmen ed punc a a e de ec ed ia he Analyze pa icles menu. The yellow ou lines
ep esen he ROI selec ions, d awn on o he o iginal image. The lowe panel shows he
mask con aining he pos synap ic punc a (g) and he mask con aining he nuclei (h); bo h
masks a e combined o deli e he inal mask con aining only he cy oplasmic punc a (i).
Figu e 10. De ec pos -synap ic punc a. The unc ion de ec Punc a(image1, image2,
logRadius) is desc ibed be ween cu ly b acke s; he wo i s a gumen s call he inpu
images by name, being he hi d he adius o be speci ied o he LoG ans o ma ion.
Wi hin he unc ion, he LoG algo i hm is applied o enhance spo -like signals. A e bina y
con e sion, he Wha e shed algo i hm is used o u he sepa a e con iguous do s. The
image “maskO Nuclei”, p e iously c ea ed, is sub ac ed o emo e nuclea spo s.
Au oma ic de ec ion is u ilized o il e he punc a and collec hei shapes o he ROI
Manage . The p e ious masks a e hen closed, and he de ec ed oci kep in he ROI
Manage o be il e ed in he nex s ep. To execu e his code, copy i in he Fiji sc ip edi o
and hi Run.
Figu e 11. Disca d non-synap ic punc a and e ie e synapse numbe . The unc ion
h esholdROIs(image, cu o ) ex ac s he median alue o he In Den ROI dis ibu ion on a gi en
image, and e u ns he h eshold alue co ec ed by a cu o alue, p o ided as a gumen ; such
cu o is speci ied om 1 o 5, which se he h eshold low h eshold a 50% o 90% o he
dis ibu ion espec i ely, a in e media e inc emen s o 10%; he unc ion disca dROIs(image,
h eshold) disca ds hose ROIs whose In Den alue on a gi en image ( i s a gumen ) lies below a
ce ain h eshold (second a gumen ); he unc ion e u ns he numbe o ROIs ha emain in he
ROI Manage a e i s execu ion. The whole code pe o ms he ollowing asks: 1) I calcula es he
median o he pos synap ic In Den ROI dis ibu ion ( h esholdG een), 2) I uses he ob ained alue as
h eshold o disca d low quali y punc a and coun s he numbe o emaining punc a (noPunc a); 3)
I hen calcula es he median o he p esynap ic In Den emaining ROI dis ibu ion ( h esholdRed); 4)
Finally, i uses his second h eshold o disca d hose ROIs ha do no quali y as synap ic si es, and
e ie es he inal numbe o synapses (noSynapses). To execu e his code, copy i in he Fiji sc ip
edi o and hi Run.
!
! !
!
!
!
Figu e 12. Synapses h eshold calib a ion and coun ing. (a) Pos synap ic (Gephy in)
channel showing all punc a (yellow ci cles) de ec ed a e segmen a ion; he i e LUT has
been applied o he image in o de o be e show low in ensi y signals. (b) The uppe
g aph shows he pos synap ic signal In Den dis ibu ion his og am o all punc a ROIs
de ec ed in panel A; (c) he lowe g aph shows he p esynap ic signal In Den dis ibu ion
his og am o he ROIs ha emain a e punc a disc imina ion; he main desc ip i e
s a is ics, mean and median, a e shown in each g aph. The middle panel con ains an inse
o he same image (depic ed by he whi e squa e in a) aken as example o show synapse
disc imina ion; (d) is he o iginal h ee channels image inse ; (e) shows all he ROIs
de ec ed du ing punc a segmen a ion (whi e ci cles); ( ) depic s he ROIs ha emain a e
punc a disc imina ion, using as h eshold he median alue o he g een In Den
dis ibu ion; he yellow a owheads depic signal spo s ha ha e been disca ded du ing
his disc imina ion s ep; (g) con ains he inal ROIs ha ha e been selec ed as synapses
a e he second ound o disc imina ion, using as h eshold he median alue o he ed
In Den ROI dis ibu ion; he a owheads depic spo s ha do no o e lap wi h ed signal.
The lowe panel con ains he ou pu e i ica ion images om he supplemen a y sample
images “Synapses_inh_01” (h) and “Synapses_exc_02” (i), co esponding o inhibi o y and
exci a o y synapse coun s espec i ely, p ocessed as explained in sec ion 3.3.

Figu e 13. C ea e e i ica ion image. The unc ion e i ica ionImage(image1, image2, image3)
c ea es a composi e image by me ging h ee channels, p o ided as a gumen s; hen i
d aws, on o he RGB con e ed image, all he ROIs con ained in he ROI Manage , using
whi e colo . To execu e his code, copy i in he Fiji sc ip edi o and hi Run.
!
!
!
! !
Figu e 14. Minimum codes o analyze n images and e ie e esul s. The codes below
will allow au oma ing he main image-p ocessing pipeline o a se o n images; he use -
de ined unc ions a e no included in he igu e, and should be lis ed a he end o he
code.