Mercurial > repos > gga > apollo_delete_organism
view list_organisms.py @ 6:db98cd19587b draft
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit d9f27b297d9a919471c92b02ecf6cc9554457211
author | gga |
---|---|
date | Tue, 30 Oct 2018 04:32:00 -0400 |
parents | 0af4179e6758 |
children | dd63c6e11a95 |
line wrap: on
line source
#!/usr/bin/env python from __future__ import print_function import argparse import json from webapollo import WAAuth, WebApolloInstance, accessible_organisms if __name__ == '__main__': parser = argparse.ArgumentParser(description='List all organisms available in an Apollo instance') WAAuth(parser) parser.add_argument('email', help='User Email') args = parser.parse_args() wa = WebApolloInstance(args.apollo, args.username, args.password) gx_user = wa.users.assertOrCreateUser(args.email) all_orgs = wa.organisms.findAllOrganisms() orgs = accessible_organisms(gx_user, all_orgs) print(json.dumps(orgs, indent=2))