Comments (2)
I have thought about that a bit. The annoying part is how to practically do this.
Say we allow hamming distance of 1 as error. One way of implementing this would be to upon observation of a (UMI, tag) pair check for already observed pairs if there is one there where the UMI only differ by 1. Now in stead of doing exact lookup in the hash table as when you do counting unique's, you have to go through the entire observed data every time. This would need some more thought out data structure than is currently there. Additionally, this approach is not so good, because imagine you have UMIs A, B, and C. And say d(A, B) = 1, d(B, C) = 1, but d(A, C) = 2. If we observe A first, C will be counted as a new UMI, but not B. If B is observed first, neither A nor C will be counted as new UMIs.
The more correct way to do this is probably to make a clustering of UMIs in the collapsing stage at the end. Now for every transcript, you need to cluster UMIs and merge the ones which are within a "ball" in hamming distance. Then in stead of counting unique UMIs for a transcript, you count the number of distinct UMI-balls. But what if balls overlap? How computationally expensive does this become?
These are questions which made me not want to put too much effort in to it.
Testing the different strategies (without simulation which the blog post does) would be pretty straight forward using a dataset with spike-ins.
That said, I'm getting very good performance with the "unique" method based on spike-ins. Which also doesn't motivate me too much to try to implement more robust counting as outlined in the blog post.
You can output the entire "evidence table" from the tallying procedure if you want to try some different UMI-merging approaches (use the --output_evidence_table
option). If you find one that is computationally reasonable and improves the result, we should definitely make it part of the merging at the end! If it is not computationally reasonable we could maybe still add it as an option.
Sorry for the long response, let me know what your thoughts are on this reasoning.
from umis.
Thanks a lot for your detailed response. Yes, I agree, this is not a trivial problem. It seems that the authors of the blog post (or some of their colleagues at the same institute) have already implemented code that implements the different options of error correction they describe in the post:
https://github.com/CGATOxford/UMI-tools
They use some extra code for logging / IO from another of their packages, but other than that the code is pretty much standalone. Perhaps there is an opportunity to combine their work with yours? Just a thought...
from umis.
Related Issues (20)
- is there any function to extract fastq for certain cells passing the filter? HOT 1
- During Filtering noise celluar barcodes HOT 1
- Avoid expanding collapsed counts HOT 5
- valid cellular barcodes HOT 1
- error in umis cb_filter HOT 7
- ddseq SureCell HOT 2
- So slow when cb_filter HOT 2
- Error when running fasttagcount without cb_histogram
- Multi-maps HOT 3
- Error running umis tagcount with 1.0.3 (working on 1.0.0) HOT 3
- pip install not working HOT 6
- tagcount error : AttributeError HOT 10
- IOError: [Errno 28] No space left on device HOT 6
- cell barcode question HOT 7
- tagcount with --genemap option HOT 8
- Set up travis
- Transforms don't understand multiple UMIs HOT 6
- v1.0.8 yields KeyErrors when running test.sh
- Incorrect version HOT 2
- Ensure proper version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umis.