diff script_imgt.py @ 5:048f8cdbb6d2 draft default tip

Uploaded
author davidvanzessen
date Thu, 07 Aug 2014 10:19:53 -0400
parents aa4b95abef11
children
line wrap: on
line diff
--- a/script_imgt.py	Wed Jul 23 10:13:05 2014 -0400
+++ b/script_imgt.py	Thu Aug 07 10:19:53 2014 -0400
@@ -6,6 +6,7 @@
 parser.add_argument("--input", help="Excel input file containing one or more sheets where column G has the gene annotation, H has the sequence id and J has the sequence")
 parser.add_argument("--ref", help="Reference file")
 parser.add_argument("--output", help="Output file")
+parser.add_argument("--id", help="ID to be used at the '>>>' line in the output")
 
 args = parser.parse_args()
 
@@ -48,8 +49,8 @@
 currentSeq = ""
 currentId = ""
 with open(args.input, 'r') as i:
-	with open(args.output, 'w') as o:
-		o.write(">>>IMGT\n")
+	with open(args.output, 'a') as o:
+		o.write(">>>" + args.id + "\n")
 		outputdic = dict()
 		for line in i.readlines()[1:]:
 			linesplt = line.split("\t")