Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. /*
  2. * SNT script that checks for the presence of a misterious ARA ID that
  3. * somehow was detected on manually downloaded MouseLight reconstructions.
  4. */
  5.  
  6. import tracing.io.MouseLightLoader;
  7. import org.json.*
  8.  
  9. ids = ["AA0189", "AA0360", "AA0362"]
  10. unknowCompartmentID = 484682464
  11.  
  12.  
  13. for (id in ids) {
  14. println("Parsing id "+ id)
  15. jsonData = new MouseLightLoader(id).getJSON()
  16. neurons = jsonData.getJSONObject("contents").getJSONArray("neurons")
  17. for (neuron in neurons) {
  18. somaCompartment = neuron.getJSONObject("soma").getInt("allenId");
  19. println("\tSoma in unknown compartment? "+ somaCompartment)
  20. for (dendriteNode in neuron.getJSONArray("dendrite")) {
  21. allenId = dendriteNode.getInt("allenId")
  22. found = allenId == unknowCompartmentID
  23. println("\tDendrite node in ARA compartment "+ allenId + "\tUnknown? " + found)
  24. if (found) return;
  25. }
  26. for (axonNode in neuron.getJSONArray("axon")) {
  27. allenId = axonNode.getInt("allenId")
  28. found = allenId == unknowCompartmentID
  29. println("\tAxon node in ARA compartment "+ allenId + "\tUnknown? " + found)
  30. if (found) return;
  31. }
  32. }
  33. println("Parsing of id "+ id + " completed")
  34. }
  35. println("All ids parsed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement