Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make count_tab compatible with umi_tools extract #654

Merged
merged 5 commits into from
Aug 2, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix byte-encoded strings written out in count_tab
  • Loading branch information
eaoljo committed Jul 31, 2024
commit b36e08944e654f99b3ed127ba760277aba60a811
8 changes: 8 additions & 0 deletions umi_tools/count_tab.py
Original file line number Diff line number Diff line change
@@ -148,7 +148,15 @@ def main(argv=None):
threshold=options.threshold)

gene_count = len(groups)
try:
gene = gene.decode()
except AttributeError:
pass
if options.per_cell:
try:
cell = cell.decode()
except AttributeError:
pass
options.stdout.write("%s\t%s\t%i\n" % (cell, gene, gene_count))
else:
options.stdout.write("%s\t%i\n" % (gene, gene_count))