how can I create a key in cytoscape? - cytoscape.js

I'm still learning to use cytoscape. I have created a compound-target-cancer network and would like to add a key at the bottom, explaining what the different colors of the nodes mean. For example the pink proteins represent cancer-related proteins, the blue proteins represent non-cancer related proteins and the green nodes are my compounds.
Please help...

There is an app under development to provide an easy way to do that. but it probably won't be available until Cytoscape 3.7. In the meantime, you can go to the Style tab, then you'll see a menu tab (four parallel lines), click on that and you'll see a "Create Legend..." option. That will bring up a legend that can be saved as a PNG and add back into your network using a post-processing program.
-- scooter

Related

Cytoscape GEM File Creating Unlabeled Square Nodes Instead Of Labeled Circle Nodes

I have been using Cytoscape's EnrichmentMap application for a few weeks, creating GEM files in g:Profiler and visualizing the results with EnrichmentMap. All files I created were working until today. I have generated 8 GEM files for different gene lists in g:Profiler, and 4 of them create the proper network visualization of the graph with labeled circular nodes with edges connecting them when clicking "Build". The other 4 create a network of edges connecting red rectangles that are unlabeled. I am unable to add a picture to Stack Overflow to show this or the GEM files.
I am using Cytoscape 3.8.2 on Windows 10. There are no errors upon creation of the network visualization.
I inspected the GEM files between those that worked and those that did not work, and they did not show any noticeable differences. Any advice would be greatly appreciated and thank you in advance!
Sorry to hear about your issues. Typically, the "red nodes" mean that a Visual Style wasn't loaded. You can easily fix that in Cytoscape by just selecting the style. Take a look for a style called "EM1_Visual_Style" (it might be some other number than 1) and select it. Hopefully that will bring your style back.
-- scooter

What parameter in Cytoscape determines the stacking order of edge rendering?

I have created a cytoscape network with a number of crossing and re-crossing edges. It is meant to do this, and I don't wish to reduce the amount of crossing that is occurring.
I would, however, like to be able to determine which edges are on "top" and which are in "back" - in the same way that you would "bring to front" or "send to back" in Powerpoint or Photoshop or any of numerous display programs.
Which style parameter or similar value is used to determine rendering order of edges? Note that I am referring to the edge line itself, and not some annotation.
Thanks much.
Unfortunately, that isn't available in the current release, but Cytoscape 3.9 will include that feature. If you want to try a copy of 3.9 (which isn't nearly ready for production release), you can download it at: https://cytoscape-builds.ucsd.edu/cytoscape-builds/Cytoscape-3.9.0/
-- scooter

.bvh set parent with automatic weights issue

I'm working on a blender project trying to import the the bvh and map it to mesh. As shown in the below figure I've been able to import the mesh and then imported the .bvh file. The first question is, under the .bvh file in the menu on the top right as shown in the below figures, there are two files under the object, one is named as the same name of the .bvh file and the other is named Pose. When I click on the 01_01 even after fitting the human on top of it this is what happens:
so as seen the armature and the human are separated.
And when I choose the pose one this is what happens:
so anyway, after that I select the human mesh then shift the armature and then click ctrl+p and choose parent with automatic weights but this is the result:
I have no idea why this is happening? I'd be very thankful if anyone could please advise how to fix this. Because if I played the file after this is the a snapshot of the result:
Your problem is that all the vertices are not being assigned to the armature when you reparent the mesh.
Either you need to go into edit mode and manually assign the remaining vertices to there proper groups or...
...if the bvh armature has the same amount of bones as the makehuman armature does, then try scaling the bvh armature up to the size of the makehuman armature. Then go and add Copy Location/Rotation/Scale constraints to each of the bones to have it copy the same bone on the other armature.
Iv'e done it before and it works. Just takes awhile tho.

Stitching images together by finding similarities in the images?

I am writing an app that stitches iOS text message screen captures together vertically.
I have the images cropped to only contain the message bubbles and none of the navigation bar of the text input bar (expect the the first and last screencaps of course) but I don't know how to detect where to line up the images.
I need to detect where there is overlap in the conversations and then stitch the images at the point. (I know how to draw the images to a new image context too.)
I am looking for an open source framework that could help me achieve this and any advice as to how to accomplish this task.
Thanks!
You can also give a go to the following code:
https://github.com/foundry/OpenCVStitch
While it might be overkill for your project, you could have a look at PanoTools: an Open Source software library for manipulating and stitching panoramic images. It's portable (Win/Lin/Mac), and if you're looking forward to making the stitching on your computer, GUIs to it like Hugin may even already fit your use case (I only used them for stitching photographs, so check the projection settings).

How to create from-white-to-color and from-color-to-black swatchs in photoshop

Assume that I have an A color with value 0xff0f0f and two basic black and white colors. How can I create quickly a swatch consists of all medium colors between white and A(lighter) and between A and black(darker)?
Thank you in advance!
Edit: I'm practising some pixel-art shading, and I'd like to create a palette(or swatch) consists of limited colors that differ from saturation = 0 to saturation = 1. For example:
Unfortunately there is no easy way to do this in Photoshop alone. If you are willing to pop into Illustrator, you can set up your swatches there and then export them as .ASE which can be loaded into PS.
Here is what I would do:
Open Illustrator and pick your main colors. Place them in a swatch folder.
Select the group and go to the Color Guide palette. Here you will see each of your picked colors going to both light and dark. Under the palatte dropdown menu you can find some useful settings, especially the Color Guide Options, where you can specify the number of steps.
Drag'n'drop the newly generated colors to your swathces palette. Once they are all in place, go to the Swatches palette dropdown menu and select Save Swatch Library as ASE. Save it somewhere logical. :)
Now go to Photoshop and open the swatches panel there. Select Replace Swatches. (Load Swatches appends them) and navigate to your ASE file.
Happy drawing.
PS: I couldn't upload images for clarification because I dont have enough Reputation. Yawn. Will update the answer when I can.