.. image:: https://travis-ci.org/galaxy-genome-annotation/python-apollo.svg?branch=master :target: https://travis-ci.org/galaxy-genome-annotation/python-apollo
.. image:: https://readthedocs.org/projects/python-apollo/badge/?version=latest :target: http://python-apollo.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
Apollo is a Python library for interacting with
Apollo <https://github.com/gmod/apollo/>
__. Arrow is its companion CLI tool.
`for the record <https://gitter.im/galaxy-genome-annotation/Lobby?at=5ebee6c049a1b7318479380d>`__ ... arrow makes working with Apollo SOOO much easier
— Nathan Dunn, Apollo Developer
.. code-block:: shell
pip install apollo
Example code to create a new organism and add yourself in the permission list:
.. code:: python
from apollo import ApolloInstance
wa = ApolloInstance('https://fqdn/apollo', 'jane.doe@fqdn.edu', 'password')
orgs = wa.organisms.add_organism(
"Yeast",
"/path/to/jbrowse/data",
genus='Saccharomyces',
species='cerevisiae',
public=False
)
# Give Apollo a second to process the uploaded organism.
time.sleep(1)
# Then add yourself to permission list
data = wa.users.update_organism_permissions(
"jane.doe@fqdn.edu",
"Yeast",
write=True,
export=True,
read=True,
)
If you have already created an Arrow config file (with command arrow init
),
you can also get an ApolloInstance without writing credentials explicitely:
.. code:: python
from arrow.apollo import get_apollo_instance
wa = get_apollo_instance()
Or with the Arrow client:
.. code-block:: shell
$ arrow groups create_group university
{
"publicGroup": false,
"class": "org.bbop.apollo.UserGroup",
"name": "university",
"users": null,
"id": 558319
}
# THEN
$ arrow users get_users | \
jq '.[] | select(.username | contains("@tamu.edu")) | .username' | \
xargs -n1 arrow users add_to_group university
# OR
$ arrow users get_users | \
jq '.[] | select(.username | contains("@tamu.edu")) | .username' | \
paste -s -d',' | \
xargs arrow group update_membership 558319 --users
load_gff3
to more accurately load transcripts including the CDS as well as handle non-coding types more accurately.load_gff3
now uses the Apollo add_transcript
method if it is a gene or mRNA typeFixed bug <https://github.com/galaxy-genome-annotation/python-apollo/issues/4>
in deleteFeatures (Thanks @NeillGibson <https://github.com/NeillGibson>
)@abretaud <https://github.com/abretaud>
__The content of docs and arrow directories is automatically generated from the code in the apollo directory. To regenerate it, install the latest version of the code, then run:
.. code-block:: shell
make rebuild
Available under the MIT License
This material is based upon work supported by the National Science Foundation under Grant Number (Award 1565146)