Skip to content

Commit

Permalink
as \n to the output of -m and -u
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeweiSong committed Dec 17, 2020
1 parent 5b92aeb commit 8e0158e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Guilds_v1.1.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@
os.remove(matched_file)
output = open(matched_file,'a')
#Write the matched list header
output.write('%s' % ('\t'.join(header))) #Header
output.write('%s\n' % ('\t'.join(header))) #Header

#Write the matched OTU table
for item in unique_list:
item[-1] = item[-1].encode('utf-8')
rec = '\t'.join([str(i) for i in item])
output.write('%s' % rec)
output.write('%s\n' % rec)
output.close()

#Output unmatched OTUs to a new file
Expand All @@ -324,7 +324,7 @@
if os.path.isfile(unmatched_file) == True:
os.remove(unmatched_file)
output_unmatched = open(unmatched_file, 'a')
output_unmatched.write('%s' % ('\t'.join(header)))
output_unmatched.write('%s\n' % ('\t'.join(header)))
for item in unmatched_list:
rec = '\t'.join(item)
output_unmatched.write('%s\n' % rec)
Expand Down

0 comments on commit 8e0158e

Please sign in to comment.