Skip to main content

A general purpose library for interacting with Clarity LIMS

Project description

https://github.com/SemaphoreSolutions/s4-clarity-lib/actions/workflows/ci.yml/badge.svg?branch=master
Used in numerous labs around the world, the S4-Clarity library provides an easy-to-use integration with the BaseSpace Clarity LIMS API. The package includes:
  • Classes representing familiar Clarity API entities that provide read-write access to most properties.

  • Helper methods that simplify common operations.

  • Base classes for scripts that integrate with Clarity: EPPs, DSAs, and shell scripts.

  • Utilities that help with Clarity-related tasks, such as managing config slices, or automating the completion of a Step.

The S4-Clarity library lets developers interact with the Clarity API in fewer lines of code. With HTTP and XML boilerplate out of the way, you’ll have your integration built in no time at all.

from s4.clarity.scripts import TriggeredStepEPP

LibraryVolume = 2.0
MolWeightBasePair = 660 * 1e6  # micrograms / mol
AssumedBasePairs = 400.0
TargetMolarity = 4.0
Overage = 4


class Normalization (TriggeredStepEPP):
    def on_record_details_enter(self):
        self.prefetch(self.PREFETCH_INPUTS, self.PREFETCH_OUTPUTS)

        for iomap in self.step.details.iomaps:
            library_concentration = iomap.input["Concentration"]
            library_molarity = library_concentration / (AssumedBasePairs * MolWeightBasePair)
            iomap.output["Concentration"] = library_concentration
            iomap.output["Molarity (nM)"] = library_molarity
            iomap.output["Library Vol (uL)"] = LibraryVolume
            iomap.output["Tris HCl (uL)"] = LibraryVolume * (library_molarity / TargetMolarity - 1)

        self.lims.artifacts.batch_update(self.step.details.outputs)


if __name__ == "__main__":
    Normalization.main()

Installation

To install s4-clarity, simply use pip:

$ pip install s4-clarity

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

s4_clarity-1.8.0.tar.gz (72.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

s4_clarity-1.8.0-py2.py3-none-any.whl (95.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file s4_clarity-1.8.0.tar.gz.

File metadata

  • Download URL: s4_clarity-1.8.0.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for s4_clarity-1.8.0.tar.gz
Algorithm Hash digest
SHA256 d321ee80f55dd96bb0dfa66815b86a9612febacb81307fd80f1ad9ff9534adcb
MD5 3c5e7ce4c0dd04c317ed0ce42bae4339
BLAKE2b-256 7615c6f0091b1a2f8e8bd6d2fd4b481cbac3b5b10c44232f9f432ba95b16efe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for s4_clarity-1.8.0.tar.gz:

Publisher: cd.yml on SemaphoreSolutions/s4-clarity-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file s4_clarity-1.8.0-py2.py3-none-any.whl.

File metadata

  • Download URL: s4_clarity-1.8.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 95.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for s4_clarity-1.8.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7cd0880dcd6ca6042cf7a8b1167032731ae87c929ed04ddeed47a26098bdabf2
MD5 cfab30927b776425aadc7c1d30672799
BLAKE2b-256 15afc374e83562f3f6b52d988f0020c7fc41ef8a5be4b35aaff378e1ec6bdc23

See more details on using hashes here.

Provenance

The following attestation bundles were made for s4_clarity-1.8.0-py2.py3-none-any.whl:

Publisher: cd.yml on SemaphoreSolutions/s4-clarity-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page