Kenyon Cell analysis

Classically Kenyon cells have been divided into three types, in birth order

Subsequently additional types have been proposed. Presently VFB lists 3 additional types:

Setting Up

source("../../R/StartUp.R", chdir = TRUE)
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
## Using cached version of file.
suppressMessages(library(apcluster))
# set up for rgl plots
opts_chunk$set(message=FALSE,fig.height=22.605/25.4*1.5, fig.width=34.925/25.4*1.5, dev='png', dpi=300, include=TRUE, fig.path="figure/")
knit_hooks$set(custom.plot = hook_rgl) #Needed to embed plots
par3dmini=c("FOV", "userMatrix", "scale", "zoom")
KC_score_mat <- load_si_data("KC_score_mat.rds")
options(flycircuit.scoremat="KC_score_mat")

Finding the Kenyon Cells

Plot the mushroom body neuropil.

clear3d()
op=structure(list(FOV = 0, userMatrix = structure(c(1, 0, 0, 0, 
0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1), .Dim = c(4L, 4L)), scale = c(1, 
1, 1), zoom = 0.630000054836273), .Names = c("FOV", "userMatrix", 
"scale", "zoom"))
par3d(op)
plot3d(materials=subset(FCWBNP.surf$RegionList, grepl("MB_", FCWBNP.surf$RegionList)), alpha=0.3, FCWBNP.surf)

First let’s load an affinity propagation clustering of all Kenyon cells.

apresmb <- load_si_data('apresmb2.rds')
kcexemplars=names(apresmb@exemplars)

There are 60 exemplar Kenyon cells selected by the affinity propagation clustering. These should cover the full diversity of Kenyon cell types.

So that does indeed include the 3 classic types. Let’s make a dataframe of information about all the neurons.

# make a new column in data frame to store type info
kcs=as.data.frame(apresmb)
kcs$type=NA

3 Classic KC Types

Alpha/Beta versus the rest

OK let’s start dividing up into main morphological classes.

hcmb=hclustfc(kcs$item)
hcmb$height=sqrt(hcmb$height)
dhcmb=colour_clusters(hcmb,k=2)
labels(dhcmb)=NULL
par(mar=c(0,2,0,0))
plot(dhcmb)

kcs[subset(hcmb,k=2,groups=2),'type']='ab'

Confirm that group 2 neurons are alpha/beta.

Gamma and alpha’/beta’

Recluster neurons and divide into 3 groups.

hcmb2=hclustfc(subset(hcmb, k=2, groups = 1))
hcmb2$height=sqrt(hcmb2$height)
dhcmb2=colour_clusters(hcmb2,k=3)
labels(dhcmb2)=NULL
par(mar=c(0,2,0,0))
plot(dhcmb2)

Plot the 3 groups in 3D.

clear3d()
op=structure(list(FOV = 0, userMatrix = structure(c(0.760397255420685, -0.089378222823143, 0.643278956413269, 0, 0.395794332027435, 
-0.721528589725494, -0.56810474395752, 0, 0.514920055866241, 0.686591565608978, -0.513273119926453, 0, -2.16882995139968, -7.31256332767846, 2.28123521804812, 1), .Dim = c(4L, 4L)), scale = c(1, 
1, 1), zoom = 0.58467960357666), .Names = c("FOV", "userMatrix", "scale", "zoom"))
par3d(op)
plot3dfc(kcexemplars,lwd=.25,col='lightgrey',soma=T)
plot3d(hcmb2,k=3)

OK, so group 2 contains alpha’/beta’.

clear3d()
apbpop=structure(list(FOV = 0, userMatrix = structure(c(0.760397255420685, -0.089378222823143, 0.643278956413269, 0, 0.395794332027435, 
-0.721528589725494, -0.56810474395752, 0, 0.514920055866241, 0.686591565608978, -0.513273119926453, 0, -8.52922951489078, -5.45744682037794, 2.28123521804815, 1), .Dim = c(4L, 4L)), scale = c(1, 
1, 1), zoom = 0.530321657657623), .Names = c("FOV", "userMatrix", "scale", "zoom"))
par3d(apbpop)
plot3dfc(kcexemplars,lwd=.25,col='lightgrey',soma=T)
plot3d(subset(hcmb2,k=3,groups=2), soma=T, col="darkblue")

and the others are gamma

clear3d()
par3d(op)
plot3dfc(kcexemplars,lwd=.25,col='lightgrey',soma=T)
plot3d(hcmb2, k=3, groups=c(1,3), soma=TRUE)

Let’s record the types. We’ll investigate them in detail later.

kcs[subset(hcmb2,k=3,groups=2),'type']="apbp"
kcs[subset(hcmb2,k=3,groups=c(1,3)),'type']="gamma"

Following the analysis below, we found some neurons in the main types that should not be in those groups. We’ve corrected the type annotation for the ones below:

notgamma=c("GadMARCM-F000415_seg001", "DvGlutMARCM-F1496_seg1") #originally classified as gamma, but innervate both lobes, alpha'/beta'
kcs[notgamma, 'type']="apbp"
kcs["FruMARCM-M002170_seg001", 'type']=NA #originally classified as alpha/beta but only innervates medial lobe, beta lobe.
weird=c("FruMARCM-F000584_seg003", "FruMARCM-F000794_seg001", "FruMARCM-M001582_seg003", "FruMARCM-F000667_seg001", "DvGlutMARCM-F178_seg2") #originally classified as alpha/beta but only innervates vertical lobe, alpha lobe (group 3, subgroup 4)
kcs[weird, 'type']=NA
weird2=c("FruMARCM-M000234_seg001", "FruMARCM-M001348_seg001", "FruMARCM-F000193_seg001", 
"ChaMARCM-F000511_seg002", "FruMARCM-M000253_seg001", "FruMARCM-F001115_seg002", 
"GadMARCM-F000094_seg002", "DvGlutMARCM-F002453_seg001", "FruMARCM-M001933_seg002", 
"FruMARCM-F001756_seg002", "ChaMARCM-F000746_seg001", "DvGlutMARCM-F003280_seg002"
) #originally classified as alpha/beta but only innervates vertical lobe, alpha lobe (group 4, subgroup 2)
kcs[weird2, 'type']=NA

Let’s tidy up our data frame quickly and add some useful information.

kcs$type=factor(kcs$type)
newfields=c('soma_side','Driver','Gender')
kcs=cbind(kcs,attr(dps,'df')[kcs$item,newfields])
kcs[newfields]=lapply(kcs[newfields],factor)

Initial Conclusion

So now we have 3 main KC types: ab, apbp, gamma (n=1091, 85, 470, respectively).

Kenyon Cell Subtypes

Now let’s look at each of those main types in turn to see if there are any subtypes to find.

Gamma Neuron Subtypes

Starting with gamma neurons:

Plot all gamma neurons.

clear3d()
op=structure(list(FOV = 0, userMatrix = structure(c(0.731466829776764, -0.0248482599854469, 0.68142431974411, 0, 0.410978019237518, -0.781360507011414, -0.469651877880096, 0, 0.544107794761658, 0.623585283756256, -0.561327278614044, 0, -5.35291620580356, -5.82318211519839, 2.53282165527342, 1), .Dim = c(4L, 4L)), scale = c(1, 1, 1), zoom = 0.530321657657623), .Names = c("FOV", "userMatrix", "scale", "zoom"))
par3d(op)
plot3dfc(kcexemplars,lwd=.25,col='lightgrey',soma=T)
plot3d(subset(kcs, type=='gamma')$item, soma=TRUE, col='forestgreen')

Cluster and divide into 2 groups.

hcmbg=hclustfc(subset(kcs, type=='gamma')$item)
df=attr(dps,'df')
# plot(hcmbg,label=df[as.character(subset(kcs, type=='gamma')$item),'Driver'])
hcmbg$height=sqrt(hcmbg$height)
dhcmbg=colour_clusters(hcmbg,k=2)
labels(dhcmbg)=NULL
par(mar=c(0,2,0,0))
plot(dhcmbg)

Just cutting into 2 groups gives what looks like a medial and a lateral group:

Interestingly there seems to be some evidence of spatial segregation all the way down the peduncle to the lobe.

clear3d()
par3d(op)
plot3dfc(kcexemplars,lwd=.25,col='lightgrey',soma=T)
plot3d(hcmbg, k=2, soma=TRUE)

Let’s try cutting a bit further into 3 groups rather than 2.

dhcmbg2=colour_clusters(hcmbg,k=3, groupLabels=as.roman)
labels(dhcmbg2)=NULL
par(mar=c(0,2,0,0))
plot(dhcmbg2)
abline(h=height_for_ngroups(hcmbg, k=3), lty='dashed')

Plot the 3 groups in frontal view.

clear3d()
opgamma=structure(list(FOV = 0, userMatrix = structure(c(0.971897780895233, 0.0127162486314774, 0.23506024479866, 0, 0.202489703893661, -0.554406821727753, -0.807236671447754, 0, 0.120053678750992, 0.832148790359497, -0.541401505470276, 0, -0.327693840344819, -7.89318466492533, 2.8950777053833, 1), .Dim = c(4L, 4L)), scale = c(1, 1, 1), zoom = 0.530321657657623), .Names = c("FOV", "userMatrix", "scale", "zoom"))
par3d(opgamma)
plot3dfc(kcexemplars,lwd=.25,col='lightgrey',soma=T)
plot3d(hcmbg, k=3, soma=TRUE)