Skip to main content

Metamist

codecov

Introduction

Metamist is a database designed for storing de-identified -omics metadata.

Purpose

The project provides an interface to interact with the -omics database via the Python client as well as the GraphQL + HTTP APIs.

Features

  • Project-Based Resource Organization: Every resource in Metamist is associated with a specific project.
  • Access Control: Access to resources is controlled through a basic permissions system. Users can have one of the following permissions for a project.
    • reader permission allows viewing of all metadata within a project
    • contributor permission allows creating comments on metadata within a project
    • writer permission allows writing of all metadata within a project.

High-Level Architecture

It comprises three key components:

  1. System-Versioned MariaDB Database: A robust database system for managing -omics metadata.

  2. Python Web API: This component is responsible for:

    • Managing permissions.
    • Storing frequently used queries.
    • Providing a GraphQL/HTTP API for efficient querying of the database.
  3. Installable Python Library: Wraps the Python Web API using the OpenAPI generator, facilitating easier interaction with the system.

  4. Web client UI A react application that allows viewing the metadata for projects.

Usage

There are a few different ways that you may need to interact with metamist.

Working with production metamist data

If you only need to interact with production metamist data, then you do not need to clone this repository or have a working local installation of metamist. You can install the python client from pypi:

pip install metamist

And use it in your python scripts:

from metamist.graphql import gql, query

def main():
    my_query = gql("""
        {
            myProjects {
                id
                name
            }
        }
    """)

    result = query(my_query)
    print(result)


if __name__ == "__main__":
    main()

Further resources

Testing scripts against a local database

When writing more complex scripts it is a good idea to test them against a local version of metamist. To do this, follow the local installation instructions to set up the API. Setting up the web client is optional and only necessary if you need to view your data in the UI.

Once you have the API set up locally, set the SM_ENVIRONMENT variable to local

export SM_ENVIRONMENT=local

This will tell the metamist python client to point to your local metamist install.

Developing or contributing to metamist

If you are working on developing features, fixing bugs or want to contribute to metamist in other ways then you will need a local installation of metamist. Follow the local installation instructions.

Schema

As of Jan 15, 2024 this schema should reflect the data structure on the tables:

Database Structure

You can also find this at DbDiagram.

The codebase contains the following modules worth noting:

  • models -> General data models + enums
  • db/python/tables -> Interaction with MariaDB / BigQuery
  • db/python/layers -> Logic
  • api/graphql : GraphQL API schema and models
  • api/routes: HTTP + OpenAPI

And metamist maintains two clients:

  • web -> React app that consumes a generated Typescript API + GraphQL
  • metamist -> autogenerated Python API

License

This project is licensed under the MIT License. You can see it in the LICENSE file in the root directory of this source tree.

Download files

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

Source Distribution

metamist-7.14.3.tar.gz (159.6 kB view details)

Uploaded Source

File details

Details for the file metamist-7.14.3.tar.gz.

File metadata

  • Download URL: metamist-7.14.3.tar.gz
  • Upload date:
  • Size: 159.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for metamist-7.14.3.tar.gz
Algorithm Hash digest
SHA256 b4c35b72bc2745e9851fd5ffcf774cac94d0ac42628f2b35f82b8966cb09739c
MD5 b79be473ea0b4c508162e1b6f207f8d3
BLAKE2b-256 16eac26d0c97c86ab5c7a6f8fc5b1b26c2539b3b3434bc6e64a79a83c6b47089

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamist-7.14.3.tar.gz:

Publisher: deploy.yaml on populationgenomics/metamist

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

Release history Release notifications | RSS feed

This release

7.14.3 This release

1 file

7.14.2

1 file

7.14.1

1 file

7.14.0

1 file

7.13.4

1 file

7.13.3

1 file

7.13.2

1 file

7.13.1

1 file

7.13.0

1 file

7.12.0

1 file

7.11.2

1 file

7.11.1

1 file

7.11.0

1 file

7.10.3

1 file

7.10.2

1 file

7.10.1

1 file

7.10.0

1 file

7.9.2

1 file

7.9.1

1 file

7.9.0

1 file

7.8.0

1 file

7.7.0

1 file

7.6.0

1 file

7.5.1

1 file

7.5.0

1 file

7.4.3

1 file

7.4.2

1 file

7.4.1

1 file

7.3.3

1 file

7.3.2

1 file

7.3.1

1 file

7.3.0

1 file

7.2.2

1 file

7.2.0

1 file

7.1.1

1 file

7.1.0

1 file

7.0.4

1 file

7.0.3

1 file

7.0.2

1 file

7.0.1

1 file

7.0.0

1 file

6.10.3

1 file

6.10.2

1 file

6.10.1

1 file

6.10.0

1 file

6.9.1

1 file

6.9.0

1 file

6.8.0

1 file

6.7.0

1 file

6.6.2

1 file

6.6.0

1 file

6.5.1

1 file

6.5.0

1 file

6.4.0

1 file

6.3.2

1 file

6.3.1

1 file

6.3.0

1 file

6.2.0

1 file

6.1.0

1 file

6.0.6

1 file

6.0.5

1 file

6.0.4

1 file

6.0.3

1 file

6.0.2

1 file

6.0.1

1 file

6.0.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page