Mercurial > repos > iuc > ncbi_eutils_esummary
annotate einfo.py @ 9:4dc2757b8ce6 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 851b88d92fa7740880a5edf407f629bf3f7f7bf0
author | iuc |
---|---|
date | Fri, 04 Oct 2024 14:36:18 +0000 |
parents | 254f40d3ae2b |
children |
rev | line source |
---|---|
0
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
1 #!/usr/bin/env python |
1
c8d4ea6376a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
iuc
parents:
0
diff
changeset
|
2 |
0
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
3 import argparse |
1
c8d4ea6376a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
iuc
parents:
0
diff
changeset
|
4 |
0
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
5 import eutils |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
6 |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
7 |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
8 if __name__ == '__main__': |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
9 parser = argparse.ArgumentParser(description='EInfo', epilog='') |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
10 parser.add_argument('--db', help='Database to use') |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
11 parser.add_argument('--user_email', help="User email") |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
12 parser.add_argument('--admin_email', help="Admin email") |
3
254f40d3ae2b
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit dae34e5e182b4cceb808d7353080f14aa9a78ca9"
iuc
parents:
1
diff
changeset
|
13 parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)') |
0
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
14 args = parser.parse_args() |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
15 |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
16 c = eutils.Client(user_email=args.user_email, admin_email=args.admin_email) |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
17 payload = {} |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
18 if args.db is not None: |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
19 payload['db'] = args.db |
92bd8a680b9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
iuc
parents:
diff
changeset
|
20 payload['version'] = '2.0' |
1
c8d4ea6376a7
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
iuc
parents:
0
diff
changeset
|
21 print(c.info(**payload)) |