aplbrain/dotmotif

Filtering By Properties w/ Invalid Characters in the Name

simonwarchol opened this issue · 6 comments

Hey There,
I'm using dotmotif to query the neuPrint dataset and have found some of the neurons have properties that aren't accepted in the query string format
e.g. 'AVLP(R)': True,

Is there a way to still query w/ these params?
I tried adding directly to the _node_constraints but that doesn't seem to work either e.g.

motif._node_constraints['A']['AVLP(R)'] = {}
motif._node_constraints['A']['AVLP(R)']['='] = [True]

Variable `R` not defined (line 2, column 83 (offset: 156))
"    WHERE B.status = "Traced" AND A.status = "Orphan" AND A.INP = True AND A.AVLP(R) = True"

Hi @simonwarchol — thank you so much for reporting this! I will work on a fix for this ASAP.

Would it be acceptable to use 'index-bracket' style notation?

A -> B
A['AVLP(R)'] = true

Open to other suggestions!

Hey @j6k4m8,
Yep -- that's the first thing I tried, so it's probably the most intuitive way to do it.
Really appreciate it! The framework is really impressive :)
-Simon

@simonwarchol I just pushed a new update (dotmotif==0.11.0) to PyPI and it should be installable with:

pip3 install -U dotmotif

Let me know if you're able to use the bracket syntax to execute your commands successfully now?

An example of the syntax in use is here!

Rad -- really appreciate it. Will test in the morning.
-Simon

Looks great. Ty again

Super awesome! Excited to see what you discover :)