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'
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fastgenomics-0.6.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 228ad5f50324ce93a4f400d3e95a18ecb2396eeb9fd3ba884b65c30fbc1919eb |
|
MD5 | 95fc4d4abb8be3219fba5e3647593397 |
|
BLAKE2b-256 | f2c228d02110fc1b6d74b7bfb94ce7d45c1f67354a8b914911887e0c8ece4191 |