Skip to content

Instantly share code, notes, and snippets.

@jamessdixon
Created June 4, 2023 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamessdixon/1ca5099db696f23d42c6804d9a726c9b to your computer and use it in GitHub Desktop.
Save jamessdixon/1ca5099db696f23d42c6804d9a726c9b to your computer and use it in GitHub Desktop.
file_name = 'rescored_alignments.csv'
with open(file_name, 'w') as t:
header = 'score'+ '\t'+ 'inv_dist'+ '\t'+ 'comb_seq'+ '\t'+ 'flavor' + '\n'
t.write(header)
for rescored_alignment in rescored_alignments:
score, inv_dist, comb_seq, flavor = rescored_alignment
item = str(score)+ '\t' + str(inv_dist)+ '\t' + str(comb_seq)+ '\t' + str(flavor)+ '\n'
with open(file_name, 'a') as t:
t.write(item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment