Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tallytrin/python/correct_10xbarcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
for key, count in lists:
barcode_lists.append(key)

def is_only_Ts(input_string):
return all(char == 'T' for char in input_string)

def closest_match(input_string, string_list):
closest_match = None
Expand Down Expand Up @@ -91,7 +93,8 @@ def closest_match(input_string, string_list):
else:
pass

outf.write("@%s\n%s\n+\n%s\n" % (name + "_" + barcode + "_" + umi, record.sequence, record.quality))
if not is_only_Ts(umi):
outf.write("@%s\n%s\n+\n%s\n" % (name + "_" + barcode + "_" + umi, record.sequence, record.quality))


outf.close()
Expand Down