GA4GH Server

raw JSON →
0.3.5 verified Sat May 09 auth: no python

A reference implementation of the Global Alliance for Genomics and Health (GA4GH) API for genomic data. Versions 0.3.x are alpha pre-releases with major breaking changes (protobuf migration, modularization, package rename). As of v0.3.6 the package is renamed to ga4gh-server on PyPI.

pip install ga4gh==0.3.5
error ImportError: No module named 'ga4gh.frontend'
cause Module structure changed in v0.3.5; frontend code moved under ga4gh.server.
fix
Use 'from ga4gh.server.frontend import FlaskGA4GHApplication'
error ModuleNotFoundError: No module named 'ga4gh'
cause Package renaming to 'ga4gh-server' in v0.3.6; attempting to install 'ga4gh' no longer exists for newer versions.
fix
Run 'pip install ga4gh-server' instead of 'pip install ga4gh'
error AttributeError: module 'ga4gh' has no attribute 'schemas'
cause Schemas extracted to separate package 'ga4gh-schemas' in v0.3.5.
fix
Install 'pip install ga4gh-schemas' and import from 'ga4gh.schemas'
breaking Package renamed from 'ga4gh' to 'ga4gh-server' starting from v0.3.6. All future versions will be published as ga4gh-server. Install the new package for updates.
fix pip uninstall ga4gh; pip install ga4gh-server
breaking In v0.3.1, the serialization format switched from Avro to Protocol Buffers. Existing data files and client applications are incompatible.
fix Re-export data to Protobuf format; update clients to use protobuf instead of avro.
breaking In v0.3.5, the package was modularized into ga4gh, ga4gh-schemas, ga4gh-client, ga4gh-common. Import paths changed; old imports 'from ga4gh.frontend' no longer work.
fix Change imports to 'from ga4gh.server.frontend' etc.
gotcha The 'ga4gh' package on PyPI is the server package, not a client library. For client functionality, use 'ga4gh-client' (pip install ga4gh-client).
fix Install ga4gh-client for client API.
pip install ga4gh-server

Initialize GA4GH server with Flask. Set GA4GH_CONFIG environment variable to point to your configuration file.

from ga4gh.server.frontend import FlaskGA4GHApplication
from ga4gh.server.cli import configure
import os

app = FlaskGA4GHApplication()
config = os.environ.get('GA4GH_CONFIG', 'config.py')
configure(app, config) 
app.run()