Mercurial > repos > davidvanzessen > baseline_fasta_generator
comparison script_xlsx.py @ 5:048f8cdbb6d2 draft default tip
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 07 Aug 2014 10:19:53 -0400 |
parents | be17e1e7dc2b |
children |
comparison
equal
deleted
inserted
replaced
4:aa4b95abef11 | 5:048f8cdbb6d2 |
---|---|
29 refdic[currentId[1:]] = currentSeq | 29 refdic[currentId[1:]] = currentSeq |
30 | 30 |
31 currentSeq = "" | 31 currentSeq = "" |
32 currentId = "" | 32 currentId = "" |
33 with xlrd.open_workbook(args.input, 'r') as wb: | 33 with xlrd.open_workbook(args.input, 'r') as wb: |
34 with open(args.output, 'w') as o: | 34 with open(args.output, 'a') as o: |
35 for sheet in wb.sheets(): | 35 for sheet in wb.sheets(): |
36 if sheet.cell(1,gene_column).value.find("IGHV") < 0: | 36 if sheet.cell(1,gene_column).value.find("IGHV") < 0: |
37 print "Genes not in column " + LETTERS[gene_column] + ", skipping sheet " + sheet.name | 37 print "Genes not in column " + LETTERS[gene_column] + ", skipping sheet " + sheet.name |
38 continue | 38 continue |
39 o.write(">>>" + sheet.name + "\n") | 39 o.write(">>>" + sheet.name + "\n") |