resample and strahler order

20 views
Skip to first unread message

Arthur Zhao

unread,
May 3, 2020, 3:19:18 PM5/3/20
to nat-user
Hi Greg and friends, 


The resample function seems to rearrange the segment numbering and erase the node tags (makes sense since the nodes are resampled), which is a bit of a problem if i want to calculate the Strahler order on the resampled neuron. Any suggestions ?

Best,
arthur

Gregory Jefferis

unread,
May 3, 2020, 4:17:08 PM5/3/20
to Arthur Zhao, nat-user
Dear Arthur,

Can give you give an example please to make it clear exactly what the problem is?
Thank you!

Greg.


Sent from my iPhone

On 3 May 2020, at 20:19, Arthur Zhao <artx...@gmail.com> wrote:


--
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/f5a2e961-3be1-4669-a5f5-491a30b74be4%40googlegroups.com.

Marcel Sayre

unread,
May 3, 2020, 11:22:59 PM5/3/20
to nat-user
Hey Greg and Arthur,

To piggyback on this question- I'm also having an issue with the resample function, however I may just be using the function incorrectly. My goal is to resample a neuron so that it's a bit lighter. When I run the command:

#where PFN_1 is a single neuron with 14 elements
PFN_1.resample <- resample(PFN_1, 0.25)

The XYZ coordinates are resampled successfuly, but I end up with a neuron that has just 8 elements. NeuronName, InputFileName, ... through InputFileMD5 are removed. Is this normal behavior? 

Thanks!
Marcel



On Monday, May 4, 2020 at 6:17:08 AM UTC+10, Gregory Jefferis wrote:
Dear Arthur,

Can give you give an example please to make it clear exactly what the problem is?
Thank you!

Greg.


Sent from my iPhone

On 3 May 2020, at 20:19, Arthur Zhao <artx...@gmail.com> wrote:


Hi Greg and friends, 


The resample function seems to rearrange the segment numbering and erase the node tags (makes sense since the nodes are resampled), which is a bit of a problem if i want to calculate the Strahler order on the resampled neuron. Any suggestions ?

Best,
arthur

--
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-...@googlegroups.com.

Gregory Jefferis

unread,
May 4, 2020, 12:06:06 AM5/4/20
to Marcel Sayre, nat-user
Dear Arthur, glad things are working ok. 

Marcel, resample is a fundamentally destructive operation as if changes the position of most of the vertices in a neuron. It is however less destructive than it could be, because the branch point positions are not resampled (and therefore the segment topology remains identical). 

There is a function http://natverse.org/rcatmaid/reference/copy_tags_connectors.html that can copy over some additional information from the old neuron. At some point I would like to make this automatic, but the details of what to do after destructive operations like prune or resample are a little fiddly. For now it is a manual step. 

As for the missing fields you mention, yes this is normal. Perhaps neuron name should be retained but but I think it makes sense to drop details of the input file since that file was not actually responsible for generating the new neuron. If you feel strongly on any of these points, feel free to make an issue on GitHub. 

All the best,

Greg. 

Sent from my iPhone

On 4 May 2020, at 04:23, Marcel Sayre <marcel...@gmail.com> wrote:


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/fc8afca9-9c81-41c2-8052-e56eae9b2229%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages