Re: problem about nblast

144 views
Skip to first unread message

Dr Gregory Jefferis

unread,
Feb 20, 2017, 4:41:26 AM2/20/17
to @明, nat-user
Dear Ming Hao,

Thanks for your interest in the NBLAST method. Please direct any future
questions to the nat-user group (cced) so that others can potentially
benefit from the discussion. There is an example available as part of
the documentation:

http://jefferislab.github.io/nat.nblast/articles/NBLAST-Clustering.html

I have given a full worked example below that includes reading in some
SWC format neurons. Please note that your input neurons need to be
co-registered in the same space – otherwise the results will not be so
useful.

Best wishes,

Greg.


library(nat.nblast)

# generate URLs for some sample neurons available on flycircuit website
sampleurls=sprintf("http://flycircuit.tw/download/swc/Cha-F-%s.swc",400001:400020)
# read in those URLs - would be the same if you have the neurons
downloaded on disk
samplen=read.neurons(sampleurls)
# convert to dotprops format (the input format needed by NBLAST - see
Neuron paper for details)
# resample=1 means resample to 1 micron steps, k=5 means 5 nearest
neighbours to estimate tangent vectors
# see also ?dotprops help
samplen.dps=dotprops(samplen, k=5, resample=1)

# calculate all by all similarity matrix
aba=nblast_allbyall(samplen.dps)

# cluster that
hc=nhclust(scoremat=aba)
plot(hc)
abline(h=2)
# Cut dendrogram at h=2 and plot neurons in 3d, coloured by resultant
clusters
plot3d(hc, h=2, db=samplen)

# If you wanted to get the normalised distance matrix to pass to your
own clustering/analysis method
# (0 => identical neuron) you could do that like this
sub_dist_mat(scoremat = aba)


On 20 Feb 2017, at 8:15, @明 wrote:

> Hi jefferis, I am a student in Beijing University of Technology. I
> want to do some research about neuron classification. I have installed
> R on Windows 10 and installed nblast. I got many neurons (swc file),
> I want to calculate the similarity matrix about these neurons. How can
> I load the swc files into R and calculate the similarity matrix?



--
Gregory Jefferis, PhD Tel: +44 1223 267048
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://www.zoo.cam.ac.uk/departments/connectomics

Kai-Yi Hsu

unread,
Jun 6, 2022, 11:26:52 PM6/6/22
to nat-user
Dear jefferis
I am a Ph.D. student at BRC.
I want to calculate the similarity matrix of 50,000 neurons (from Flycircuit) using NBLAST.
But the URL can't connect:
http://jefferislab.github.io/nat.nblast/articles/NBLAST-Clustering.html
http://jefferislab.org/si/nblast
====
Does your team provide the preprocessed similarity matrix mentioned in the paper?
{an all-by-all similarity matrix for all 16,129 neurons (2.6 × 108 scores, 1.0 GB).}
In addition, your website has a list of 1052 subgroups, and now where can I go to check it?

Best regards,

==============================
Kai-Yi Hsu
Ph.D. Student
Institute of Systems Neuroscience
National Tsing Hua University, Taiwan
Tel: +886(3) 5715131#33462
Email: kaiy...@lolab-nthu.org

許楷翊 博士生
國立清華大學系統神經科學研究所
實驗室電話號碼: +886(3) 5715131#33462
電子郵件地址: kaiy...@lolab-nthu.org 
==============================



jeff...@gmail.com 在 2017年2月20日 星期一下午5:41:26 [UTC+8] 的信中寫道:

Greg Jefferis

unread,
Jun 7, 2022, 4:47:29 PM6/7/22
to Kai-Yi Hsu, nat-user
Dear Kai-Yi Hsu,

Thank you for your interest. The first URL is available from


Can I ask where you found the jefferislab.github.io URL? It was retired some time ago and I should try to eliminate any references.

The link at

Can temporarily be found at 


Please find the downloads at 


in place of 

--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/8173e275-c2a2-47bf-93f5-0fd34db407a5n%40googlegroups.com.

Kai-Yi Hsu

unread,
Jun 7, 2022, 9:05:56 PM6/7/22
to nat-user
Dear Dr.Greg,

Thank you for your immediate response.  The information you provided will help me to move forward with the next steps.

Q: [Can I ask where you found the jefferislab.github.io URL? ]
A: I googled Jefferis lab GitHub. I guess that Google SEO is the reason.
截圖 2022-06-08 上午8.12.48.png

I have a quick question.
Do you provide a table of clusters? (or similarity matrix for 16129 neurons)
I searched for 1052 clusters earlier and found that 248 websites were unavailable.


Here are the unavailable cluster's IDs.( I have uploaded txt file)

I used this URL before: 
http://flybrain.mrc-lmb.cam.ac.uk/si/nblast/clusters/clusters/999

Now I also can't seem to query the cluster using the URL you
or

Best regards,
Kai-Yi

jeff...@gmail.com 在 2022年6月8日 星期三上午4:47:29 [UTC+8] 的信中寫道:
NBLAST_Cluster's_ID_Url_Unavailable.txt

Greg Jefferis

unread,
Jun 9, 2022, 8:15:27 AM6/9/22
to Kai-Yi Hsu, nat-user
Thanks Kai-Yi,

Thank you for your immediate response.  The information you provided will help me to move forward with the next steps.

Q: [Can I ask where you found the jefferislab.github.io URL? ]
A: I googled Jefferis lab GitHub. I guess that Google SEO is the reason.
<截圖 2022-06-08 上午8.12.48.png>

Hmm, unfortunately when repositories move the github.io URLs do not automatically forward. 

I have a quick question.
Do you provide a table of clusters? (or similarity matrix for 16129 neurons)
I searched for 1052 clusters earlier and found that 248 websites were unavailable.


Here are the unavailable cluster's IDs.( I have uploaded txt file)

I used this URL before: 
http://flybrain.mrc-lmb.cam.ac.uk/si/nblast/clusters/clusters/999

Now I also can't seem to query the cluster using the URL you

However I fear that you are correct that some folders are missing. The RAID array hosting these data suffered a failure a while back and although our scicomp group restored it would appear that this was only partial. 

You can download the all by all matrix like and also the raw cluster identities as below. The key thing is to set options(flycircuit.sidataurl)appropriately. You can either use the virtualflybrain mirror (as below) or https://flyemdev.mrc-lmb.cam.ac.uk/flybrain/si/nblast/flycircuit.

library(flycircuit) # download NBLAST all by all score matrix (used e.g. for hierarchical clustering) # this downloads a single 2Gb file to your machine as a one-off # set download timeout much longer than usual 60s depending on your download speed options(timeout=2000) options(flycircuit.sidataurl="http://virtualflybrain.org/data/VFB/nblast/flycircuit") allbyallblastcv4.5=load_si_data('allbyallblastcv4.5.ff') allbyallblastcv4.5[1:5, 1:5] apres16k.p0=load_si_data('apres16k.p0.rds') # convert apcluster object into simpler data frame apres16k.p0df=as.data.frame(apres16k.p0) write.csv(apres16k.p0df, file = 'apres16k.p0.csv') cluster1_ids=subset(apres16k.p0df, cluster==1)$item aba=fc_nblast(cluster1_ids, cluster1_ids, scoremat = allbyallblastcv4.5, normalisation = 'mean') cluster1_ids=subset(apres16k.p0df, cluster==1)$item hc=hclustfc(cluster1_ids, scoremat = allbyallblastcv4.5) plot(hc) 

and then follow other examples/functions in the package docs e.g. hclustfc or fc_nblast.

All the best,

Greg.



Kai-Yi Hsu

unread,
Jun 14, 2022, 8:43:57 PM6/14/22
to nat-user
Dear Dr.Greg,

Thanks for your patient answer.
The information you provided is very detailed; it will help me to move forward with the next steps.

Q: Currently some clusters cannot be displayed.
Individual URLs look like this:
https://flyemdev.mrc-lmb.cam.ac.uk/flybrain/si/nblast/clusters/clusters/999/

Is it because there is no cluster No.999 or No.7?

Thank you

Best regards,
Kai-Yi




jeff...@gmail.com 在 2022年6月9日 星期四下午8:15:27 [UTC+8] 的信中寫道:

Gregory Jefferis

unread,
Jun 14, 2022, 9:59:27 PM6/14/22
to Kai-Yi Hsu, nat-user
Dear Kai-Yi, if you follow the R code steps later in my previous answer you will see that clusters 7 and 999 indeed exist and you will be able to list their members — the problem is that apparently the webpages describing those clusters are currently unavailable. All the best, Greg. 

Sent from my iPhone

On 15 Jun 2022, at 01:43, Kai-Yi Hsu <kaiy...@lolab-nthu.org> wrote:

Dear Dr.Greg,
--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.

Kai-Yi Hsu

unread,
Jun 14, 2022, 10:02:22 PM6/14/22
to nat-user
Dear Dr.Greg,

I will run the code, thank you very much.

Best regards,
Kai-Yi

jeff...@gmail.com 在 2022年6月15日 星期三上午9:59:27 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages