Apollo API library
Project description
Apollo is a Python library for interacting with Apollo
Installation
pip install apollo
Examples
Example code to create a new organism and add yourself in the permission list:
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:
from arrow.apollo import get_apollo_instance
wa = get_apollo_instance()
Or with the Arrow client:
$ 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
History
- 4.2
Improve user update method
Add tests for user api
- 4.1
Fix loading attributes from gff3
Better handling of genome sequence update, with or without the no_reload_sequences option
- 4.0.1
Fix missing file in pypi package, no code change
- 4.0
Added support for remote creation/update/deletion of organisms/tracks
Added support for adding GFF3 in the annotation track
Added tests
- 3.1
Added user activate/inactivate
Added get_creator for user, group and organisms
Added omitEmptyOrganisms to get_users
Added support for group admins
Added support for bulk group creation/deletion
Repaired GFF3/Fasta downloading
- 3.0.4
Fixed bug in deleteFeatures (Thanks @NeillGibson)
- 3.0.3
findAllOrganisms works correctly, client side filtering no longer necessary.
- 3.0.2
Patch a bug discovered in io.write, thanks Morgan!
- 3.0
“Arrow” CLI utility
More pythonic API and many workarounds for Apollo bugs or oddities
Complete package restructure
Nearly all functions renamed
- 2.0
Galaxy Functions
TTL Cache to work around Galaxy’s behaviour
Status and Canned* Clients from @abretaud
- 1.0
Initial release
License
Available under the MIT License
Support
This material is based upon work supported by the National Science Foundation under Grant Number (Award 1565146)
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
File details
Details for the file apollo-4.2.tar.gz
.
File metadata
- Download URL: apollo-4.2.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5733c59672240466270a47cf5f2c5b31f17b537a7d6974195c4702e3260a82dc |
|
MD5 | 213143c0eb9631eb9c077b5005fa0be8 |
|
BLAKE2b-256 | 88f0850cfcd7ae7fc2141e696bf52cfe8899772d86087ed5d215cea0efaac1e1 |
File details
Details for the file apollo-4.2-py3.7.egg
.
File metadata
- Download URL: apollo-4.2-py3.7.egg
- Upload date:
- Size: 224.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e33e929b7c5c64fdae1bca0da7a3820830bc08356290b51b9d30440761e5218e |
|
MD5 | a7c85249734211513876a3b1ec6c2927 |
|
BLAKE2b-256 | 02f4466ffc2d5799d719b9e295c5fc09675142619b7ffd87c6f5f3665fe0dfea |