Comments (6)
First, as an aside, I'll mention a relatively new Bandage feature: linear graph layout. It applies when your graph has a general linear structure and low-numbered segments tend to precede high-numbered segments. You can turn it on in Bandage's preferences (make sure you have a recent Bandage version):
Then it will draw your graph in a nicer, left-to-right format:
Now regarding your issue, that inverting edge is actually drawn, it's just quite hard to see with this layout. I can just barely see it in your screenshot above. If I zoom in and manually separate the segments a bit, it's clearer:
Increasing the edge length could make it more obvious. I changed it from 5 (the default) to 25 in the preferences:
And now I get this layout:
And if you want to see it very explicitly, you can turn on double mode (in the main UI, not preferences):
This makes Bandage draw both directions of each segment. The graph is now more cluttered but less open to misinterpretation:
Does that help? I'm going to close this issue, but if I missed something, let me know and I'll reopen it.
Ryan
from bandage.
The ordering of the visualization isn't the issue. It's just the fact that the inversion is extremely hard to perceive. I thought that it might have been represented in that edge but couldn't tell.
I think you should set the default edge length to 25 or add some other visual identification to inversions. This is a really critical problem. Inversions matter but the current default obscures them for users.
from bandage.
We are still having problems with this. Take this example graph:
It looks very simple in bandage. There are apparently several simple bubbles, which is what we're interested in:
But when we dig into it we find that there isn't a single "simple" bubble where strand is maintained through the links of all the nodes in the bubble. They all include multiple inversions.
vg view --gfa-in --vg funny.gfa | vg mod -K - | vg view -d - | sed s/arrowhead=none,// | dot -Tpng -o f.vg.nolabel.png
This matches the GFA, as far as I can tell. So I don't think there is a problem with vg's rendering.
I'm not running Bandage--- it's a collaborator who is convinced that vg is doing something wrong because it doesn't transform the graph as we'd expect based on the way that Bandage renders it.
I'd like to convince them that it's important to use the settings you've described here to understand the structure of the graph more clearly.
I think it'd be a much, much stronger message if you would set these as default. It will save all of us a lot of explaining and diagnosing in the future.
It's really important to me that this is addressed. If the defaults aren't sane and respectful of the underlying data I won't recommend this tool to other users.
from bandage.
Okay, I'm getting a better idea of the problem here. If I understand correctly, you define an 'inversion' as a case where the positive strand of one segment connects to the negative strand of another. Is that right? Like this link your funny.gfa
file:
L 88073 + 63608 - 150M
The confusion comes from the fact that some in graphs (like the SPAdes assembly graphs I'm most used to), the positive/negative distinction is arbitrary. I.e. a SPAdes assembly graph is full of 'inversions' that aren't meaningful at all. That's why in normal 'single' mode, Bandage doesn't draw arrowheads on nodes - they may not have any meaning.
But in your vg graphs, this distinction seems to matter very much. I thought of another Bandage feature which might help (again, it was a recent addition, so you'll need a current Bandage version): arrowheads in single mode (in the preferences window):
I also gave the nodes some outline to make the arrowheads even more obvious:
This makes your funny.gfa
graph look like this (zoomed in to a 'bubble'):
Now it's clear that the bubble has an inversion, while avoiding the complexity of double mode.
A possible future feature that might help would be an option to draw inverting edges in a different colour. I'll look into to adding that one. But even with these options (both currently available and future), I'd be reluctant to turn them on by default. In a SPAdes assembly graph, that is a simple bubble and highlighting an 'inversion' with colours/arrows would be confusing.
I guess the real issue is that different input graphs demand different Bandage settings. Is there a way a GFA file could be identified as coming from vg? I could add some logic like 'if this is a vg graph, turn this on, this off, etc.'
from bandage.
from bandage.
I haven't used FermiKit before, but is it possible that like SPAdes, it doesn't use the segment sign in any significant way? Using the same example as in my previous screenshot, perhaps this is a simple bubble:
I.e. if FermiKit isn't indicating anything with the sign of the segment, then it wouldn't matter that we're looking at the negative strand of 1504. It's just a sequence which splits into two options and then merges back together.
To illustrate, I took your funny.gfa
graph and strategically 'flipped' some of the segments (changed them to their reverse complement sequence and made the corresponding sign changes to the links).
funny_flipped.gfa.zip
Now all edges are + to + and the whole graph flows in one direction:
Assuming there is no significance to the +/- sign, then I haven't changed the graph in any real way - I've just normalised the strands.
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.