diff ecitmatch.py @ 5:e269b3b5185b 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:37:49 -0400
parents 1b4ac594d02a
children 2ff5369b4b51
line wrap: on
line diff
--- a/ecitmatch.py	Fri Jun 10 15:03:49 2016 -0400
+++ b/ecitmatch.py	Thu Jul 07 02:37:49 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: