Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. OUTFILE2 = open(platename + ".platemap.w_sample_names.txt", "w")
  2. OUTFILE2.write("Plate:\t" + platename + "\nPlate_#:\t" + plateno + "\n")
  3. colnames = ["1","2","3","4","5","6","7","8","9","10","11","12"]
  4. rownames = ["A","B","C","D","E","F","G","H"]
  5. colnamestoprint = "\t".join(colnames)
  6. OUTFILE2.write("\t" + colnamestoprint + "\n") #print the column names
  7. #print header
  8. for row in rownames:
  9. OUTFILE2.write(row + "\t")
  10. row_data = []
  11. for col in colnames:
  12. try: #filling the list with data
  13. row_data.append(samplemap[row, col])
  14. except KeyError: #if try to call a well with no information, don't crash just continue
  15. toprint = "\t".join(row_data)
  16. OUTFILE2.write(toprint + "\n")
  17. continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement