:mod:`neuron_morphology.snap_polygons._from_lims` ================================================= .. py:module:: neuron_morphology.snap_polygons._from_lims .. autoapi-nested-parse:: This module contains utilities for running snap_polygons directly from the Allen Institute's internal Laboratory Information Management System. Example Usage ------------- python -m neuron_morphology.snap_polygons --host --port --user --password --database --focal_plane_image_series_id 522408212 # for instance --image_output_root /some_directory .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: neuron_morphology.snap_polygons._from_lims.PostgresInputConfigSchema neuron_morphology.snap_polygons._from_lims.FromLimsSchema neuron_morphology.snap_polygons._from_lims.FromLimsSource Functions ~~~~~~~~~ .. autoapisummary:: neuron_morphology.snap_polygons._from_lims.query_for_layer_polygons neuron_morphology.snap_polygons._from_lims.query_for_cortical_surfaces neuron_morphology.snap_polygons._from_lims.query_for_images neuron_morphology.snap_polygons._from_lims.query_for_image_dims neuron_morphology.snap_polygons._from_lims.get_inputs_from_lims .. data:: QueryEngineType .. function:: query_for_layer_polygons(query_engine: QueryEngineType, focal_plane_image_series_id: int, validate_polys: bool = True, treatment: str = 'Biocytin') -> List[Dict[str, Union[NicePathType, str]]] Get all layer polygons for this image series :Parameters: **query_engine** : executes a query, passed in as a string. Must not require any additional database information. **focal_plane_image_series_id** : used to determine which polygons to fetch .. **validate_polys** : if True, fail when - a label is associated with multiple distinct valid geometries - a label is associated with one or more geometries, but none are valid **treatment: The layer polygons are associated with Biocytin and DAPI** treatments. We only need one. :Returns: A collection of labelled polygons. .. .. !! processed by numpydoc !! .. function:: query_for_cortical_surfaces(query_engine: QueryEngineType, focal_plane_image_series_id: int) -> Tuple[Dict[str, Union[NicePathType, str]], Dict[str, Union[NicePathType, str]]] Return the pia and white matter surface drawings for this image series .. !! processed by numpydoc !! .. function:: query_for_images(query_engine: QueryEngineType, focal_plane_image_series_id: int, output_dir: str) -> List[Dict[str, str]] Return Biocytin and DAPI images associated with a focal plane image series .. !! processed by numpydoc !! .. function:: query_for_image_dims(query_engine: QueryEngineType, focal_plane_image_series_id: int) -> Tuple[float, float] Find the dimensions of the Biocytin image associated with a focal plane image series .. !! processed by numpydoc !! .. function:: get_inputs_from_lims(host: str, port: int, database: str, user: str, password: str, imser_id: int, image_output_root: Optional[str]) Utility for building module inputs from a direct LIMS query .. !! processed by numpydoc !! .. py:class:: PostgresInputConfigSchema(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None) Bases: :class:`marshmallow.Schema` The parameters required to query a postgres database. .. !! processed by numpydoc !! .. attribute:: host .. attribute:: database .. attribute:: user .. attribute:: password .. attribute:: port .. py:class:: FromLimsSchema(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None) Bases: :class:`neuron_morphology.snap_polygons._from_lims.PostgresInputConfigSchema` The parameters required to query LIMS for a set of cortical layer polygons and cortical surface boundaries. .. !! processed by numpydoc !! .. attribute:: focal_plane_image_series_id .. attribute:: image_output_root .. py:class:: FromLimsSource Bases: :class:`argschema.sources.ArgSource` An alternate argschema source which gets its inputs from lims directly .. !! processed by numpydoc !! .. attribute:: ConfigSchema .. method:: get_dict(self)