Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * SNT script that checks for the presence of a misterious ARA ID that
- * somehow was detected on manually downloaded MouseLight reconstructions.
- */
- import tracing.io.MouseLightLoader;
- import org.json.*
- ids = ["AA0189", "AA0360", "AA0362"]
- unknowCompartmentID = 484682464
- for (id in ids) {
- println("Parsing id "+ id)
- jsonData = new MouseLightLoader(id).getJSON()
- neurons = jsonData.getJSONObject("contents").getJSONArray("neurons")
- for (neuron in neurons) {
- somaCompartment = neuron.getJSONObject("soma").getInt("allenId");
- println("\tSoma in unknown compartment? "+ somaCompartment)
- for (dendriteNode in neuron.getJSONArray("dendrite")) {
- allenId = dendriteNode.getInt("allenId")
- found = allenId == unknowCompartmentID
- println("\tDendrite node in ARA compartment "+ allenId + "\tUnknown? " + found)
- if (found) return;
- }
- for (axonNode in neuron.getJSONArray("axon")) {
- allenId = axonNode.getInt("allenId")
- found = allenId == unknowCompartmentID
- println("\tAxon node in ARA compartment "+ allenId + "\tUnknown? " + found)
- if (found) return;
- }
- }
- println("Parsing of id "+ id + " completed")
- }
- println("All ids parsed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement