Skip to main content

Metrics for evaluating biological sequence generation models.

Project description

seqme logo

PyPI Python 3.10+ License Read the Docs

seqme is a modular and highly extendable python library containing model-agnostic metrics for evaluating biological sequences.

Installation

You need to have Python 3.10 or newer installed on your system. To install the base package do:

$ pip install seqme

To also install domain-specific models, add extras specifiers. Read the docs for more information on the supported models.

Quick start

Install seqme and the protein language model, ESM-2.

$ pip install seqme[esm2]

Run in a Jupyter notebook:

import seqme as sm

sequences = {
    "Random": ["MKQW", "RKSPL"],
    "UniProt": ["KKWQ", "RKSPL", "RASD"],
    "HydrAMP": ["MMRK", "RKSPL", "RRLSK", "RRLSK"],
}

cache = sm.ModelCache(
    models={"esm2": sm.models.Esm2(
        model_name="facebook/esm2_t6_8M_UR50D", batch_size=256, device="cpu")
    }
)

metrics = [
    sm.metrics.Uniqueness(),
    sm.metrics.Novelty(reference=sequences["UniProt"], reference_name="UniProt"),
    sm.metrics.FBD(reference=sequences["Random"], embedder=cache.model("esm2")),
]

df = sm.compute_metrics(sequences, metrics)
sm.show_table(df) # Note: Will only display the table in a notebook.

Read the docs for more tutorials and examples.

Citation

Preprint is coming soon.

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

seqme-0.1.0.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

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

seqme-0.1.0-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

Details for the file seqme-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for seqme-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d9876506a48e368138cf586911da63b81800d38eb59e1fa6cb3aa357909d562
MD5 bd92ff1140fcb927d00257bd981b0e04
BLAKE2b-256 d2bb5a01b05414b5caae89191cfaebfda0e97f3276dd462f88357151a21c2cff

See more details on using hashes here.

Provenance

The following attestation bundles were made for seqme-0.1.0.tar.gz:

Publisher: release.yml on szczurek-lab/seqme

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

File details

Details for the file seqme-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: seqme-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for seqme-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf949bd97320e998e77a06611a78ed05913b4f38be1f04709dd858d467e8dc62
MD5 7ef54d90b4a7ce3c476fb50b06d029c3
BLAKE2b-256 91ef9a2b4cf1a8408bb1fd33afb7e5df443200465ba4a3b2deb688f4dcf91cce

See more details on using hashes here.

Provenance

The following attestation bundles were made for seqme-0.1.0-py3-none-any.whl:

Publisher: release.yml on szczurek-lab/seqme

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