Comments (2)
Roye,
This is by design, though I'm aware it can be confusing and I'm open to suggestions on how to make it less so.
The way I currently view the issue is this: if you select some nodes, the total length (displayed on the right of the GUI) is just a simple sum of node lengths, ignoring overlaps. If, however, you are extracting sequences for graph paths, then overlaps are taken into account and subtracted to avoid duplicated sequences.
I went with this simplistic approach because I could see multiple different ways to consider overlaps in the total length, and I'm not sure which would be best. In particular, things are not obvious when you have multiple nodes selected which do not form a simple path.
Consider the case where these three nodes are selected:
B
/
A
\
C
Imagine all three nodes have a length of 100 bp and the two edges have an overlap of 10 bp. If the user selected all three, I can see a few different possibilities:
- Total length = 300 bp. A simple sum, ignoring overlaps (what Bandage currently does).
- Total length = 290 bp. Trim the overlap length from node A. The overlap length is removed only once because the two edges share the same overlap.
- Total length = 280 bp. Trim the overlap length from nodes B and C. The overlap length is removed twice, once for all possible edges connecting nodes in the selection.
- Only edges which are selected have their overlap removed. This way total length depends not just on the node selection but also on the edge selection. Total length would be 300, 290 or 280, depending on whether 0, 1 or 2 edges were included in the selection.
I went with the first option because it seemed simplest and least confusing to me. But if you can make a case for one of the other options, or suggest an approach I haven't considered, then I'm keen to hear it!
Thanks,
Ryan
from bandage.
Hey Ryan, thanks for considering this.
The second case is not clear to me - can you clarify why the two edges share the same overlap? I think there are two different overlaps since they relate to different ends of A.
Generally, I agree there are cases the length reported can be ambiguous, particularly whenever your path returns to some point that's already been visited, but as it is, the total length is problematic in that it's misleading. For how it is currently, I would think to re-label that length to something like 'sum of node lengths.' To make it clear this is not the same as the path length, maybe consider putting the path selection box under the node selection (at the right) and having a "path length" reported under it.
To me the path selection box is more needed and natural than an additional box showing edge selection. I may be on the fringe in this sense, but I have tended to mostly ignore the selectable edges, so in my view the edge selection box may be superfluous. It would be interesting to see if others think the same.
R
from bandage.
Related Issues (20)
- export bubble unitigs?
- Are you guys still working on this? HOT 1
- Install error 1 HOT 2
- Load CSV data - extension request HOT 2
- "save path sequence to fasta" command line option HOT 1
- mac shortcut key problem HOT 1
- Bandage AppImage/AppDir requires the shared libraries libGL.so.1, libfontconfig.so.1, and libfreetype.so.6 HOT 5
- tilting BLAST hits titles
- Overlaps counted twice in "Total length (no overlaps)" calculation? HOT 1
- Packaging and compiling Bandage
- fasta file from other assembly
- What is the shape representing?
- Bandage image HOT 1
- can bandage display a verkko assembly?
- help with compiling for bioconda HOT 3
- Bandage line command cannot interpret colour scheme from GFA file
- Bandage line command cannot interpret colour scheme from GFA file #95 HOT 1
- command line Bandage: --names --lengths --depth only draws black rectangels HOT 2
- install error HOT 8
- Node Custom Properties
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 bandage.