Skip to main content

FASTGenomics python helper

Project description

OOooOoO    Oo    .oOOOo.  oOoOOoOOo  .oOOOo.
o         o  O   o     o      o     .O     o                              o
O        O    o  O.           o     o
oOooO   oOooOoOo  `OOoo.      O     O
O       o      O       `O     o     O   .oOOo .oOo. 'OoOo. .oOo. `oOOoOO. O  .oOo  .oOo
o       O      o        o     O     o.      O OooO'  o   O O   o  O  o  o o  O     `Ooo.
o       o      O O.    .O     O      O.    oO O      O   o o   O  o  O  O O  o         O
O'      O.     O  `oooO'      o'      `OooO'  `OoO'  o   O `OoO'  O  o  o o' `OoO' `OoO'

Latest Version Build Status Read the Docs

About

This python module handles all common interfaces of your application to the FASTGenomics runtime:

  • Input/Output of files

  • Parameters

and provides some convenience functions.

Example:

from fastgenomics import io as fg_io

# get all parameters
parameters = fg_io.get_parameters()
...
# get a specific parameter
my_parameter = fg_io.get_parameter('my_parameter')
...
# load a file
my_input_path = fg_io.get_input_path('my_input_key')
with my_input_path.open() as f:
    # do something like f.read()
    pass

# store a file
my_output_path = fg_io.get_output_path('my_output_key')
...

Testing

If you want to test file input/output, you have to provide a sample config/input_file_mapping.json.

Testing without docker

If you want to work without docker, your paths will likely not match our default

  • /app path to your app, must contain manifest.json

  • /fastgenomics path to sample data. Should contain config/, data/, output/, summary/.

However, you can set them by providing environment variables FG_APP_DIR and FG_DATA_ROOT or by setting paths within your code:

from fastgenomics import io as fg_io

fg_io.set_paths('path_to/my_app', 'path_to_my/sample_data')

Keep in mind to reset the paths to default (just by not setting paths), when transforming your app into an docker-image!

For more details see our Hello Genomics Python App.

Download files

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

Source Distribution

fastgenomics-0.6.10.tar.gz (18.7 kB view hashes)

Uploaded Source

Built Distribution

fastgenomics-0.6.10-py3-none-any.whl (42.6 kB view hashes)

Uploaded Python 3

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