vfbquery 0.5.1__tar.gz → 0.5.2__tar.gz
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-0.5.1/src/vfbquery.egg-info → vfbquery-0.5.2}/PKG-INFO +1 -1
- {vfbquery-0.5.1 → vfbquery-0.5.2}/setup.py +1 -1
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/term_info_queries_test.py +7 -4
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/__init__.py +1 -1
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/vfb_queries.py +31 -13
- {vfbquery-0.5.1 → vfbquery-0.5.2/src/vfbquery.egg-info}/PKG-INFO +1 -1
- {vfbquery-0.5.1 → vfbquery-0.5.2}/LICENSE +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/README.md +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/pyproject.toml +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/setup.cfg +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/__init__.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/readme_parser.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_dataset_template_queries.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_default_caching.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_examples_code.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_examples_diff.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_expression_overlaps.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_expression_pattern_fragments.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_images_neurons.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_images_that_develop_from.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_lineage_clones_in.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_nblast_queries.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_neuron_classes_fasciculating.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_neuron_inputs.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_neuron_neuron_connectivity.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_neuron_region_connectivity.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_neurons_part_here.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_new_owlery_queries.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_publication_transgene_queries.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_query_performance.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_similar_morphology.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_tracts_nerves_innervating.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/test/test_transcriptomics.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/cache_enhancements.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/cached_functions.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/neo4j_client.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/owlery_client.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/solr_cache_integration.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/solr_fetcher.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/solr_result_cache.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/term_info_queries.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery/test_utils.py +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery.egg-info/SOURCES.txt +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery.egg-info/dependency_links.txt +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery.egg-info/requires.txt +0 -0
- {vfbquery-0.5.1 → vfbquery-0.5.2}/src/vfbquery.egg-info/top_level.txt +0 -0
|
@@ -70,7 +70,7 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
70
70
|
|
|
71
71
|
self.assertEqual(0, len(terminfo.xrefs))
|
|
72
72
|
|
|
73
|
-
self.assertEqual(
|
|
73
|
+
self.assertEqual(8, len(terminfo.pub_syn))
|
|
74
74
|
|
|
75
75
|
# Check that we have the expected synonym labels (order-independent)
|
|
76
76
|
synonym_labels = [entry.synonym.label for entry in terminfo.pub_syn]
|
|
@@ -151,7 +151,7 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
151
151
|
self.assertFalse("link" in serialized)
|
|
152
152
|
self.assertEqual(4, len(serialized["types"]))
|
|
153
153
|
self.assertTrue("Anatomy" in serialized["types"])
|
|
154
|
-
self.assertEqual("Cyst composed of two cyst cells following the division of a newly-formed cystoblast in the germarium. The two cells are connected by a cytoplasmic bridge.\n([King, 1970](FBrf0021038))", serialized["description"])
|
|
154
|
+
self.assertEqual("Cyst composed of two cyst cells following the division of a newly-formed cystoblast in the germarium. The two cells are connected by a cytoplasmic bridge.\n([Spradling, 1993](FBrf0064777), [King, 1970](FBrf0021038))", serialized["description"])
|
|
155
155
|
self.assertTrue("synonyms" in serialized)
|
|
156
156
|
self.assertEqual(1, len(serialized["synonyms"]))
|
|
157
157
|
self.assertEqual("has_exact_synonym: germarial 2-cell cluster ([King, 1970](FBrf0021038))", serialized["synonyms"][0])
|
|
@@ -172,10 +172,13 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
172
172
|
self.assertFalse("examples" in serialized)
|
|
173
173
|
self.assertFalse("thumbnail" in serialized)
|
|
174
174
|
self.assertTrue("references" in serialized)
|
|
175
|
-
self.assertEqual(
|
|
175
|
+
self.assertEqual(2, len(serialized["references"]))
|
|
176
|
+
self.assertEqual({'link': '[Spradling, 1993, Bate, Martinez Arias, 1993: 1--70](FBrf0064777)',
|
|
177
|
+
'refs': ['http://flybase.org/reports/FBrf0064777'],
|
|
178
|
+
'types': ' pub'}, serialized["references"][0])
|
|
176
179
|
self.assertEqual({'link': '[King, 1970, Ovarian Development in Drosophila melanogaster. ](FBrf0021038)',
|
|
177
180
|
'refs': ['http://flybase.org/reports/FBrf0021038'],
|
|
178
|
-
'types': ' pub'}, serialized["references"][
|
|
181
|
+
'types': ' pub'}, serialized["references"][1])
|
|
179
182
|
self.assertFalse("targetingSplits" in serialized)
|
|
180
183
|
self.assertFalse("targetingNeurons" in serialized)
|
|
181
184
|
|
|
@@ -3087,19 +3087,37 @@ def _owlery_query_to_results(owl_query_string: str, short_form: str, return_data
|
|
|
3087
3087
|
owlery_url = f"{owlery_base}{endpoint}?{urlencode(params)}"
|
|
3088
3088
|
|
|
3089
3089
|
import sys
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3090
|
+
import requests
|
|
3091
|
+
|
|
3092
|
+
# Check if this is a 400 Bad Request (invalid query) vs other errors
|
|
3093
|
+
is_bad_request = isinstance(e, requests.exceptions.HTTPError) and hasattr(e, 'response') and e.response.status_code == 400
|
|
3094
|
+
|
|
3095
|
+
if is_bad_request:
|
|
3096
|
+
# 400 Bad Request means the term isn't valid for this type of query (e.g., anatomical query on expression pattern)
|
|
3097
|
+
# Return 0 results instead of error
|
|
3098
|
+
print(f"INFO: Owlery query returned 400 Bad Request (invalid for this term type): {owl_query_string}", file=sys.stderr)
|
|
3099
|
+
if return_dataframe:
|
|
3100
|
+
return pd.DataFrame()
|
|
3101
|
+
return {
|
|
3102
|
+
"headers": _get_standard_query_headers(),
|
|
3103
|
+
"rows": [],
|
|
3104
|
+
"count": 0
|
|
3105
|
+
}
|
|
3106
|
+
else:
|
|
3107
|
+
# Other errors (500, network issues, etc.) - return error indication
|
|
3108
|
+
print(f"ERROR: Owlery {'instances' if query_instances else 'subclasses'} query failed: {e}", file=sys.stderr)
|
|
3109
|
+
print(f" Full URL: {owlery_url}", file=sys.stderr)
|
|
3110
|
+
print(f" Query string: {owl_query_string}", file=sys.stderr)
|
|
3111
|
+
import traceback
|
|
3112
|
+
traceback.print_exc()
|
|
3113
|
+
# Return error indication with count=-1
|
|
3114
|
+
if return_dataframe:
|
|
3115
|
+
return pd.DataFrame()
|
|
3116
|
+
return {
|
|
3117
|
+
"headers": _get_standard_query_headers(),
|
|
3118
|
+
"rows": [],
|
|
3119
|
+
"count": -1
|
|
3120
|
+
}
|
|
3103
3121
|
|
|
3104
3122
|
|
|
3105
3123
|
def get_anatomy_scrnaseq(anatomy_short_form: str, return_dataframe=True, limit: int = -1):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|