Mercurial > repos > gga > apollo_create_account
view list_organisms.py @ 16:0929c15c3d70 draft
"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 1f9a5502a7423c78d862e81537b7646c9f4da5d9"
author | gga |
---|---|
date | Fri, 10 Dec 2021 09:54:02 +0000 |
parents | a46a509386d3 |
children |
line wrap: on
line source
#!/usr/bin/env python from __future__ import print_function import argparse import json from apollo import accessible_organisms from arrow.apollo import get_apollo_instance from webapollo import UserObj, handle_credentials if __name__ == '__main__': parser = argparse.ArgumentParser(description='List all organisms available in an Apollo instance') parser.add_argument('email', help='User Email') args = parser.parse_args() wa = get_apollo_instance() gx_user = UserObj(**wa.users._assert_or_create_user(args.email)) handle_credentials(gx_user) all_orgs = wa.organisms.get_organisms() orgs = accessible_organisms(gx_user, all_orgs) print(json.dumps(orgs, indent=2))