comparison ecitmatch.py @ 1:2791c731fc65 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author iuc
date Tue, 30 Oct 2018 19:07:34 -0400
parents 59063d2e91c6
children 55b3067762f9
comparison
equal deleted inserted replaced
0:59063d2e91c6 1:2791c731fc65
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 from __future__ import print_function
3
2 import argparse 4 import argparse
5
3 import eutils 6 import eutils
4 7
5 8
6 if __name__ == '__main__': 9 if __name__ == '__main__':
7 parser = argparse.ArgumentParser(description='ECitMatch', epilog='') 10 parser = argparse.ArgumentParser(description='ECitMatch', epilog='')
46 'first_page': tmp[3], 49 'first_page': tmp[3],
47 'author_name': tmp[4], 50 'author_name': tmp[4],
48 'key': tmp[5], 51 'key': tmp[5],
49 }) 52 })
50 except KeyError: 53 except KeyError:
51 print "Could not parse line: %s" % line 54 print("Could not parse line: %s" % line)
52 55
53 payload = { 56 payload = {
54 'db': 'pubmed', 57 'db': 'pubmed',
55 'bdata': citations 58 'bdata': citations
56 } 59 }
57 60
58 results = c.citmatch(**payload) 61 results = c.citmatch(**payload)
59 # We get data back as pipe separated, so just replace those with tabs 62 # We get data back as pipe separated, so just replace those with tabs
60 print results.replace('|', '\t') 63 print(results.replace('|', '\t'))