-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation about the Python API? #175
Comments
The Python API is generated from the underlying RDF. For each class, the constructor has a positional argument for the display_id (as you note) and named parameters for all other properties of the object. These are defined in the labop.ttl and the uml.ttl files.
The ContainerSpec class is going to be changing as we update the spec. It currently is used to encapsulate a query for the container ontology (OWL). However, we are planning to drop it back to a string that describes the container. This string can be anything, but will be used by various execution environments to identify containers and the container geometry.
… On Nov 4, 2022, at 12:39 AM, mszulcz-mitre ***@***.***> wrote:
I can't seem to find much documentation about the Python API. I looked in this repo and in the PAML-specification repo, but I didn't see anything. Am I missing it? Here's some examples of the type of information I'm looking for:
• I can't find info. about which properties are arguments to class constructors. From the Google Colab notebook, I can see that the constructor for the Protocol class takes an argument:
protocol = labop.Protocol('iGEM_LUDOX_OD_calibration_2018')
Is this argument the displayId parameter described in the PAML specification?
• I can't find info about the input_value method for the Protocol class. From the Google Colab notebook, I can guess what the arguments and their order should be, but it'd be useful to confirm my understanding.
• I don't understand how to call the ContainerSpec constructor. Here's the call in the Colab notebook:
PLATE_SPECIFICATION =
\
"""cont:ClearPlate and
cont:SLAS-4-2004 and
(cont:wellVolume some
((om:hasUnit value om:microlitre) and
(om:hasNumericalValue only xsd:decimal[>= "200"^^xsd:decimal])))"""
CONT_NS = rdfl.Namespace('https://sift.net/container-ontology/container-ontology#'
)
OM_NS = rdfl.Namespace('http://www.ontology-of-units-of-measure.org/resource/om-2/'
)
PREFIX_MAP = json.dumps({"cont": CONT_NS, "om": OM_NS
})
spec = labop.ContainerSpec("calibration_plate", queryString=PLATE_SPECIFICATION, prefixMap=PREFIX_MAP, name='plateRequirement')
Is there documentation that describes how to invoke the constructor for different containers? In particular, it's not clear to me how to define the PLATE_SPECIFICATION.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't seem to find much documentation about the Python API. I looked in this repo and in the PAML-specification repo, but I didn't see anything. Am I missing it? Here's some examples of the type of information I'm looking for:
Is this argument the
displayId
parameter described in the PAML specification?I can't find info about the
input_value
method for the Protocol class. From the Google Colab notebook, I can guess what the arguments and their order should be, but it'd be useful to confirm my understanding.I don't understand how to call the
ContainerSpec
constructor. Here's the call in the Colab notebook:Is there documentation that describes how to invoke the constructor for different containers? In particular, it's not clear to me how to define the
PLATE_SPECIFICATION
.The text was updated successfully, but these errors were encountered: