Mercurial > repos > iuc > ncbi_eutils_egquery
comparison efetch.py @ 5:20a86bfb54eb draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 15bcc5104c577b4b9c761f2854fc686c07ffa9db
| author | iuc |
|---|---|
| date | Thu, 07 Jul 2016 02:38:00 -0400 |
| parents | 22fed2340d2b |
| children | 2d54a753d1f1 |
comparison
equal
deleted
inserted
replaced
| 4:484b84b30c75 | 5:20a86bfb54eb |
|---|---|
| 15 parser.add_argument('--history_file', help='Fetch results from previous query') | 15 parser.add_argument('--history_file', help='Fetch results from previous query') |
| 16 | 16 |
| 17 # Output | 17 # Output |
| 18 parser.add_argument('--retmode', help='Retmode') | 18 parser.add_argument('--retmode', help='Retmode') |
| 19 parser.add_argument('--rettype', help='Rettype') | 19 parser.add_argument('--rettype', help='Rettype') |
| 20 parser.add_argument('--whole', action='store_true', | |
| 21 help='Download all records associated with query') | |
| 22 args = parser.parse_args() | 20 args = parser.parse_args() |
| 23 | 21 |
| 24 c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email) | 22 c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email) |
| 25 merged_ids = c.parse_ids(args.id_list, args.id, args.history_file) | 23 merged_ids = c.parse_ids(args.id_list, args.id, args.history_file) |
| 26 | 24 |
| 32 | 30 |
| 33 for attr in ('retmode', 'rettype'): | 31 for attr in ('retmode', 'rettype'): |
| 34 if getattr(args, attr, None) is not None: | 32 if getattr(args, attr, None) is not None: |
| 35 payload[attr] = getattr(args, attr) | 33 payload[attr] = getattr(args, attr) |
| 36 | 34 |
| 37 c.fetch(args.db, whole=args.whole, **payload) | 35 c.fetch(args.db, ftype=args.retmode, **payload) |
