question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

umitools dedup error: '<' not supported between instances of 'str' and 'bytes'

See original GitHub issue

Hi, thank you so much for offering this wonderful tool.

I’m trying to deduplicate single-cell RNA-seq bam files mapped by STAR. By reading this thread, I want to compare the results of --umi-tag=UR --cell-tag=CR and --umi-tag=UB --cell-tag=CB --method=unique

The former works fine but the latter somehow gives the error as: Traceback (most recent call last): File "/home/anaconda3/bin/umi_tools", line 11, in <module> sys.exit(main()) File "/home/anaconda3/lib/python3.8/site-packages/umi_tools/umi_tools.py", line 61, in main module.main(sys.argv) File "/home/anaconda3/lib/python3.8/site-packages/umi_tools/dedup.py", line 309, in main for bundle, key, status in bundle_iterator(inreads): File "/home/anaconda3/lib/python3.8/site-packages/umi_tools/sam_methods.py", line 488, in __call__ for k in sorted(self.reads_dict[p].keys()): TypeError: '<' not supported between instances of 'str' and 'bytes'

even if the rest of the codes are identical. I’m using umitools v.1.1.2 and the exact codes are as follows: umi_tools dedup --per-cell -I Aligned.sortedByCoord.out.bam --extract-umi-method=tag --umi-tag=UB --cell-tag=CB --method=unique -S Aligned.sortedByCoord.out_deduplicated_UB_CB.bam

umi_tools dedup --per-cell -I Aligned.sortedByCoord.out.bam --extract-umi-method=tag --umi-tag=UR --cell-tag=CR -S Aligned.sortedByCoord.out_deduplicated_UR_CR.bam

Do you have any ideas where I missed? Thank you so much for your help.

Best, Raku

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
camelestcommented, May 25, 2022

@vivekbhr @TomSmithCGAT I’m so sorry for my late response. Somehow I did not receive the notice. It worked perfect once I filtered out the reads with CB:Z:-! Thank you so much for your help and I’m closing the issue.

1reaction
TomSmithCGATcommented, May 11, 2022

Ah, brilliant. @camelest, does that solve your error too?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Same error every time: TypeError: '<' not supported between ...
input() returns a string. A < comparison is not possible between a string and an int value (In your case, 19751 ).
Read more >
dedup not recognizinding UMI tag · Issue #262 - GitHub
When I use --umi-tag=UR, I do not get this error. ... umitools dedup error: '<' not supported between instances of 'str' and 'bytes'...
Read more >
'>' not supported between instances of 'str' and 'int'
When our code goes to make its first comparison, an error is returned. The Solution. The input() method returns a string. This means...
Read more >
dedup - Deduplicate reads using UMI and mapping coordinates
The identification of duplicate reads is performed in an error-aware manner by building networks of related UMIs (see --method ). dedup can also...
Read more >
STAR manual 2.7.0a
somes in the file: the names from this file will be used in all output alignment files (such as .sam). The tabs are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found