Skip to main content

A general purpose library for interacting with Clarity LIMS

Project description

https://travis-ci.com/SemaphoreSolutions/s4-clarity-lib.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

Project details


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.1.1.tar.gz (65.4 kB view details)

Uploaded Source

Built Distribution

s4_clarity-1.1.1-py2.py3-none-any.whl (90.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file s4-clarity-1.1.1.tar.gz.

File metadata

  • Download URL: s4-clarity-1.1.1.tar.gz
  • Upload date:
  • Size: 65.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/2.7.15

File hashes

Hashes for s4-clarity-1.1.1.tar.gz
Algorithm Hash digest
SHA256 7ae17064f80aefd6469ccd75c235af61e6bc9a7e6f2dc9d5918edc88907788cd
MD5 25f5119373a5fa8f9a9cb29b57e77c8b
BLAKE2b-256 ede2fb8982641b82d85e1c4452c7c23b5d0437f8a74db8fdcca930a36f4d7c8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: s4_clarity-1.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 90.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/2.7.15

File hashes

Hashes for s4_clarity-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bfefccc15c9657c25823896bffc2b82e5300da97f2209b73f5d1a4f197a06a22
MD5 ff5e6db6769ad32a7a83a6fbc46d854c
BLAKE2b-256 795527c006c584837c96b0ca9e92554a136a2fb0a6008f135255974f881dcbc9

See more details on using hashes here.

Supported by

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