Last active
June 7, 2023 15:55
-
-
Save jamessdixon/6792e9b9ea794638599571089d90656e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_name = 'clusters_' + flavor + '.csv' | |
with open(file_name, 'w') as t: | |
header = 'score'+ '\t'+ 'pid'+ '\t'+ 'start'+ '\t'+ 'end'+ '\t'+ 'mz'+ '\t'+ 'charge' + "\n" | |
t.write(header) | |
for y_cluster in y_clusters: | |
item = str(y_cluster.score)+ '\t' + str(y_cluster.pid)+ '\t' + str(y_cluster.start)+ '\t' + str(y_cluster.end)+ '\t' + str(y_cluster.mz)+ '\t' + str(y_cluster.charge) + "\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