I have a network file created using a tool developed by me, the network file looks like this
GeneA GeneB <-
GeneB GeneC ->
GeneD GeneC ->
GeneD GeneF <-
Importing the network itself was successfully done, but I am looking for a way to import the directions in the network. Since the directions are not always the same, can somebody tell me how to import such directions into cytoscape. I have looked a lot and could not find the solution.
In Cytoscape.js you can put arrows to four different locations (see the documentation for more details).
The standard one for a directed graph would be arrows at the end of edge pointing towards to the target node. This can be achieved by setting target-arrow-shape to a supported shape (such as triangle, tee, vee and etc.). You also need to set the source and target of each edge properly. In your example
GeneA GeneB <-
GeneB would be source and GeneA would be the target,
GeneB GeneC ->
GeneB would be source and GeneC would be the target and so on.
For different arrow types see this example.
Related
I want to make a mesh using Delaunay Triangulation on the point cloud I have in MeshLab. I'm using the latest version of MeshLab, 2022.02
When I go to the menu "Filters" > "Remeshing, Simplification and Reconstruction" I see no option for Delaunay triangulation.
From this question https://stackoverflow.com/questions/61319670/create-a-mesh-no-watertight I see that Delaunay Triangulation should be an option in that menu. I can also see it listed in this video on YouTube (https://www.youtube.com/watch?v=lHKOJ1dbyJI)
Am I doing something wrong? Does Delaunay triangulation needed to be added somehow? Is it an extension? If anyone can enlighten me I would be extremely grateful!!!
Btw, the point cloud is a .xyz text file. It's a list of x,y,z coordinates and nothing else. The text file was converted from an .laz lidar file using lastools (specifically las2txt). The .laz file was downloaded from the USGS lidar explorer (https://apps.nationalmap.gov/lidar-explorer/#/)
What I tried: I loaded the .xyz file into MeshLab, looked in the "Remeshing, Simplification and Reconstruction" menu and completely failed to find Delaunay Triangulation.
I need to show things moving between nodes along their connection paths similar to this project. I haven't been able to find any examples of it in cytoscape, but I have used cytoscape in the past and prefer to keep using it for this as well. I would appreciate recommendations on how to approach this problem.
You've got a few options...
The easiest is the Marquee visual style. It produces a "marching ants" illusion in the direction of directed edges. Simply to the Styles tab in the Control Panel and select the "Marquee" style. In the EDGE tab, you can choose from 3 different Marquee Line Types. You could imagine mapping these 3 line types to 3 categories (or bins) of traffic density, for example. Or you could use color, thickness and/or transparency in combination with a marquee style to represent traffic density. You can see an example here:
https://youtu.be/MF0zsxEPoPc?t=44
There's also an app for animation! This takes the approach of interpolating any visual style (including position and existence) between any set of key frames you provide. So, for example, you would have a start and finish frame and then CyAnimator would make a movie file for you:
http://apps.cytoscape.org/apps/cyanimator
And yet another completely different approach: with the scripting capabilities of Cytoscape, you can pretty much do whatever you want. The Unit tests for the RCy3 package, for example, ends up being an almost psychedelic display of data vis potential (and the unit tests aren't even at full coverage, shame). So you could direct your own animations in real time with a bit of scripting in R or Python. Here's the RCy3 unit test demo and links to the scripting libs:
https://www.youtube.com/watch?v=IXqbdlUnzUE&t=1s (caution: flashing graphics)
https://bioconductor.org/packages/release/bioc/html/RCy3.html
https://py2cytoscape.readthedocs.io/en/latest/
I'm using cytoscape.js with meteor.js. My elements, stylesheet and vehicles (shown as red dots) are stored in mongo, and can be updated via an external process or edited on-screen. The graph can be restructured or reshaped on the fly, and the vehicles will discover the new least-cost route to reach their target. Moves are queued with eles.animate() Routing is handled by eles.floydWarshall().path(). This might be similar to what you had in mind.
How would one add logs to a well-section window programatically? For the following well-logs within my Petrel input tree and using the code below only "Sonic" log is displayed on the WellSectionWindow
Well
->WellLogs
- Density
- Sonic
- Gamma ray
Borehole borehole = arguments.object as Borehole;
WellSectionWindow wsw = WellSectionWindow.CreateWindow();
wsw.ShowObject(borehole);
Within Petrel(2013.1), I can navigate to the Log element->(right-click)->"Add to template"->"Vertical"->"In new track". I would like to know if something similar could be achieved using Ocean APIs and guide me towards relevant documentation. Also, I'd like to know why "Sonic" log was displayed within the WellSectionWindow in Petrel and how did it get prioritized over Density or Gamma ray log.
The WellLogVersion of a WellLog corresponds to the global well log in the input tree.
If you want to display the log, you can call wsw.ShowObject(wellLogVersion) and it will be displayed.
If you want to control the order of the logs being displayed, you'll need to deal with the format template nodes of the well section templates. The details can be found in the Ocean dev guide, Volume 9, Chapter 3.
I am trying to understand the .mesh files, usually generated for mesh visualization with Medit.
The documentation is here, but it is in french.
The thing I understand is that after every line describing and object in the file (vertex, triangle, tetrahedra, etc.) it comes a ref variable, that in the examples files I have, they usually are 0,1,2,3 and I don't understand what is their purpose.
Can somebody please explain this?
You can get an .mesh example here.
Each reference corresponds to a color in Medit. The colors are arbitrary, and can be changed in Medit (using the GUI or changing a configuration file).
The reference values in the Mesh file refers to a color index. Maybe the program uses this to display the vertices, triangles and tetrahedra with certain colors. You can ignore this value for all practical purposes.
I am aware of the ability using an EdgeShapeTransformer to change the look of edges:
vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line()); // for example
However I am looking for how to change the way the line looks while dragging from one node to another to create an edge interactively. By default the 'hovering' edge which is not yet linked to another node is a large curved line. See the example here for what I mean.
CubicCurveEdgeEffects is where it is done. There is an EdgeEffects interface that can be implemented to do other things instead. It is used by the SimpleEdgeSupport class via the EditingGraphMousePlugin.
(Credit to Tom Nelson, offline communication.)