Open fedarko opened 2 years ago
Modifying the polygon points to do this is actually pretty feasible. See before (current pentagons) and after (arrows) below.
For reference, the polygon points:
// left <--
"1 0.4 -0.2 0.4 -0.2 0.8 -1 0 -0.2 -0.8 -0.2 -0.4 1 -0.4",
// right -->
"-1 0.4 0.2 0.4 0.2 0.8 1 0 0.2 -0.8 0.2 -0.4 -1 -0.4",
Thought I'd opened another issue for this here in the past, but seems like I hadn't.
The GFA files output from certain assemblers (flye, spades IIRC, and probably more) are kind of inaccurate -- in the sense that they define "segments" and "links", but these segments really correspond to edges in a de Bruijn / repeat graph (rather than nodes) and the links really correspond to nodes (rather than edges). In spite of this, most tools (e.g. Bandage, MetagenomeScope) will visualize segments as nodes and links as edges.
This is fine -- the structures are
essentiallymostly equivalent, and it's possible to convert between them. (Also, AGB visualizes these graphs as you would expect.) However, for convenience's sake, it might be nice to add a simple option to just draw segments as arrows rather than as these uh pentagon-ish contig shapes -- this is doable in Cytoscape.js by adjusting theshape-polygon-points
parameter. This would look something like the following hastily-drawn figure (except, you know, less gross).This could range from just a simple toggle (
pentagons vs. arrows
) or actually allowing the user to specify custom strings for Cytoscape.js'shape-polygon-points
parameter. Probably the former is sufficient for now.