Comments (4)
Hi Antonio,
Thanks for bringing this issue up. This is an issue that I can fix, but I may need some testing. Let me explain:
The way skani calculates AF is by calculating the length of "chains" of k-mers, i.e. sequences of k-mers. These k-mers are subsampled and may not start at the beginning of the sequence. So what you're seeing is that the distance between the first and last k-mer is 86% of your genome.
Lowering -c helps because there are more k-mers, so the first k-mer starts closer to the ends of your genome.
As for the -m, this won't change the AF at all since it is just for filtering genomes. We don't allow c > m, which is what the message is trying to say. I'll make that more clear and push a change.
I'll implement a fix to this issue soon, but I'll need to do some testing. In practice, currently skani will underestimate AF for reasonably sized genomes identitical (> 20kb) by ~1% or so, so this is mostly an issue for small genomes.
Jim
from skani.
Actually, looking through my code, I implemented a workaround to this issue a while back... but there was a bug and it wasn't applied correctly. I've pushed an approximate fix for this issue and it should give much more reasonable results now.
The fix I implemented was simply adding "c" bases to the ends of the chains to account for the missing k-mers near the ends of the chains. This isn't perfect, but works on average. It still isn't a great fix for small sequences and doesn't guarantee 100% AF for identical sequences.
I'll leave this issue up while I implement a better solution that guarantees 100% AF for identical sequences.
from skani.
Thanks for the explanation, @bluenote-1577! I'll try out the latest commit and let you know if I have any issues.
from skani.
Coming back to this issue -- most of the time the AF is 100% for identical genomes since 0.1.0, but it isn't technically guaranteed. I think this is okay, even if it's not 100% it'll be very very close, and we are an approximate method after all.
If someone has issues with this or it fails spectacuarly in some cases, feel free to reference or open up this issue again.
from skani.
Related Issues (20)
- skani versus bindash HOT 5
- ANI values not symmetric? HOT 5
- Incorrect version number reported HOT 1
- How to make a Heatmap with skani matrix output HOT 4
- skani as library restricted to 1 thread HOT 2
- Implementation of Thomas Wang's integer hash function HOT 4
- Rescue_small question and potential bug HOT 2
- [Feature request] Many-to-many ANI comparisons HOT 6
- [Question] Other uses of k-mer sketches created by skani? HOT 5
- Question on Markers.bin file. HOT 1
- skani outputting low number of comparisons HOT 2
- Question: How does skani handle ambiguous ("N") bases? HOT 3
- question on FracMinHash comparison with Minimzer+MinHash HOT 1
- thread 'main' panicked at src/parse.rs:111:46: -l specified file could not be opened properly. Make sure this file exists. Exiting.: Os { code: 2, kind: NotFound, message: "No such file or directory" } HOT 2
- (Feature Request) Host the GTDB r214.1 skani database HOT 6
- calculate ANI for eukaryotes such as fungi HOT 2
- `--full-matrix` doesn't work with `--sparse` HOT 4
- Do not use full header in the output HOT 1
- needletail buffer-redux HOT 2
- Thomas wang's hash function HOT 1
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 skani.