Metadata-Version: 2.1
Name: fastgenomics
Version: 1.0.0
Summary: FASTGenomics python helper
Home-page: https://github.com/fastgenomics/fastgenomics-py
License: UNKNOWN
Author: FASTGenomics Team
Author-email: contact@fastgenomics.org
Requires-Python: ~=3.6
Description-Content-Type: text/x-rst
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: jsonschema (~=2.6)
Requires-Dist: Jinja2 (~=2.9)
Requires-Dist: get_version (~=2.0.1)
Requires-Dist: setuptools
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx_rtd_theme; extra == "dev"
Requires-Dist: sphinx-autodoc-typehints; extra == "dev"
Project-URL: Documentation, https://fastgenomics.readthedocs.io
Provides-Extra: dev

::

    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|

.. |Latest Version| image:: https://img.shields.io/pypi/v/fastgenomics.svg
   :target: https://pypi.org/project/fastgenomics
.. |Build Status| image:: https://travis-ci.org/FASTGenomics/fastgenomics-py.svg?branch=master
   :target: https://travis-ci.org/FASTGenomics/fastgenomics-py
.. |Read the Docs| image:: https://readthedocs.org/projects/fastgenomics/badge/?version=latest
   :target: http://fastgenomics.readthedocs.io


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:

.. code:: python

    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:

.. code:: python

    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`_.

.. _Hello Genomics Python App: https://github.com/fastgenomics/hello_genomics_calc_py36

