diff ecitmatch.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
line wrap: on
line diff
--- a/ecitmatch.py	Fri Jun 10 15:03:27 2016 -0400
+++ b/ecitmatch.py	Thu Jul 07 02:38:00 2016 -0400
@@ -5,7 +5,7 @@
 
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='ECitMatch', epilog='')
-    parser.add_argument('--file', help='Tabular file containing citations to search')
+    parser.add_argument('--file', type=argparse.FileType('r'), help='Tabular file containing citations to search')
 
     parser.add_argument('--key', nargs='*', help='Citation Key')
     parser.add_argument('--journal_title', nargs='*', help='Journal Title')
@@ -35,6 +35,7 @@
             })
     else:
         for line in args.file:
+            line = line.strip()
             if not line.startswith('#'):
                 tmp = line.split('\t')
                 try: