Closed andreasg123 closed 3 years ago
Thanks @andreasg123, with Cell Ranger 4.0
and later versions all this code has been re-written in a more performant compiled language (rust), and is significantly faster! Agreed, we had some optimizations available here! Thanks for the input.
While looking through your company's open source offerings, I came across this statement: https://github.com/10XGenomics/cellranger/blob/master/mro/stages/counter/check_barcodes_compatibility/__init__.py#L119
It seemed odd to me that one would count first and then filter the result. However, when I ran a benchmark, that strategy was superior if the whitelist contained more than 15% of the unique keys:
Still, even in that situation, your code could be improved by calling
Counter
instead ofset
a few lines earlier. Both calls make the dataset unique and thus it should be done only once.If you want to change it, I would be happy to submit a PR.