Skip to content

Miscellaneous snippets

Chris Barnes edited this page Aug 21, 2020 · 3 revisions

Shell

3D viewer skeleton CSV conversion to legacy

awk 'BEGIN{ FS=",";OFS=FS } { print (NR==1 ? "neuron" : "skeleton " $1, $0) }' skeleton_coordinates.csv > new_file.csv

Prior to 2018-03-21 (commit e1a9ced), the CSV produced by the "Skeletons as CSV" button in the 3D viewer included a column for neuron name. However, these names are long and repeated for every treenode, drastically increasing the size of the CSV, so it was removed.

Some external tools (e.g. the EM>LM MCFO search tool from Douglas Armstrong's group at http://larval-app1.virtualflybrain.org/ ) need that column to be present, although its value doesn't matter so much. This one-liner makes the current CSVs compatible with such tools.