vfbquery 0.2.7__py3-none-any.whl → 0.2.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vfbquery/vfb_queries.py CHANGED
@@ -14,7 +14,7 @@ vfb_solr = pysolr.Solr('http://solr.virtualflybrain.org/solr/vfb_json/', always_
14
14
  vc = VfbConnect()
15
15
 
16
16
  class Query:
17
- def __init__(self, query, label, function, takes, preview=0, preview_columns=[], preview_results=[], count=-1):
17
+ def __init__(self, query, label, function, takes, preview=0, preview_columns=[], preview_results=[], output_format="table", count=-1):
18
18
  self.query = query
19
19
  self.label = label
20
20
  self.function = function
@@ -22,6 +22,7 @@ class Query:
22
22
  self.preview = preview
23
23
  self.preview_columns = preview_columns
24
24
  self.preview_results = preview_results
25
+ self.output_format = output_format
25
26
  self.count = count
26
27
 
27
28
  def __str__(self):
@@ -36,6 +37,7 @@ class Query:
36
37
  "preview": self.preview,
37
38
  "preview_columns": self.preview_columns,
38
39
  "preview_results": self.preview_results,
40
+ "output_format": self.output_format,
39
41
  "count": self.count,
40
42
  }
41
43
 
@@ -49,6 +51,7 @@ class Query:
49
51
  preview=data["preview"],
50
52
  preview_columns=data["preview_columns"],
51
53
  preview_results=data["preview_results"],
54
+ output_format=data.get("output_format", 'table'),
52
55
  count=data["count"],
53
56
  )
54
57
 
@@ -64,6 +67,7 @@ class QuerySchema(Schema):
64
67
  preview = fields.Integer(required=False, missing=0)
65
68
  preview_columns = fields.List(fields.String(), required=False, missing=[])
66
69
  preview_results = fields.List(fields.Dict(), required=False, missing=[])
70
+ output_format = fields.String(required=False, missing='table')
67
71
  count = fields.Integer(required=False, missing=-1)
68
72
 
69
73
  class License:
@@ -423,7 +427,7 @@ def term_info_parse_object(results, short_form):
423
427
  if "image_" in key and not ("thumbnail" in key or "folder" in key) and len(vars(image)[key]) > 1:
424
428
  record[key.replace("image_","")] = vars(image)[key].replace("http://","https://")
425
429
  if len(image.index) > 0:
426
- record[image.index] = int(image.index[0])
430
+ record[int(image.index[0])] = int(image.index[0])
427
431
  vars(image).keys()
428
432
  image_vars = vars(image)
429
433
  if 'center' in image_vars.keys():
@@ -470,6 +474,9 @@ def term_info_parse_object(results, short_form):
470
474
  if contains_all_tags(termInfo["SuperTypes"], ["Individual", "Neuron"]):
471
475
  q = SimilarMorphologyTo_to_schema(termInfo["Name"], {"neuron": vfbTerm.term.core.short_form, "similarity_score": "NBLAST_score"})
472
476
  queries.append(q)
477
+ if contains_all_tags(termInfo["SuperTypes"], ["Individual", "Neuron", "has_neuron_connectivity"]):
478
+ q = NeuronInputsTo_to_schema(termInfo["Name"], {"neuron_short_form": vfbTerm.term.core.short_form})
479
+ queries.append(q)
473
480
  # Add the queries to the term info
474
481
  termInfo["Queries"] = queries
475
482
 
@@ -479,6 +486,20 @@ def term_info_parse_object(results, short_form):
479
486
  # print("termInfo object before schema validation:", termInfo)
480
487
  return TermInfoOutputSchema().load(termInfo)
481
488
 
489
+ def NeuronInputsTo_to_schema(name, take_default):
490
+ query = "NeuronInputsTo"
491
+ label = f"Find neurons with synapses into {name}"
492
+ function = "get_individual_neuron_inputs"
493
+ takes = {
494
+ "neuron_short_form": {"$and": ["Individual", "Neuron"]},
495
+ "default": take_default,
496
+ }
497
+ preview = -1
498
+ preview_columns = ["Neurotransmitter", "Weight"]
499
+ output_format = "ribbon"
500
+
501
+ return Query(query=query, label=label, function=function, takes=takes, preview=preview, preview_columns=preview_columns, output_format=output_format)
502
+
482
503
  def SimilarMorphologyTo_to_schema(name, take_default):
483
504
  query = "SimilarMorphologyTo"
484
505
  label = f"Find similar neurons to {name}"
@@ -715,6 +736,43 @@ def get_templates(limit: int = -1, return_dataframe: bool = False):
715
736
  }
716
737
  return formatted_results
717
738
 
739
+ def get_related_anatomy(template_short_form: str, limit: int = -1, return_dataframe: bool = False):
740
+ """
741
+ Retrieve related anatomical structures for a given template.
742
+
743
+ :param template_short_form: The short form of the template to query.
744
+ :param limit: Maximum number of results to return. Default is -1, which returns all results.
745
+ :param return_dataframe: If True, returns results as a pandas DataFrame. Otherwise, returns a list of dicts.
746
+ :return: Related anatomical structures and paths.
747
+ """
748
+
749
+ # Define the Cypher query
750
+ query = f"""
751
+ MATCH (root:Class)<-[:INSTANCEOF]-(t:Template {{short_form:'{template_short_form}'}})<-[:depicts]-(tc:Template)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:Individual)-[r:INSTANCEOF]->(anat:Class:Anatomy)
752
+ WHERE exists(ie.index)
753
+ WITH root, anat,r,image
754
+ MATCH p=allshortestpaths((root)<-[:SUBCLASSOF|part_of*..50]-(anat))
755
+ UNWIND nodes(p) as n
756
+ UNWIND nodes(p) as m
757
+ WITH * WHERE id(n) < id(m)
758
+ MATCH path = allShortestPaths( (n)-[:SUBCLASSOF|part_of*..1]-(m) )
759
+ RETURN collect(distinct {{ node_id: id(anat), short_form: anat.short_form, image: image.short_form }}) AS image_nodes, id(root) AS root, collect(path)
760
+ """
761
+
762
+ if limit != -1:
763
+ query += f" LIMIT {limit}"
764
+
765
+ # Execute the query using your database connection (e.g., VFB_connect)
766
+ results = vc.nc.commit_list([query])
767
+
768
+ # Convert the results to a DataFrame (if needed)
769
+ if return_dataframe:
770
+ df = pd.DataFrame.from_records(results)
771
+ return df
772
+
773
+ # Otherwise, return the raw results
774
+ return results
775
+
718
776
  def get_similar_neurons(neuron, similarity_score='NBLAST_score', return_dataframe=True, limit: int = -1):
719
777
  """Get JSON report of individual neurons similar to input neuron
720
778
 
@@ -791,6 +849,135 @@ def get_similar_neurons(neuron, similarity_score='NBLAST_score', return_datafram
791
849
  }
792
850
  return formatted_results
793
851
 
852
+ def get_individual_neuron_inputs(neuron_short_form: str, return_dataframe=True, limit: int = -1, summary_mode: bool = False):
853
+ """
854
+ Retrieve neurons that have synapses into the specified neuron, along with the neurotransmitter
855
+ types, and additional information about the neurons.
856
+
857
+ :param neuron_short_form: The short form identifier of the neuron to query.
858
+ :param return_dataframe: If True, returns results as a pandas DataFrame. Otherwise, returns a dictionary.
859
+ :param limit: Maximum number of results to return. Default is -1, which returns all results.
860
+ :param summary_mode: If True, returns a preview of the results with summed weights for each neurotransmitter type.
861
+ :return: Neurons, neurotransmitter types, and additional neuron information.
862
+ """
863
+
864
+ # Define the common part of the Cypher query
865
+ query_common = f"""
866
+ MATCH (a:has_neuron_connectivity {{short_form:'{neuron_short_form}'}})<-[r:synapsed_to]-(b:has_neuron_connectivity)
867
+ UNWIND(labels(b)) as l
868
+ WITH * WHERE l contains "ergic"
869
+ OPTIONAL MATCH (c:Class:Neuron) WHERE c.short_form starts with "FBbt_" AND toLower(c.label)=toLower(l+" neuron")
870
+ """
871
+ if not summary_mode:
872
+ count_query = f"""{query_common}
873
+ RETURN COUNT(DISTINCT b) AS total_count"""
874
+ else:
875
+ count_query = f"""{query_common}
876
+ RETURN COUNT(DISTINCT c) AS total_count"""
877
+
878
+ count_results = vc.nc.commit_list([count_query])
879
+ count_df = pd.DataFrame.from_records(dict_cursor(count_results))
880
+ total_count = count_df['total_count'][0] if not count_df.empty else 0
881
+
882
+ # Define the part of the query for normal mode
883
+ query_normal = f"""
884
+ OPTIONAL MATCH (b)-[:INSTANCEOF]->(neuronType:Class),
885
+ (b)<-[:depicts]-(imageChannel:Individual)-[image:in_register_with]->(templateChannel:Template)-[:depicts]->(templ:Template),
886
+ (imageChannel)-[:is_specified_output_of]->(imagingTechnique:Class)
887
+ RETURN
888
+ b.short_form as id,
889
+ apoc.text.format("[%s](%s)", [l, c.short_form]) as Neurotransmitter,
890
+ sum(r.weight[0]) as Weight,
891
+ apoc.text.format("[%s](%s)", [b.label, b.short_form]) as Name,
892
+ apoc.text.format("[%s](%s)", [neuronType.label, neuronType.short_form]) as Type,
893
+ apoc.text.join(b.uniqueFacets, '|') as Gross_Type,
894
+ apoc.text.join(collect(apoc.text.format("[%s](%s)", [templ.label, templ.short_form])), ', ') as Template_Space,
895
+ apoc.text.format("[%s](%s)", [imagingTechnique.label, imagingTechnique.short_form]) as Imaging_Technique,
896
+ apoc.text.join(collect(REPLACE(apoc.text.format("[![%s](%s '%s')](%s)",[COALESCE(b.symbol[0],b.label), REPLACE(COALESCE(image.thumbnail[0],""),"thumbnailT.png","thumbnail.png"), COALESCE(b.symbol[0],b.label), b.short_form]), "[![null]( 'null')](null)", "")), ' | ') as Images
897
+ ORDER BY Weight Desc
898
+ """
899
+
900
+ # Define the part of the query for preview mode
901
+ query_preview = f"""
902
+ RETURN DISTINCT c.short_form as id,
903
+ apoc.text.format("[%s](%s)", [l, c.short_form]) as Neurotransmitter,
904
+ sum(r.weight[0]) as Weight
905
+ ORDER BY Weight Desc
906
+ """
907
+
908
+ # Choose the appropriate part of the query based on the summary_mode parameter
909
+ query = query_common + (query_preview if summary_mode else query_normal)
910
+
911
+ if limit != -1 and not summary_mode:
912
+ query += f" LIMIT {limit}"
913
+
914
+ # Execute the query using your database connection (e.g., vc.nc)
915
+ results = vc.nc.commit_list([query])
916
+
917
+ # Convert the results to a DataFrame
918
+ df = pd.DataFrame.from_records(dict_cursor(results))
919
+
920
+ # If return_dataframe is True, return the results as a DataFrame
921
+ if return_dataframe:
922
+ return df
923
+
924
+ # Format the results for the preview
925
+ if not summary_mode:
926
+ results = {
927
+ "headers": {
928
+ "id": {"title": "ID", "type": "text", "order": -1},
929
+ "Neurotransmitter": {"title": "Neurotransmitter", "type": "markdown", "order": 0},
930
+ "Weight": {"title": "Weight", "type": "numeric", "order": 1},
931
+ "Name": {"title": "Name", "type": "markdown", "order": 2},
932
+ "Type": {"title": "Type", "type": "markdown", "order": 3},
933
+ "Gross_Type": {"title": "Gross Type", "type": "text", "order": 4},
934
+ "Template_Space": {"title": "Template Space", "type": "markdown", "order": 5},
935
+ "Imaging_Technique": {"title": "Imaging Technique", "type": "markdown", "order": 6},
936
+ "Images": {"title": "Images", "type": "markdown", "order": 7}
937
+ },
938
+ "rows": [
939
+ {
940
+ key: row[key]
941
+ for key in [
942
+ "id",
943
+ "Neurotransmitter",
944
+ "Weight",
945
+ "Name",
946
+ "Type",
947
+ "Gross_Type",
948
+ "Template_Space",
949
+ "Imaging_Technique",
950
+ "Images"
951
+ ]
952
+ }
953
+ for row in df.to_dict("records")
954
+ ],
955
+ "count": total_count
956
+ }
957
+ else:
958
+ results = {
959
+ "headers": {
960
+ "id": {"title": "ID", "type": "text", "order": -1},
961
+ "Neurotransmitter": {"title": "Neurotransmitter", "type": "markdown", "order": 0},
962
+ "Weight": {"title": "Weight", "type": "numeric", "order": 1},
963
+ },
964
+ "rows": [
965
+ {
966
+ key: row[key]
967
+ for key in [
968
+ "id",
969
+ "Neurotransmitter",
970
+ "Weight",
971
+ ]
972
+ }
973
+ for row in df.to_dict("records")
974
+ ],
975
+ "count": total_count
976
+ }
977
+
978
+ return results
979
+
980
+
794
981
  def contains_all_tags(lst: List[str], tags: List[str]) -> bool:
795
982
  """
796
983
  Checks if the given list contains all the tags passed.
@@ -807,7 +994,8 @@ def fill_query_results(term_info):
807
994
 
808
995
  if "preview" in query.keys() and (query['preview'] > 0 or query['count'] < 0) and query['count'] != 0:
809
996
  function = globals().get(query['function'])
810
-
997
+ summary_mode = query.get('output_format', 'table') == 'ribbon'
998
+
811
999
  if function:
812
1000
  # print(f"Function {query['function']} found")
813
1001
 
@@ -816,7 +1004,10 @@ def fill_query_results(term_info):
816
1004
  # print(f"Function args: {function_args}")
817
1005
 
818
1006
  # Modify this line to use the correct arguments and pass the default arguments
819
- result = function(return_dataframe=False, limit=query['preview'], **function_args)
1007
+ if summary_mode:
1008
+ result = function(return_dataframe=False, limit=query['preview'], summary_mode=summary_mode, **function_args)
1009
+ else:
1010
+ result = function(return_dataframe=False, limit=query['preview'], **function_args)
820
1011
  # print(f"Function result: {result}")
821
1012
 
822
1013
  # Filter columns based on preview_columns
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vfbquery
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: Wrapper for querying VirtualFlyBrain knowledge graph.
5
5
  Home-page: https://github.com/VirtualFlyBrain/VFBquery
6
6
  Author: VirtualFlyBrain
@@ -38,137 +38,138 @@ vfb.get_term_info('FBbt_00003748')
38
38
  ```
39
39
  ```json
40
40
  {
41
- 'Name':'medulla',
42
- 'Meta':{
43
- 'Name':'[medulla](FBbt_00003748)',
44
- 'Description':'The second optic neuropil, sandwiched between the lamina and the lobula complex. It is divided into 10 layers: 1-6 make up the outer (distal) medulla, the seventh (or serpentine) layer exhibits a distinct architecture and layers 8-10 make up the inner (proximal) medulla (Ito et al., 2014).',
45
- 'Comment':'',
46
- 'Types':'[synaptic neuropil domain](FBbt_00040007)',
47
- 'Relationships':'[develops from](RO_0002202): [medulla anlage](FBbt_00001935); [is part of](BFO_0000050): [adult optic lobe](FBbt_00003701)',
48
- 'Cross References':'![Insect Brain DB](https://insectbraindb.org/app/assets/images/Megalopta_frontal.png) [Insect Brain DB](https://insectbraindb.org/): [38](https://insectbraindb.org/app/structures/38)'
49
- },
50
- 'Id':'FBbt_00003748',
51
- 'Tags':[
52
- 'Adult',
53
- 'Nervous_system',
54
- 'Synaptic_neuropil_domain',
55
- 'Visual_system'
56
- ],
57
- 'IsClass':True,
58
- 'Queries':[
59
- {
60
- 'query':'ListAllAvailableImages',
61
- 'label':'List all available images of medulla',
62
- 'function':'get_instances',
63
- 'takes':{
64
- 'short_form':{
65
- '$and':[
66
- 'Class',
67
- 'Anatomy'
68
- ]
69
- },
70
- 'default':{
71
- 'short_form':'FBbt_00003748'
41
+ 'Name':'medulla',
42
+ 'Id':'FBbt_00003748',
43
+ 'SuperTypes':[
44
+ 'Entity',
45
+ 'Adult',
46
+ 'Anatomy',
47
+ 'Class',
48
+ 'Nervous_system',
49
+ 'Synaptic_neuropil',
50
+ 'Synaptic_neuropil_domain',
51
+ 'Visual_system'
52
+ ],
53
+ 'Meta':{
54
+ 'Name':'[medulla](FBbt_00003748)',
55
+ 'Description':'The second optic neuropil, sandwiched between the lamina and the lobula complex. It is divided into 10 layers: 1-6 make up the outer (distal) medulla, the seventh (or serpentine) layer exhibits a distinct architecture and layers 8-10 make up the inner (proximal) medulla (Ito et al., 2014).',
56
+ 'Comment':'',
57
+ 'Types':'[synaptic neuropil domain](FBbt_00040007)',
58
+ 'Relationships':'[develops from](RO_0002202): [medulla anlage](FBbt_00001935); [is part of](BFO_0000050): [adult optic lobe](FBbt_00003701)',
59
+ 'Cross References':'![Insect Brain DB](https://insectbraindb.org/app/assets/images/Megalopta_frontal.png) [Insect Brain DB](https://insectbraindb.org/): [38](https://insectbraindb.org/app/structures/38)'
60
+ },
61
+ 'Tags':[
62
+ 'Adult',
63
+ 'Nervous_system',
64
+ 'Synaptic_neuropil_domain',
65
+ 'Visual_system'
66
+ ],
67
+ 'Queries':[
68
+ {
69
+ 'query':'ListAllAvailableImages',
70
+ 'label':'List all available images of medulla',
71
+ 'function':'get_instances',
72
+ 'takes':{
73
+ 'short_form':{
74
+ '$and':[
75
+ 'Class',
76
+ 'Anatomy'
77
+ ]
78
+ },
79
+ 'default':{
80
+ 'short_form':'FBbt_00003748'
81
+ }
82
+ },
83
+ 'preview':0,
84
+ 'preview_columns':[
85
+ 'id',
86
+ 'label',
87
+ 'tags',
88
+ 'thumbnail'
89
+ ],
90
+ 'preview_results':{
91
+ 'headers':{
92
+ 'id':{
93
+ 'title':'Add',
94
+ 'type':'selection_id',
95
+ 'order':-1
96
+ },
97
+ 'label':{
98
+ 'title':'Name',
99
+ 'type':'markdown',
100
+ 'order':0,
101
+ 'sort':{
102
+ 0:'Asc'
72
103
  }
73
- },
74
- 'preview':0,
75
- 'preview_columns':[
76
- 'id',
77
- 'label',
78
- 'tags',
79
- 'thumbnail'
80
- ],
81
- 'preview_results':{
82
- 'headers':{
83
- 'id':{
84
- 'title':'Add',
85
- 'type':'selection_id',
86
- 'order':-1
87
- },
88
- 'label':{
89
- 'title':'Name',
90
- 'type':'markdown',
91
- 'order':0,
92
- 'sort':{
93
- 0:'Asc'
94
- }
95
- },
96
- 'tags':{
97
- 'title':'Gross Types',
98
- 'type':'tags',
99
- 'order':3
100
- },
101
- 'thumbnail':{
102
- 'title':'Thumbnail',
103
- 'type':'markdown',
104
- 'order':9
105
- }
106
- },
107
- 'rows':[
108
-
109
- ]
110
- },
111
- 'count':4
104
+ },
105
+ 'tags':{
106
+ 'title':'Gross Types',
107
+ 'type':'tags',
108
+ 'order':3
109
+ },
110
+ 'thumbnail':{
111
+ 'title':'Thumbnail',
112
+ 'type':'markdown',
113
+ 'order':9
114
+ }
115
+ },
116
+ 'rows':[
117
+
118
+ ]
119
+ },
120
+ 'output_format':'table',
121
+ 'count':4
122
+ }
123
+ ],
124
+ 'IsIndividual':False,
125
+ 'IsClass':True,
126
+ 'Examples':{
127
+ 'VFB_00030786':[
128
+ {
129
+ 'id':'VFB_00030810',
130
+ 'label':'medulla on adult brain template Ito2014',
131
+ 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/thumbnail.png',
132
+ 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/thumbnailT.png',
133
+ 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/volume.nrrd',
134
+ 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/volume.wlz',
135
+ 'obj':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/volume_man.obj'
112
136
  }
113
- ],
114
- 'IsTemplate':False,
115
- 'IsIndividual':False,
116
- 'SuperTypes':[
117
- 'Entity',
118
- 'Adult',
119
- 'Anatomy',
120
- 'Class',
121
- 'Nervous_system',
122
- 'Synaptic_neuropil',
123
- 'Synaptic_neuropil_domain',
124
- 'Visual_system'
125
- ],
126
- 'Examples':{
127
- 'VFB_00030786':[
128
- {
129
- 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/thumbnailT.png',
130
- 'obj':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/volume_man.obj',
131
- 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/volume.wlz',
132
- 'label':'medulla on adult brain template Ito2014',
133
- 'id':'VFB_00030810',
134
- 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/volume.nrrd',
135
- 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0003/0810/thumbnail.png'
136
- }
137
- ],
138
- 'VFB_00101567':[
139
- {
140
- 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/thumbnailT.png',
141
- 'obj':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume_man.obj',
142
- 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume.wlz',
143
- 'label':'ME on JRC2018Unisex adult brain',
144
- 'id':'VFB_00102107',
145
- 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume.nrrd',
146
- 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/thumbnail.png'
147
- }
148
- ],
149
- 'VFB_00017894':[
150
- {
151
- 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/thumbnailT.png',
152
- 'obj':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/volume_man.obj',
153
- 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/volume.wlz',
154
- 'label':'medulla on adult brain template JFRC2',
155
- 'id':'VFB_00030624',
156
- 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/volume.nrrd',
157
- 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/thumbnail.png'
158
- }
159
- ],
160
- 'VFB_00101384':[
161
- {
162
- 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/thumbnailT.png',
163
- 'obj':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/volume_man.obj',
164
- 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/volume.wlz',
165
- 'label':'ME(R) on JRC_FlyEM_Hemibrain',
166
- 'id':'VFB_00101385',
167
- 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/volume.nrrd',
168
- 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/thumbnail.png'
169
- }
170
- ]
171
- }
137
+ ],
138
+ 'VFB_00101567':[
139
+ {
140
+ 'id':'VFB_00102107',
141
+ 'label':'ME on JRC2018Unisex adult brain',
142
+ 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/thumbnail.png',
143
+ 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/thumbnailT.png',
144
+ 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume.nrrd',
145
+ 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume.wlz',
146
+ 'obj':'https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume_man.obj'
147
+ }
148
+ ],
149
+ 'VFB_00017894':[
150
+ {
151
+ 'id':'VFB_00030624',
152
+ 'label':'medulla on adult brain template JFRC2',
153
+ 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/thumbnail.png',
154
+ 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/thumbnailT.png',
155
+ 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/volume.nrrd',
156
+ 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/volume.wlz',
157
+ 'obj':'https://www.virtualflybrain.org/data/VFB/i/0003/0624/volume_man.obj'
158
+ }
159
+ ],
160
+ 'VFB_00101384':[
161
+ {
162
+ 'id':'VFB_00101385',
163
+ 'label':'ME(R) on JRC_FlyEM_Hemibrain',
164
+ 'thumbnail':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/thumbnail.png',
165
+ 'thumbnail_transparent':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/thumbnailT.png',
166
+ 'nrrd':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/volume.nrrd',
167
+ 'wlz':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/volume.wlz',
168
+ 'obj':'https://www.virtualflybrain.org/data/VFB/i/0010/1385/VFB_00101384/volume_man.obj'
169
+ }
170
+ ]
171
+ },
172
+ 'IsTemplate':False
172
173
  }
173
174
  ```
174
175
  Individual example:
@@ -305,6 +306,7 @@ vfb.get_term_info('VFB_00000001')
305
306
  }
306
307
  ]
307
308
  },
309
+ 'output_format':'table',
308
310
  'count':60
309
311
  }
310
312
  ],
@@ -1061,6 +1063,15 @@ vfb.get_templates(return_dataframe=False)
1061
1063
  }
1062
1064
  },
1063
1065
  'rows':[
1066
+ {
1067
+ 'id':'VFB_00101567',
1068
+ 'order':1,
1069
+ 'name':'[JRC2018Unisex](VFB_00101567)',
1070
+ 'tags':'Nervous_system|Adult',
1071
+ 'thumbnail':"[![JRC2018Unisex](http://www.virtualflybrain.org/data/VFB/i/0010/1567/VFB_00101567/thumbnail.png 'JRC2018Unisex')](VFB_00101567)",
1072
+ 'dataset':'[JRC 2018 templates & ROIs](JRC2018)',
1073
+ 'license':'[CC-BY-NC-SA_4.0](VFBlicense_CC_BY_NC_SA_4_0)'
1074
+ },
1064
1075
  {
1065
1076
  'id':'VFB_00200000',
1066
1077
  'order':2,
@@ -1071,30 +1082,12 @@ vfb.get_templates(return_dataframe=False)
1071
1082
  'license':'[CC-BY-NC-SA_4.0](VFBlicense_CC_BY_NC_SA_4_0)'
1072
1083
  },
1073
1084
  {
1074
- 'id':'VFB_00120000',
1075
- 'order':10,
1076
- 'name':'[Adult T1 Leg (Kuan2020)](VFB_00120000)',
1077
- 'tags':'Adult|Anatomy',
1078
- 'thumbnail':"[![Adult T1 Leg (Kuan2020)](http://www.virtualflybrain.org/data/VFB/i/0012/0000/VFB_00120000/thumbnail.png 'Adult T1 Leg (Kuan2020)')](VFB_00120000)",
1079
- 'dataset':'[Millimeter-scale imaging of a Drosophila leg at single-neuron resolution](Kuan2020)',
1080
- 'license':'[CC-BY_4.0](VFBlicense_CC_BY_4_0)'
1081
- },
1082
- {
1083
- 'id':'VFB_00110000',
1084
- 'order':9,
1085
- 'name':'[Adult Head (McKellar2020)](VFB_00110000)',
1086
- 'tags':'Adult|Anatomy',
1087
- 'thumbnail':"[![Adult Head (McKellar2020)](http://www.virtualflybrain.org/data/VFB/i/0011/0000/VFB_00110000/thumbnail.png 'Adult Head (McKellar2020)')](VFB_00110000)",
1088
- 'dataset':'[Split-GAL4 lines from McKellar et al., 2020](McKellar2020)',
1089
- 'license':'[CC-BY-SA_4.0](VFBlicense_CC_BY_SA_4_0)'
1090
- },
1091
- {
1092
- 'id':'VFB_00101567',
1093
- 'order':1,
1094
- 'name':'[JRC2018Unisex](VFB_00101567)',
1085
+ 'id':'VFB_00017894',
1086
+ 'order':3,
1087
+ 'name':'[adult brain template JFRC2](VFB_00017894)',
1095
1088
  'tags':'Nervous_system|Adult',
1096
- 'thumbnail':"[![JRC2018Unisex](http://www.virtualflybrain.org/data/VFB/i/0010/1567/VFB_00101567/thumbnail.png 'JRC2018Unisex')](VFB_00101567)",
1097
- 'dataset':'[JRC 2018 templates & ROIs](JRC2018)',
1089
+ 'thumbnail':"[![adult brain template JFRC2](http://www.virtualflybrain.org/data/VFB/i/0001/7894/VFB_00017894/thumbnail.png 'adult brain template JFRC2')](VFB_00017894)",
1090
+ 'dataset':'[FlyLight - GMR GAL4 collection (Jenett2012)](Jenett2012)',
1098
1091
  'license':'[CC-BY-NC-SA_4.0](VFBlicense_CC_BY_NC_SA_4_0)'
1099
1092
  },
1100
1093
  {
@@ -1106,15 +1099,6 @@ vfb.get_templates(return_dataframe=False)
1106
1099
  'dataset':'[JRC_FlyEM_Hemibrain painted domains](Xu2020roi)',
1107
1100
  'license':'[CC-BY_4.0](VFBlicense_CC_BY_4_0)'
1108
1101
  },
1109
- {
1110
- 'id':'VFB_00100000',
1111
- 'order':7,
1112
- 'name':'[adult VNS template - Court2018](VFB_00100000)',
1113
- 'tags':'Nervous_system|Adult|Ganglion',
1114
- 'thumbnail':"[![adult VNS template - Court2018](http://www.virtualflybrain.org/data/VFB/i/0010/0000/thumbnail.png 'adult VNS template - Court2018')](VFB_00100000)",
1115
- 'dataset':'[Adult VNS neuropils (Court2017)](Court2017)',
1116
- 'license':'[CC-BY-SA_4.0](VFBlicense_CC_BY_SA_4_0)'
1117
- },
1118
1102
  {
1119
1103
  'id':'VFB_00050000',
1120
1104
  'order':5,
@@ -1142,6 +1126,15 @@ vfb.get_templates(return_dataframe=False)
1142
1126
  'dataset':'[L3 Larval CNS Template (Truman2016)](Truman2016)',
1143
1127
  'license':'[CC-BY-SA_4.0](VFBlicense_CC_BY_SA_4_0)'
1144
1128
  },
1129
+ {
1130
+ 'id':'VFB_00100000',
1131
+ 'order':7,
1132
+ 'name':'[adult VNS template - Court2018](VFB_00100000)',
1133
+ 'tags':'Nervous_system|Adult|Ganglion',
1134
+ 'thumbnail':"[![adult VNS template - Court2018](http://www.virtualflybrain.org/data/VFB/i/0010/0000/thumbnail.png 'adult VNS template - Court2018')](VFB_00100000)",
1135
+ 'dataset':'[Adult VNS neuropils (Court2017)](Court2017)',
1136
+ 'license':'[CC-BY-SA_4.0](VFBlicense_CC_BY_SA_4_0)'
1137
+ },
1145
1138
  {
1146
1139
  'id':'VFB_00030786',
1147
1140
  'order':8,
@@ -1152,13 +1145,22 @@ vfb.get_templates(return_dataframe=False)
1152
1145
  'license':'[CC-BY-SA_4.0](VFBlicense_CC_BY_SA_4_0)'
1153
1146
  },
1154
1147
  {
1155
- 'id':'VFB_00017894',
1156
- 'order':3,
1157
- 'name':'[adult brain template JFRC2](VFB_00017894)',
1158
- 'tags':'Nervous_system|Adult',
1159
- 'thumbnail':"[![adult brain template JFRC2](http://www.virtualflybrain.org/data/VFB/i/0001/7894/VFB_00017894/thumbnail.png 'adult brain template JFRC2')](VFB_00017894)",
1160
- 'dataset':'[FlyLight - GMR GAL4 collection (Jenett2012)](Jenett2012)',
1161
- 'license':'[CC-BY-NC-SA_4.0](VFBlicense_CC_BY_NC_SA_4_0)'
1148
+ 'id':'VFB_00110000',
1149
+ 'order':9,
1150
+ 'name':'[Adult Head (McKellar2020)](VFB_00110000)',
1151
+ 'tags':'Adult|Anatomy',
1152
+ 'thumbnail':"[![Adult Head (McKellar2020)](http://www.virtualflybrain.org/data/VFB/i/0011/0000/VFB_00110000/thumbnail.png 'Adult Head (McKellar2020)')](VFB_00110000)",
1153
+ 'dataset':'[Split-GAL4 lines from McKellar et al., 2020](McKellar2020)',
1154
+ 'license':'[CC-BY-SA_4.0](VFBlicense_CC_BY_SA_4_0)'
1155
+ },
1156
+ {
1157
+ 'id':'VFB_00120000',
1158
+ 'order':10,
1159
+ 'name':'[Adult T1 Leg (Kuan2020)](VFB_00120000)',
1160
+ 'tags':'Adult|Anatomy',
1161
+ 'thumbnail':"[![Adult T1 Leg (Kuan2020)](http://www.virtualflybrain.org/data/VFB/i/0012/0000/VFB_00120000/thumbnail.png 'Adult T1 Leg (Kuan2020)')](VFB_00120000)",
1162
+ 'dataset':'[Millimeter-scale imaging of a Drosophila leg at single-neuron resolution](Kuan2020)',
1163
+ 'license':'[CC-BY_4.0](VFBlicense_CC_BY_4_0)'
1162
1164
  }
1163
1165
  ],
1164
1166
  'count':10
@@ -0,0 +1,10 @@
1
+ test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ test/term_info_queries_test.py,sha256=w982rbxOb0wx8azWc_vUk4q3LXsfn_SKSJVXoxceqPk,39530
3
+ vfbquery/__init__.py,sha256=KPkQWJsiUtew3IrygX17djJJfCxJtqw3cy3rB-e3cL4,28
4
+ vfbquery/term_info_queries.py,sha256=3y346po7tSgneeV38-kRl_kmjffR3Uv1WMYGy8fmekk,39184
5
+ vfbquery/vfb_queries.py,sha256=40lNwiewlsaBxBX2u8tM0ijrTfgBLFQs2fD5ZbJMi6E,49654
6
+ vfbquery-0.2.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
+ vfbquery-0.2.9.dist-info/METADATA,sha256=xyyYjkTpyf6C39u1wl8UjQlVM0Mg1r9mRCqcXFU3c0c,43892
8
+ vfbquery-0.2.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
9
+ vfbquery-0.2.9.dist-info/top_level.txt,sha256=UgaRTTOy4JBdKbkr_gkeknT4eaibm3ztF520G4NTQZs,14
10
+ vfbquery-0.2.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- test/term_info_queries_test.py,sha256=w982rbxOb0wx8azWc_vUk4q3LXsfn_SKSJVXoxceqPk,39530
3
- vfbquery/__init__.py,sha256=KPkQWJsiUtew3IrygX17djJJfCxJtqw3cy3rB-e3cL4,28
4
- vfbquery/term_info_queries.py,sha256=3y346po7tSgneeV38-kRl_kmjffR3Uv1WMYGy8fmekk,39184
5
- vfbquery/vfb_queries.py,sha256=MIQfkSRr80PoQAwBk395kdu5GAAbUkJIBDyUr8AgrHU,40852
6
- vfbquery-0.2.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
7
- vfbquery-0.2.7.dist-info/METADATA,sha256=y40-lI9KajwgminblTYMczcEzw_xjZ5Rxckv7nUi7EA,44281
8
- vfbquery-0.2.7.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
9
- vfbquery-0.2.7.dist-info/top_level.txt,sha256=UgaRTTOy4JBdKbkr_gkeknT4eaibm3ztF520G4NTQZs,14
10
- vfbquery-0.2.7.dist-info/RECORD,,