Skip to main content

Python wrapper for FPBase API

Project description

fpbasepy

License PyPI Python Version CI codecov

Python wrapper for FPBase.org GraphQL API.

See https://www.fpbase.org/graphql for full documentation on the graphql schema and an interactive playground.

This library provides simple Python access to commonly-accessed data.

In [1]: from fpbase import get_fluorophore, get_microscope

In [2]: print(get_fluorophore("mCherry"))
Fluorophore(
    name='mCherry',
    id='ZERB6',
    states=[
        State(
            id=336,
            exMax=587.0,
            emMax=610.0,
            emhex='#f70000',
            exhex='#ff4600',
            extCoeff=72000.0,
            qy=0.22,
            spectra=[Spectrum(subtype='EX'), Spectrum(subtype='EM'), Spectrum(subtype='A_2P')],
            lifetime=1.4
        )
    ],
    defaultState=336
)

In [3]: print(get_fluorophore("DAPI"))
Fluorophore(
    name='DAPI',
    id='15',
    states=[
        State(
            id=15,
            exMax=359.0,
            emMax=461.0,
            emhex='',
            exhex='',
            extCoeff=None,
            qy=None,
            spectra=[Spectrum(subtype='AB'), Spectrum(subtype='EX'), Spectrum(subtype='EM')],
            lifetime=None
        )
    ],
    defaultState=None
)

In [4]: print(get_microscope("i6WL2W"))
Microscope(
    id='i6WL2WdgcDMgJYtPrpZcaJ',
    name='Example Widefield (Sedat)',
    opticalConfigs=[
        OpticalConfig(
            name='Widefield Blue',
            filters=[
                FilterPlacement(name='Chroma ET395/25x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma T425lpxr', spectrum=Spectrum(subtype='LP'), path='BS', reflects=False),
                FilterPlacement(name='Chroma ET460/50m', spectrum=Spectrum(subtype='BM'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Dual FRET',
            filters=[
                FilterPlacement(name='Lumencor 470/24x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 59022bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Semrock FF02-641/75', spectrum=Spectrum(subtype='BP'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Dual Green',
            filters=[
                FilterPlacement(name='Lumencor 470/24x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 59022bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Semrock FF03-525/50', spectrum=Spectrum(subtype='BP'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Dual Red',
            filters=[
                FilterPlacement(name='Lumencor 575/25x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 59022bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Semrock FF02-641/75', spectrum=Spectrum(subtype='BP'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Far-Red',
            filters=[
                FilterPlacement(name='Chroma ET640/30x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma T660lpxr', spectrum=Spectrum(subtype='LP'), path='BS', reflects=False),
                FilterPlacement(name='Semrock FF01-698/70', spectrum=Spectrum(subtype='BP'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Triple Cyan',
            filters=[
                FilterPlacement(name='Lumencor 440/20x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 69008bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Chroma ET470/24m', spectrum=Spectrum(subtype='BM'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Triple FRET',
            filters=[
                FilterPlacement(name='Lumencor 440/20x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 69008bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Chroma ET535/30m', spectrum=Spectrum(subtype='BM'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Triple Red',
            filters=[
                FilterPlacement(name='Lumencor 575/25x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 69008bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Semrock FF02-641/75', spectrum=Spectrum(subtype='BP'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        ),
        OpticalConfig(
            name='Widefield Triple Yellow',
            filters=[
                FilterPlacement(name='Chroma ET500/20x', spectrum=Spectrum(subtype='BX'), path='EX', reflects=False),
                FilterPlacement(name='Chroma 69008bs', spectrum=Spectrum(subtype='BS'), path='BS', reflects=False),
                FilterPlacement(name='Chroma ET535/30m', spectrum=Spectrum(subtype='BM'), path='EM', reflects=False)
            ],
            camera=SpectrumOwner(name='Andor Zyla 4.2 PLUS', spectrum=Spectrum(subtype='QE')),
            light=SpectrumOwner(name='SOLA 395', spectrum=Spectrum(subtype='PD')),
            laser=None
        )
    ]
)

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

fpbase-0.0.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

fpbase-0.0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file fpbase-0.0.1.tar.gz.

File metadata

  • Download URL: fpbase-0.0.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fpbase-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ea03930bb435375b21ede83719329f52d86bb294e97e4d25d3a73d7c5101e06c
MD5 3486e17c8357f2d42d8d314efc0825aa
BLAKE2b-256 a938a92917dbb3251dec11aa7f1d0818476dbaf693a694300f53131e274fa0c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fpbase-0.0.1.tar.gz:

Publisher: ci.yml on tlambert03/fpbasepy

Attestations:

File details

Details for the file fpbase-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fpbase-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fpbase-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0652942fcef2a47c717096a73c9ff0ce1c96069c7a376dfcc6e91ddab475553
MD5 25d05d36d9eeffe56061627156d82b5d
BLAKE2b-256 7d1c519ca1fd3d0f2d8cb4b4d58bbd576048ec31dcb73ebd4bcfdf7431e4f2cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for fpbase-0.0.1-py3-none-any.whl:

Publisher: ci.yml on tlambert03/fpbasepy

Attestations:

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