synaptic | architecture-free neural network library for node.js | Runtime Evironment library
kandi X-RAY | synaptic Summary
Support
Quality
Security
License
Reuse
- Constructs a LPTM .
- Constructor of a pool
- Construct a new Layer Connection
- Constructs a new Instance .
- Generates a random sample
- Constructor for Neuron .
- Find a new module .
- Constructs a hop .
- Represents a layer .
- Constructs a new Connection .
synaptic Key Features
synaptic Examples and Code Snippets
Trending Discussions on synaptic
Trending Discussions on synaptic
QUESTION
I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files. I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure
most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
ANSWER
Answered 2022-Mar-18 at 12:09You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev
package.
sudo apt install build-essential qtbase5-dev qtchooser
QUESTION
I am trying to install ROS Melodic using the instructions on wiki.ros.org and stumbled upon some problems.
System software information:
Operating System: Kubuntu 21.10
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-19-generic (64-bit)
Graphics Platform: X11
ProblemI have first followed steps from http://wiki.ros.org/melodic/Installation/Ubuntu and later followed the steps from https://varhowto.com/install-ros-melodic-ubuntu-18-04/#Step_1_%E2%80%94_Install_ROS_Melodic_repo , both with unsuccessful results.
When running sudo apt update
I am getting:
Hit:1 http://archive.ubuntu.com/ubuntu impish InRelease
Get:2 http://archive.ubuntu.com/ubuntu impish-updates InRelease [110 kB]
Ign:3 http://packages.ros.org/ros/ubuntu impish InRelease
Get:4 http://archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
Hit:5 http://packages.ros.org/ros/ubuntu bionic InRelease
Get:6 http://archive.ubuntu.com/ubuntu impish-security InRelease [110 kB]
Err:7 http://packages.ros.org/ros/ubuntu impish Release
404 Not Found [IP: 140.211.166.134 80]
Reading package lists... Done
E: The repository 'http://packages.ros.org/ros/ubuntu impish Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
After trying to install with this line:
sudo apt install ros-melodic-desktop-full
I am getting:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '1.4.1-0bionic.20211104.025752' (ROS bionic:bionic [amd64]) for 'ros-melodic-desktop-full'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
python-rospkg : Depends: python-yaml but it is not installable
python-rospkg-modules : Depends: python-yaml but it is not installable
Depends: python-catkin-pkg-modules but it is not going to be installed
ros-melodic-actionlib : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-actionlib-tutorials : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-bondcpp : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-camera-calibration-parsers : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-python1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libyaml-cpp0.5v5 but it is not installable
ros-melodic-camera-info-manager : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-catkin : Depends: python-catkin-pkg (> 0.4.3) but it is not going to be installed
Depends: python-empy but it is not installable
Depends: python-nose but it is not installable
ros-melodic-class-loader : Depends: libboost-system1.65.1 but it is not installable
Depends: libpocofoundation50 but it is not installable
ros-melodic-compressed-depth-image-transport : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgcodecs3.2 but it is not installable
ros-melodic-compressed-image-transport : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgcodecs3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
ros-melodic-controller-manager : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-cv-bridge : Depends: libboost-python1.65.1 but it is not installable
Depends: libboost-regex1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgcodecs3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
Depends: python-opencv but it is not installable
ros-melodic-depth-image-proc : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
ros-melodic-diagnostic-aggregator : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-regex1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-diagnostic-common-diagnostics : Depends: python-psutil but it is not installable
ros-melodic-diff-drive-controller : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-dynamic-reconfigure : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-filters : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-gazebo-plugins : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: libgazebo9 but it is not going to be installed
Depends: libignition-common but it is not installable
Depends: libignition-math4 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
Depends: libprotobuf10 but it is not installable
Depends: libsdformat6 but it is not installable
ros-melodic-gazebo-ros : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: libgazebo9 but it is not going to be installed
Depends: libignition-common but it is not installable
Depends: libprotobuf10 but it is not installable
Depends: libsdformat6 but it is not installable
ros-melodic-gazebo-ros-control : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: libgazebo9 but it is not going to be installed
Depends: libignition-common but it is not installable
Depends: libignition-math4 but it is not installable
Depends: libsdformat6 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
Depends: ros-melodic-control-toolbox but it is not going to be installed
Depends: ros-melodic-transmission-interface but it is not going to be installed
ros-melodic-genmsg : Depends: python-empy but it is not installable
ros-melodic-genpy : Depends: python-yaml but it is not installable
ros-melodic-image-geometry : Depends: libopencv-calib3d3.2 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
ros-melodic-image-proc : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
ros-melodic-image-publisher : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgcodecs3.2 but it is not installable
Depends: libopencv-videoio3.2 but it is not installable
ros-melodic-image-rotate : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
ros-melodic-image-transport : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-image-view : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-highgui3.2 but it is not installable
Depends: libopencv-imgcodecs3.2 but it is not installable
Depends: libopencv-videoio3.2 but it is not installable
ros-melodic-interactive-marker-tutorials : Depends: libboost-system1.65.1 but it is not installable
Depends: ros-melodic-interactive-markers but it is not going to be installed
ros-melodic-joint-state-controller : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-kdl-parser : Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-laser-assembler : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-laser-filters : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-laser-geometry : Depends: libboost-system1.65.1 but it is not installable
Depends: python-numpy but it is not installable
ros-melodic-librviz-tutorial : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-nodelet : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-nodelet-tutorial-math : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-pcl-ros : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libpcl-common1.8 but it is not installable
Depends: libpcl-features1.8 but it is not installable
Depends: libpcl-filters1.8 but it is not installable
Depends: libpcl-io1.8 but it is not installable
Depends: libpcl-search1.8 but it is not installable
Depends: libpcl-segmentation1.8 but it is not installable
Depends: libpcl-surface1.8 but it is not installable
ros-melodic-pluginlib-tutorials : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-position-controllers : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-python-orocos-kdl : Depends: python-sip-dev but it is not installable
ros-melodic-python-qt-binding : Depends: python-pyqt5 but it is not installable
Depends: python-pyqt5.qtsvg but it is not installable
Depends: python-sip-dev but it is not installable
ros-melodic-qt-dotgraph : Depends: python-pydot but it is not installable
ros-melodic-robot-state-publisher : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-rosbag : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-program-options1.65.1 but it is not installable
Depends: libboost-regex1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: python-gnupg but it is not installable
Depends: python-pycryptodome but it is not installable
Depends: ros-melodic-rosbag-storage but it is not going to be installed
ros-melodic-rosconsole : Depends: libboost-regex1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: liblog4cxx10v5 (>= 0.10.0) but it is not installable
ros-melodic-roscpp : Depends: libboost-chrono1.65.1 but it is not installable
Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-roscpp-tutorials : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-rosgraph : Depends: python-netifaces but it is not installable
Depends: python-yaml but it is not installable
ros-melodic-roslaunch : Depends: python-paramiko but it is not installable
Depends: python-yaml but it is not installable
ros-melodic-roslib : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-rosmaster : Depends: python-defusedxml but it is not installable
ros-melodic-rospack : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-program-options1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
Depends: python-catkin-pkg-modules but it is not going to be installed
Depends: python-rosdep-modules but it is not going to be installed
ros-melodic-rosparam : Depends: python-yaml but it is not installable
ros-melodic-rospy : Depends: python-numpy but it is not installable
Depends: python-yaml but it is not installable
ros-melodic-rostime : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-roswtf : Depends: python-paramiko but it is not installable
ros-melodic-rqt-bag-plugins : Depends: python-cairo but it is not installable
Depends: python-pil but it is not installable
ros-melodic-rqt-image-view : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
Depends: ros-melodic-rqt-gui-cpp but it is not going to be installed
ros-melodic-rqt-plot : Depends: python-matplotlib but it is not installable
Depends: python-numpy but it is not installable
ros-melodic-rqt-pose-view : Depends: python-opengl but it is not installable
Depends: ros-melodic-gl-dependency but it is not going to be installed
ros-melodic-rqt-reconfigure : Depends: python-yaml but it is not installable
ros-melodic-rqt-rviz : Depends: libboost-program-options1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: ros-melodic-rqt-gui-cpp but it is not going to be installed
ros-melodic-rqt-top : Depends: python-psutil but it is not installable
ros-melodic-rviz : Depends: libassimp4 but it is not installable
Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-program-options1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
Depends: libyaml-cpp0.5v5 but it is not installable
Depends: ros-melodic-interactive-markers but it is not going to be installed
Depends: ros-melodic-resource-retriever but it is not going to be installed
ros-melodic-rviz-plugin-tutorials : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-self-test : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-stage-ros : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-stereo-image-proc : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-calib3d3.2 but it is not installable
Depends: libopencv-core3.2 but it is not installable
ros-melodic-tf : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-tf2 : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-tf2-ros : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
Depends: ros-melodic-tf2-py but it is not going to be installed
ros-melodic-theora-image-transport : Depends: libboost-system1.65.1 but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
ros-melodic-turtle-actionlib : Depends: libboost-system1.65.1 but it is not installable
Depends: libboost-thread1.65.1 but it is not installable
ros-melodic-turtle-tf : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-turtle-tf2 : Depends: libboost-system1.65.1 but it is not installable
ros-melodic-urdf : Depends: libboost-filesystem1.65.1 but it is not installable
Depends: libboost-system1.65.1 but it is not installable
Depends: libtinyxml2-6 (>= 5.0.0) but it is not installable
ros-melodic-urdfdom-py : Depends: python-yaml but it is not installable
ros-melodic-webkit-dependency : Depends: python-pyqt5.qtwebkit but it is not installable
E: Unable to correct problems, you have held broken packages.
I tried to concentrate on the error
E: Unable to correct problems, you have held broken packages.
But never found a solution to install ROS. I used Synaptic Package Manager to fix and remove any broken packages and tried to unhold every package to get rid of the problem but nothing worked.
Does anyone know how to solve this? Thank you!
ANSWER
Answered 2021-Dec-12 at 22:41You're getting this error because Melodic is the ros distro for Ubuntu 18.04. As of present the most recent release is Noetic which targets 20.04. The version of Ubuntu you're using does not currently have a supported ROS release, as such your only real option is to downgrade if you want ROS.
QUESTION
I am using Kristen to generate a Verilog FPGA host interface for a neuromorphic processor. I have implemented the basic host as follows,
The end result is that I am seeing a ton of registers being generated and I have to scale my NMP size down to fit within the constraints of my FPGA. Is there a way to control the number of registers being generated here? Obviously I need to store settings for these different fields. Am I missing something here?
I should add that I am trying to get to a 2048 scale on my NMP but the best I can do is just over a 1000, and not quite 1024. If I implement without PCIe or host control, I can get to 2048 without issue.
ANSWER
Answered 2021-Sep-27 at 07:31If I understand correctly, each NMP instance has a been coded with a internal register to store data and the configuration you have shown will result in kristen creating Verilog with registers as well. Effectivley there is a double buffered storage occuring.
Because of this, the number of registers are effectively doubled beyond what they need to be. One way of dealing with this situation described is to use another RAM interface of 32 bits wide. I do note that your config calls for 9 x 32 bits words which is a odd size for memory. There will be some wasted adddress space. Kristen will create a RAM's on binary boundaries so, you can get a 16x32bit memory region that you can overlay on that interface. And then a second RAM just like you have already for the learn memory.
....
Generate this and take a look at the new interface. That should reduce the number of registers generated in your Verilog code and subsequent synthesis.
QUESTION
I have a plot I make using a website called Revigo that provides an R script (included below) to create a plot like this:
I'm looking to see if it's possible to perform and visualize a clustering on top of these points in the same graph? Since this plot looks like one big circle I'm trying to see if there are any smaller groupings within it that I can highlight. I have a biology background so I'm not sure where to start with trying to get this visualization in the same plot. I have explored using hclust()
but I don't know the steps to bring clusters to be shown on top of this graph.
The code and data that gives the plot above is:
library( ggplot2 );
library( scales );
revigo.names <- c("term_ID","description","frequency_%","plot_X","plot_Y","plot_size","log10_p_value","uniqueness","dispensability");
revigo.data <- rbind(c("GO:0002376","immune system process",16.463,-0.302,-3.807, 3.455,-8.3307,0.995,0.000),
c("GO:0006928","movement of cell or subcellular component",10.987, 1.052, 1.113, 3.280,-8.8153,0.965,0.000),
c("GO:0007610","behavior", 3.254,-1.620, 0.960, 2.752,-4.0048,0.994,0.000),
c("GO:0008150","biological_process",100.000,-6.029,-0.499, 4.239,-8.7447,1.000,0.000),
c("GO:0009987","cellular process",90.329,-5.288, 0.130, 4.195,-10.0701,0.999,0.000),
c("GO:0010243","response to organonitrogen compound", 4.697, 6.870,-2.756, 2.911,-12.7100,0.865,0.000),
c("GO:0023052","signaling",36.613, 2.976,-6.718, 3.803,-7.1931,0.996,0.000),
c("GO:0032501","multicellular organismal process",41.143, 3.761,-0.715, 3.853,-17.2741,0.997,0.000),
c("GO:0032502","developmental process",33.982,-2.865,-0.660, 3.770,-14.4202,0.996,0.000),
c("GO:0034762","regulation of transmembrane transport", 2.452,-3.982, 3.261, 2.629,-13.4123,0.788,0.000),
c("GO:0040007","growth", 5.447, 0.651,-0.889, 2.975,-4.2140,0.995,0.000),
c("GO:0040011","locomotion", 9.452, 2.305,-0.865, 3.215,-8.1068,0.995,0.000),
c("GO:0050896","response to stimulus",49.302, 3.556,-5.122, 3.932,-17.7852,0.997,0.000),
c("GO:0051179","localization",36.018,-0.564,-0.041, 3.795,-8.9245,0.996,0.000),
c("GO:0051704","multi-organism process", 9.873, 1.677,-5.787, 3.234,-4.6925,0.995,0.000),
c("GO:0065007","biological regulation",67.069,-4.157, 0.147, 4.065,-15.5918,0.998,0.000),
c("GO:0007154","cell communication",36.705,-0.841,-2.282, 3.804,-8.3595,0.992,0.006),
c("GO:0008283","cell proliferation",11.321, 2.644, 1.154, 3.293,-4.5376,0.982,0.024),
c("GO:0042391","regulation of membrane potential", 2.204,-0.568,-6.816, 2.583,-10.6073,0.895,0.035),
c("GO:0043086","negative regulation of catalytic activity", 4.934, 4.164,-2.157, 2.932,-4.9172,0.880,0.039),
c("GO:0019216","regulation of lipid metabolic process", 1.685, 3.142, 6.777, 2.467,-6.3215,0.880,0.043),
c("GO:0044057","regulation of system process", 2.862,-6.608, 1.584, 2.696,-13.1469,0.868,0.046),
c("GO:0051093","negative regulation of developmental process", 4.720,-4.950,-3.614, 2.913,-9.9031,0.830,0.050),
c("GO:0006793","phosphorus metabolic process",18.702,-4.363, 6.140, 3.511,-6.8729,0.961,0.053),
c("GO:0008284","positive regulation of cell proliferation", 4.859,-0.261, 4.128, 2.926,-9.2882,0.832,0.055),
c("GO:0065008","regulation of biological quality",20.202,-0.644, 5.306, 3.544,-20.3125,0.920,0.057),
c("GO:0050865","regulation of cell activation", 3.174, 2.497,-4.613, 2.741,-4.7878,0.917,0.062),
c("GO:0065009","regulation of molecular function",17.288,-1.972, 4.374, 3.477,-17.1959,0.923,0.078),
c("GO:0048518","positive regulation of biological process",30.969, 0.597, 8.033, 3.730,-15.2993,0.895,0.095),
c("GO:0051128","regulation of cellular component organization",13.335, 1.445, 4.799, 3.364,-4.5003,0.899,0.104),
c("GO:0007169","transmembrane receptor protein tyrosine kinase signaling pathway", 3.976, 6.886, 4.332, 2.839,-7.5986,0.845,0.114),
c("GO:0032101","regulation of response to external stimulus", 3.976, 6.545, 2.631, 2.839,-9.0405,0.838,0.114),
c("GO:0048519","negative regulation of biological process",26.855,-0.542, 7.989, 3.668,-12.9469,0.898,0.134),
c("GO:0044238","primary metabolic process",60.306,-3.339, 6.565, 4.019,-4.5229,0.961,0.140),
c("GO:0042221","response to chemical",23.993, 7.702,-0.115, 3.619,-24.7399,0.923,0.160),
c("GO:0009628","response to abiotic stimulus", 6.705, 8.008, 1.525, 3.066,-11.1726,0.938,0.174),
c("GO:0007187","G-protein coupled receptor signaling pathway, coupled to cyclic nucleotide second messenger", 1.033, 5.463, 5.279, 2.255,-5.0942,0.874,0.186),
c("GO:0031099","regeneration", 1.016,-3.828,-4.295, 2.248,-4.6216,0.955,0.186),
c("GO:0009719","response to endogenous stimulus", 9.175, 6.984, 0.467, 3.202,-15.8069,0.935,0.188),
c("GO:0098657","import into cell", 0.415,-3.347, 2.843, 1.863,-4.7077,0.928,0.190),
c("GO:0051239","regulation of multicellular organismal process",15.268,-6.085, 3.408, 3.423,-18.1433,0.885,0.192),
c("GO:0007268","chemical synaptic transmission", 3.474, 5.008, 6.277, 2.780,-4.7471,0.914,0.194),
c("GO:0050794","regulation of cellular process",60.427, 0.909, 7.170, 4.020,-15.1986,0.875,0.198),
c("GO:0009605","response to external stimulus",12.043, 7.990, 0.686, 3.320,-7.7520,0.932,0.202),
c("GO:0019222","regulation of metabolic process",35.730,-0.798, 6.924, 3.792,-8.7399,0.888,0.217),
c("GO:0048589","developmental growth", 3.272,-5.765,-3.288, 2.754,-4.6289,0.942,0.220),
c("GO:0048729","tissue morphogenesis", 3.572,-4.454,-4.112, 2.792,-4.2055,0.942,0.223),
c("GO:0048732","gland development", 2.418,-5.936,-2.151, 2.623,-3.9830,0.930,0.224),
c("GO:0032879","regulation of localization",14.409,-3.921, 4.876, 3.398,-19.9830,0.839,0.231),
c("GO:0006950","response to stress",21.310, 7.271,-0.252, 3.567,-11.7905,0.925,0.241),
c("GO:0048583","regulation of response to stimulus",21.610, 7.157, 2.071, 3.574,-14.0640,0.849,0.242),
c("GO:0031323","regulation of cellular metabolic process",33.837, 1.983, 7.193, 3.768,-7.3665,0.804,0.256),
c("GO:0003008","system process",11.575,-6.863, 1.039, 3.303,-14.5229,0.965,0.259),
c("GO:0050789","regulation of biological process",63.456, 0.625, 7.037, 4.041,-16.1244,0.896,0.274),
c("GO:0051899","membrane depolarization", 0.565,-1.372,-6.528, 1.996,-4.2411,0.910,0.284),
c("GO:0061024","membrane organization", 7.299,-5.167, 4.037, 3.102,-4.4237,0.987,0.286),
c("GO:0035150","regulation of tube size", 0.675,-0.489,-6.505, 2.072,-5.1129,0.901,0.290),
c("GO:0009636","response to toxic substance", 1.264, 6.039,-4.714, 2.342,-5.3072,0.915,0.292),
c("GO:0061041","regulation of wound healing", 0.750, 5.568, 3.354, 2.117,-5.7696,0.869,0.296),
c("GO:0007165","signal transduction",33.618, 5.808, 3.554, 3.765,-20.2403,0.784,0.296),
c("GO:0010038","response to metal ion", 1.829, 6.463,-4.185, 2.502,-5.0768,0.911,0.307),
c("GO:0001101","response to acid chemical", 1.858, 6.221,-3.913, 2.509,-5.3072,0.911,0.308),
c("GO:0043066","negative regulation of apoptotic process", 4.749,-4.234,-2.719, 2.916,-5.6778,0.845,0.315),
c("GO:0042493","response to drug", 2.366, 6.792,-3.628, 2.614,-12.6716,0.908,0.319),
c("GO:0010035","response to inorganic substance", 2.816, 6.714,-3.232, 2.689,-6.8125,0.906,0.327),
c("GO:0048856","anatomical structure development",31.558,-4.976,-4.080, 3.738,-12.4157,0.940,0.339),
c("GO:0051716","cellular response to stimulus",40.358, 7.607, 0.187, 3.845,-21.1158,0.911,0.359),
c("GO:0055082","cellular chemical homeostasis", 4.108,-1.327,-6.764, 2.853,-9.7520,0.840,0.364),
c("GO:0007267","cell-cell signaling", 9.025, 5.287, 5.987, 3.195,-5.1175,0.925,0.366),
c("GO:0043408","regulation of MAPK cascade", 3.883, 5.837, 4.526, 2.829,-6.8794,0.689,0.371),
c("GO:0048522","positive regulation of cellular process",27.732,-1.038, 7.337, 3.682,-15.2518,0.798,0.376),
c("GO:0010817","regulation of hormone levels", 2.764,-0.848,-6.705, 2.681,-6.8697,0.892,0.376),
c("GO:0050878","regulation of body fluid levels", 2.862,-1.665,-6.559, 2.696,-4.2541,0.891,0.378),
c("GO:1901654","response to ketone", 1.039, 5.708,-4.850, 2.258,-5.2644,0.898,0.394));
one.data <- data.frame(revigo.data);
names(one.data) <- revigo.names;
one.data <- one.data [(one.data$plot_X != "null" & one.data$plot_Y != "null"), ];
one.data$plot_X <- as.numeric( as.character(one.data$plot_X) );
one.data$plot_Y <- as.numeric( as.character(one.data$plot_Y) );
one.data$plot_size <- as.numeric( as.character(one.data$plot_size) );
one.data$log10_p_value <- as.numeric( as.character(one.data$log10_p_value) );
one.data$frequency <- as.numeric( as.character(one.data$frequency) );
one.data$uniqueness <- as.numeric( as.character(one.data$uniqueness) );
one.data$dispensability <- as.numeric( as.character(one.data$dispensability) );
p1 <- ggplot( data = one.data );
p1 <- p1 + geom_point( aes( plot_X, plot_Y, colour = log10_p_value, size = plot_size), alpha = I(0.6) ) + scale_size_area();
p1 <- p1 + scale_colour_gradientn( colours = c("blue", "green", "yellow", "red"), limits = c( min(one.data$log10_p_value), 0) );
p1 <- p1 + geom_point( aes(plot_X, plot_Y, size = plot_size), shape = 21, fill = "transparent", colour = I (alpha ("black", 0.6) )) + scale_size_area();
p1 <- p1 + scale_size( range=c(5, 30)) + theme_bw(); # + scale_fill_gradientn(colours = heat_hcl(7), limits = c(-300, 0) );
ex <- one.data [ one.data$dispensability < 0.15, ];
p1 <- p1 + geom_text( data = ex, aes(plot_X, plot_Y, label = description), colour = I(alpha("black", 0.85)), size = 3 );
p1 <- p1 + labs (y = "semantic space x", x = "semantic space y");
p1 <- p1 + theme(legend.key = element_blank()) ;
one.x_range = max(one.data$plot_X) - min(one.data$plot_X);
one.y_range = max(one.data$plot_Y) - min(one.data$plot_Y);
p1 <- p1 + xlim(min(one.data$plot_X)-one.x_range/10,max(one.data$plot_X)+one.x_range/10);
p1 <- p1 + ylim(min(one.data$plot_Y)-one.y_range/10,max(one.data$plot_Y)+one.y_range/10);
p1
Sorry the code is quite busy, it's what the website provides me with so it's my starting point - any guidance on libraries or anything at all I can use to figure out how to highlight smaller groupings in this ggplot would be appreciated.
Edit: I've also looked at k-means clustering to give me some groupings to try to visualize using -
xy <- dplyr::select(one.data, plot_X, plot_Y)
res.km <- kmeans(scale(xy), 3, nstart = 25)
A badly made and not accurate example of what I expect overlaid groupings to look like, but if I used k-means to identify 3 groups, the style/type of plot I'm then trying to view would look like:
I can see res.km <- kmeans(scale(xy), 3, nstart = 25)
gives each row cluster between 1-3 is there a way to highlight groups like these?
ANSWER
Answered 2021-Mar-27 at 23:16A way to group them is using different shape.
# Take the cluster from kmean result
one.data$cluster <- factor(res.km$cluster)
# define shape_manual to provided to scale_shape_manual
shape_manual <- c(21, 22, 23)
names(shape_manual) <- levels(one.data$cluster)
ggplot( data = one.data ) +
# mapping shape with cluster
# As shape 21-23 have both fill & colour I am using fill here
geom_point( aes( plot_X, plot_Y, fill = log10_p_value,
size = plot_size, shape = cluster),
alpha = I(0.6) ) + scale_size_area() +
geom_point( aes(plot_X, plot_Y, size = plot_size, shape = cluster),
fill = "transparent", colour = I (alpha ("black", 0.6) )) + scale_size_area() +
scale_fill_gradientn( colours = c("blue", "green", "yellow", "red"),
limits = c( min(one.data$log10_p_value), 0) ) +
# Define the manual scales for shapes with shape_manual define earlier
scale_shape_manual(values = shape_manual) +
scale_size( range=c(5, 30)) + theme_bw() +
geom_text( data = ex, aes(plot_X, plot_Y, label = description),
colour = I(alpha("black", 0.85)), size = 3 ) +
labs (y = "semantic space x", x = "semantic space y") +
theme(legend.key = element_blank()) +
xlim(min(one.data$plot_X)-one.x_range/10,max(one.data$plot_X)+one.x_range/10) +
ylim(min(one.data$plot_Y)-one.y_range/10,max(one.data$plot_Y)+one.y_range/10)
QUESTION
I have this data frame and table:
circ.plot <- structure(list(ID = c("GO:0010257", "GO:0097031", "GO:0032981",
"GO:0006120", "GO:0046654", "GO:0051123", "GO:0001731", "GO:0000724",
"GO:0006368", "GO:0006366", "GO:0044068", "GO:0000083", "GO:0034644",
"GO:0006367", "GO:0016925", "GO:0065004", "GO:0075733", "GO:0030330",
"GO:0000956", "GO:2001251", "GO:0070646", "GO:0000377", "GO:0000398",
"GO:0008543", "GO:0006094", "GO:0009267", "GO:2000811", "GO:0046661",
"GO:0034314", "GO:0071456", "GO:0034976", "GO:0051301", "GO:0030520",
"GO:0002066", "GO:0001843", "GO:0034599", "GO:0034446", "GO:0030902",
"GO:0007126", "GO:0051248", "GO:0046488", "GO:0098916", "GO:0099536",
"GO:0099537", "GO:0007268", "GO:0042592", "GO:0016192", "GO:0009615",
"GO:0048878", "GO:0007606", "GO:0006812"), term = structure(c(28L,
25L, 24L, 23L, 46L, 41L, 15L, 13L, 48L, 49L, 26L, 38L, 8L, 50L,
36L, 37L, 20L, 12L, 33L, 30L, 35L, 42L, 27L, 14L, 16L, 7L, 29L,
21L, 2L, 5L, 39L, 4L, 19L, 11L, 32L, 6L, 44L, 17L, 22L, 31L,
34L, 1L, 45L, 47L, 10L, 18L, 51L, 40L, 9L, 43L, 3L), .Label = c("anterograde trans-synaptic signaling",
"Arp2/3 complex-mediated actin nucleation", "cation transport",
"cell division", "cellular response to hypoxia", "cellular response to oxidative stress",
"cellular response to starvation", "cellular response to UV",
"chemical homeostasis", "chemical synaptic transmission", "columnar/cuboidal epithelial cell development",
"DNA damage response, signal transduction by p53 class mediator",
"double-strand break repair via homologous recombination", "fibroblast growth factor receptor signaling pathway",
"formation of translation preinitiation complex", "gluconeogenesis",
"hindbrain development", "homeostatic process", "intracellular estrogen receptor signaling pathway",
"intracellular transport of virus", "male sex differentiation",
"meiotic nuclear division", "mitochondrial electron transport, NADH to ubiquinone",
"mitochondrial respiratory chain complex I assembly", "mitochondrial respiratory chain complex I biogenesis",
"modulation by symbiont of host cellular process", "mRNA splicing, via spliceosome",
"NADH dehydrogenase complex assembly", "negative regulation of anoikis",
"negative regulation of chromosome organization", "negative regulation of protein metabolic process",
"neural tube closure", "nuclear-transcribed mRNA catabolic process",
"phosphatidylinositol metabolic process", "protein modification by small protein removal",
"protein sumoylation", "protein-DNA complex assembly", "regulation of transcription involved in G1/S transition of mitotic cell cycle",
"response to endoplasmic reticulum stress", "response to virus",
"RNA polymerase II transcriptional preinitiation complex assembly",
"RNA splicing, via transesterification reactions with bulged adenosine as nucleophile",
"sensory perception of chemical stimulus", "substrate adhesion-dependent cell spreading",
"synaptic signaling", "tetrahydrofolate biosynthetic process",
"trans-synaptic signaling", "transcription elongation from RNA polymerase II promoter",
"transcription from RNA polymerase II promoter", "transcription initiation from RNA polymerase II promoter",
"vesicle-mediated transport"), class = "factor"), zscore = c(-3.46410161513775,
-3.46410161513775, -3.46410161513775, -3.3166247903554, -2, -2,
-2, -2.23606797749979, -2.82842712474619, -5.75396455568751,
-2, -2, -2.23606797749979, -3, -2.23606797749979, -3.3166247903554,
-2, -2.23606797749979, -2.44948974278318, -2.23606797749979,
-2.82842712474619, -2.12132034355964, -2.12132034355964, -2,
-2, -2.23606797749979, -1, -2.23606797749979, -2, -2.23606797749979,
-3, -3.74165738677394, -2, -2, -2, -2.44948974278318, -2.23606797749979,
-2, -2, -4.12310562561766, -2, -2.44948974278318, -2.44948974278318,
-2.44948974278318, -2.44948974278318, -4.35889894354067, -4.12310562561766,
-2, -3.16227766016838, -2, -2.44948974278318), log.pvalue = c(16.4341815462077,
16.4341815462077, 16.4341815462077, 15.4166395849858, 5.92824818488478,
2.58701854983776, 2.77229104200152, 1.43213516747591, 4.97971481972944,
3.01821883926577, 2.50662804866096, 2.50662804866096, 1.91419304117877,
3.4556013313449, 0.641967092310259, 4.00148992227778, 0.899884391802341,
0.998141509883199, 0.494769781468246, 0.943462187368159, 2.82923816321647,
0.674901317134023, 0.674901317134023, 0.402254382343205, 0.798968503025238,
0.859429723274406, 3.59488384361848, 0.395968939627387, 2.12069030613072,
0.650772061555318, 1.48001653715317, 1.27340018650023, 1.56027821018946,
1.24689856450699, 0.569757430240787, 0.313722009606878, 1.48001653715317,
0.0458121146729004, 0, 0.14904292705079, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0)), class = "data.frame", row.names = c(NA, -51L))
circ.label <- circ.plot[circ.plot$log.pvalue > 3, ]
circ.table <- circ.label[ ,c("ID","term")]
table1 <- tableGrob(circ.table, rows=NULL, theme=ttheme_minimal())
I have plotted them like this:
p <- ggplot(circ.plot, aes(x = `zscore`,
y = `log.pvalue`,
size= `count`)) +
scale_size(range = c(5, 15)) +
theme_bw(base_size = 22) +
theme(legend.justification= "top",legend.direction="horizontal") +
geom_point(shape=21,
alpha=0.5,
fill="red") +
guides(fill= FALSE) +
geom_text_repel(aes(x=`zscore`,y=`log.pvalue`,label=`ID`, size = 3),
data=circ.label,
nudge_y=c(-2,2),
show.legend = FALSE)
grid.arrange(p,table1,nrow=2, ncol=1, as.table=TRUE)
I want to move the table to the right of the plot and below the legend, for which I have tried this:
grid.arrange(p,table1,nrow=1, ncol=2, as.table=TRUE)
But that gives the following error:
Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), : Viewport has zero dimension(s)`
How can I move the table to the left of the plot and below the legend?
ANSWER
Answered 2021-Mar-26 at 09:06Extract the legend as grob, then use layout matrix, see example:
library(ggplot2)
library(gridExtra)
# using mtcars as an example data
circ.table <- mtcars[1:10, 1:2]
table1 <- tableGrob(circ.table)
# main plot
p <- ggplot(mtcars, aes(x = mpg, y = disp, size= wt)) +
geom_point() +
theme(legend.justification = "top", legend.direction = "horizontal")
# extract legend
legend <- cowplot::get_legend(p)
# plot using layout matrix
grid.arrange(p + guides(size = FALSE), # plot without legend
legend, # then add legend as grob
table1,
layout_matrix = rbind(c(1,2),
c(1,3),
c(1,3),
c(1,3),
c(1,3)))
Also, look into patchwork package.
QUESTION
I have a plot I create from a script provided by a webtool called REVIGO. It gives plots of biological terms and how they overlap with each other, however the text is overlapping in some parts so they are not readable. Is there a way to change the positioning of text in ggplot for some cases, and not move the plot the text is associated with?
For example, my plot looks like:
The text in a couple places is overlapping and I want to move the text to be readable without moving the circles themselves.
The code I used to make this plot (which also provides the input data) is:
library( ggplot2 );
library( scales );
revigo.names <- c("term_ID","description","frequency_%","plot_X","plot_Y","plot_size","log10_p_value","uniqueness","dispensability");
revigo.data <- rbind(c("GO:0002376","immune system process",16.463,-0.302,-3.807, 3.455,-8.3307,0.995,0.000),
c("GO:0006928","movement of cell or subcellular component",10.987, 1.052, 1.113, 3.280,-8.8153,0.965,0.000),
c("GO:0007610","behavior", 3.254,-1.620, 0.960, 2.752,-4.0048,0.994,0.000),
c("GO:0008150","biological_process",100.000,-6.029,-0.499, 4.239,-8.7447,1.000,0.000),
c("GO:0009987","cellular process",90.329,-5.288, 0.130, 4.195,-10.0701,0.999,0.000),
c("GO:0010243","response to organonitrogen compound", 4.697, 6.870,-2.756, 2.911,-12.7100,0.865,0.000),
c("GO:0023052","signaling",36.613, 2.976,-6.718, 3.803,-7.1931,0.996,0.000),
c("GO:0032501","multicellular organismal process",41.143, 3.761,-0.715, 3.853,-17.2741,0.997,0.000),
c("GO:0032502","developmental process",33.982,-2.865,-0.660, 3.770,-14.4202,0.996,0.000),
c("GO:0034762","regulation of transmembrane transport", 2.452,-3.982, 3.261, 2.629,-13.4123,0.788,0.000),
c("GO:0040007","growth", 5.447, 0.651,-0.889, 2.975,-4.2140,0.995,0.000),
c("GO:0040011","locomotion", 9.452, 2.305,-0.865, 3.215,-8.1068,0.995,0.000),
c("GO:0050896","response to stimulus",49.302, 3.556,-5.122, 3.932,-17.7852,0.997,0.000),
c("GO:0051179","localization",36.018,-0.564,-0.041, 3.795,-8.9245,0.996,0.000),
c("GO:0051704","multi-organism process", 9.873, 1.677,-5.787, 3.234,-4.6925,0.995,0.000),
c("GO:0065007","biological regulation",67.069,-4.157, 0.147, 4.065,-15.5918,0.998,0.000),
c("GO:0007154","cell communication",36.705,-0.841,-2.282, 3.804,-8.3595,0.992,0.006),
c("GO:0008283","cell proliferation",11.321, 2.644, 1.154, 3.293,-4.5376,0.982,0.024),
c("GO:0042391","regulation of membrane potential", 2.204,-0.568,-6.816, 2.583,-10.6073,0.895,0.035),
c("GO:0043086","negative regulation of catalytic activity", 4.934, 4.164,-2.157, 2.932,-4.9172,0.880,0.039),
c("GO:0019216","regulation of lipid metabolic process", 1.685, 3.142, 6.777, 2.467,-6.3215,0.880,0.043),
c("GO:0044057","regulation of system process", 2.862,-6.608, 1.584, 2.696,-13.1469,0.868,0.046),
c("GO:0051093","negative regulation of developmental process", 4.720,-4.950,-3.614, 2.913,-9.9031,0.830,0.050),
c("GO:0006793","phosphorus metabolic process",18.702,-4.363, 6.140, 3.511,-6.8729,0.961,0.053),
c("GO:0008284","positive regulation of cell proliferation", 4.859,-0.261, 4.128, 2.926,-9.2882,0.832,0.055),
c("GO:0065008","regulation of biological quality",20.202,-0.644, 5.306, 3.544,-20.3125,0.920,0.057),
c("GO:0050865","regulation of cell activation", 3.174, 2.497,-4.613, 2.741,-4.7878,0.917,0.062),
c("GO:0065009","regulation of molecular function",17.288,-1.972, 4.374, 3.477,-17.1959,0.923,0.078),
c("GO:0048518","positive regulation of biological process",30.969, 0.597, 8.033, 3.730,-15.2993,0.895,0.095),
c("GO:0051128","regulation of cellular component organization",13.335, 1.445, 4.799, 3.364,-4.5003,0.899,0.104),
c("GO:0007169","transmembrane receptor protein tyrosine kinase signaling pathway", 3.976, 6.886, 4.332, 2.839,-7.5986,0.845,0.114),
c("GO:0032101","regulation of response to external stimulus", 3.976, 6.545, 2.631, 2.839,-9.0405,0.838,0.114),
c("GO:0048519","negative regulation of biological process",26.855,-0.542, 7.989, 3.668,-12.9469,0.898,0.134),
c("GO:0044238","primary metabolic process",60.306,-3.339, 6.565, 4.019,-4.5229,0.961,0.140),
c("GO:0042221","response to chemical",23.993, 7.702,-0.115, 3.619,-24.7399,0.923,0.160),
c("GO:0009628","response to abiotic stimulus", 6.705, 8.008, 1.525, 3.066,-11.1726,0.938,0.174),
c("GO:0007187","G-protein coupled receptor signaling pathway, coupled to cyclic nucleotide second messenger", 1.033, 5.463, 5.279, 2.255,-5.0942,0.874,0.186),
c("GO:0031099","regeneration", 1.016,-3.828,-4.295, 2.248,-4.6216,0.955,0.186),
c("GO:0009719","response to endogenous stimulus", 9.175, 6.984, 0.467, 3.202,-15.8069,0.935,0.188),
c("GO:0098657","import into cell", 0.415,-3.347, 2.843, 1.863,-4.7077,0.928,0.190),
c("GO:0051239","regulation of multicellular organismal process",15.268,-6.085, 3.408, 3.423,-18.1433,0.885,0.192),
c("GO:0007268","chemical synaptic transmission", 3.474, 5.008, 6.277, 2.780,-4.7471,0.914,0.194),
c("GO:0050794","regulation of cellular process",60.427, 0.909, 7.170, 4.020,-15.1986,0.875,0.198),
c("GO:0009605","response to external stimulus",12.043, 7.990, 0.686, 3.320,-7.7520,0.932,0.202),
c("GO:0019222","regulation of metabolic process",35.730,-0.798, 6.924, 3.792,-8.7399,0.888,0.217),
c("GO:0048589","developmental growth", 3.272,-5.765,-3.288, 2.754,-4.6289,0.942,0.220),
c("GO:0048729","tissue morphogenesis", 3.572,-4.454,-4.112, 2.792,-4.2055,0.942,0.223),
c("GO:0048732","gland development", 2.418,-5.936,-2.151, 2.623,-3.9830,0.930,0.224),
c("GO:0032879","regulation of localization",14.409,-3.921, 4.876, 3.398,-19.9830,0.839,0.231),
c("GO:0006950","response to stress",21.310, 7.271,-0.252, 3.567,-11.7905,0.925,0.241),
c("GO:0048583","regulation of response to stimulus",21.610, 7.157, 2.071, 3.574,-14.0640,0.849,0.242),
c("GO:0031323","regulation of cellular metabolic process",33.837, 1.983, 7.193, 3.768,-7.3665,0.804,0.256),
c("GO:0003008","system process",11.575,-6.863, 1.039, 3.303,-14.5229,0.965,0.259),
c("GO:0050789","regulation of biological process",63.456, 0.625, 7.037, 4.041,-16.1244,0.896,0.274),
c("GO:0051899","membrane depolarization", 0.565,-1.372,-6.528, 1.996,-4.2411,0.910,0.284),
c("GO:0061024","membrane organization", 7.299,-5.167, 4.037, 3.102,-4.4237,0.987,0.286),
c("GO:0035150","regulation of tube size", 0.675,-0.489,-6.505, 2.072,-5.1129,0.901,0.290),
c("GO:0009636","response to toxic substance", 1.264, 6.039,-4.714, 2.342,-5.3072,0.915,0.292),
c("GO:0061041","regulation of wound healing", 0.750, 5.568, 3.354, 2.117,-5.7696,0.869,0.296),
c("GO:0007165","signal transduction",33.618, 5.808, 3.554, 3.765,-20.2403,0.784,0.296),
c("GO:0010038","response to metal ion", 1.829, 6.463,-4.185, 2.502,-5.0768,0.911,0.307),
c("GO:0001101","response to acid chemical", 1.858, 6.221,-3.913, 2.509,-5.3072,0.911,0.308),
c("GO:0043066","negative regulation of apoptotic process", 4.749,-4.234,-2.719, 2.916,-5.6778,0.845,0.315),
c("GO:0042493","response to drug", 2.366, 6.792,-3.628, 2.614,-12.6716,0.908,0.319),
c("GO:0010035","response to inorganic substance", 2.816, 6.714,-3.232, 2.689,-6.8125,0.906,0.327),
c("GO:0048856","anatomical structure development",31.558,-4.976,-4.080, 3.738,-12.4157,0.940,0.339),
c("GO:0051716","cellular response to stimulus",40.358, 7.607, 0.187, 3.845,-21.1158,0.911,0.359),
c("GO:0055082","cellular chemical homeostasis", 4.108,-1.327,-6.764, 2.853,-9.7520,0.840,0.364),
c("GO:0007267","cell-cell signaling", 9.025, 5.287, 5.987, 3.195,-5.1175,0.925,0.366),
c("GO:0043408","regulation of MAPK cascade", 3.883, 5.837, 4.526, 2.829,-6.8794,0.689,0.371),
c("GO:0048522","positive regulation of cellular process",27.732,-1.038, 7.337, 3.682,-15.2518,0.798,0.376),
c("GO:0010817","regulation of hormone levels", 2.764,-0.848,-6.705, 2.681,-6.8697,0.892,0.376),
c("GO:0050878","regulation of body fluid levels", 2.862,-1.665,-6.559, 2.696,-4.2541,0.891,0.378),
c("GO:1901654","response to ketone", 1.039, 5.708,-4.850, 2.258,-5.2644,0.898,0.394));
one.data <- data.frame(revigo.data);
names(one.data) <- revigo.names;
one.data <- one.data [(one.data$plot_X != "null" & one.data$plot_Y != "null"), ];
one.data$plot_X <- as.numeric( as.character(one.data$plot_X) );
one.data$plot_Y <- as.numeric( as.character(one.data$plot_Y) );
one.data$plot_size <- as.numeric( as.character(one.data$plot_size) );
one.data$log10_p_value <- as.numeric( as.character(one.data$log10_p_value) );
one.data$frequency <- as.numeric( as.character(one.data$frequency) );
one.data$uniqueness <- as.numeric( as.character(one.data$uniqueness) );
one.data$dispensability <- as.numeric( as.character(one.data$dispensability) );
p1 <- ggplot( data = one.data );
p1 <- p1 + geom_point( aes( plot_X, plot_Y, colour = log10_p_value, size = plot_size), alpha = I(0.6) ) + scale_size_area();
p1 <- p1 + scale_colour_gradientn( colours = c("blue", "green", "yellow", "red"), limits = c( min(one.data$log10_p_value), 0) );
p1 <- p1 + geom_point( aes(plot_X, plot_Y, size = plot_size), shape = 21, fill = "transparent", colour = I (alpha ("black", 0.6) )) + scale_size_area();
p1 <- p1 + scale_size( range=c(5, 30)) + theme_bw(); # + scale_fill_gradientn(colours = heat_hcl(7), limits = c(-300, 0) );
ex <- one.data [ one.data$dispensability < 0.15, ];
p1 <- p1 + geom_text( data = ex, aes(plot_X, plot_Y, label = description), colour = I(alpha("black", 0.85)), size = 3 );
p1 <- p1 + labs (y = "semantic space x", x = "semantic space y");
p1 <- p1 + theme(legend.key = element_blank()) ;
one.x_range = max(one.data$plot_X) - min(one.data$plot_X);
one.y_range = max(one.data$plot_Y) - min(one.data$plot_Y);
p1 <- p1 + xlim(min(one.data$plot_X)-one.x_range/10,max(one.data$plot_X)+one.x_range/10);
p1 <- p1 + ylim(min(one.data$plot_Y)-one.y_range/10,max(one.data$plot_Y)+one.y_range/10);
p1;
This code should run standalone so anyone can make the same plot - how can I adjust this code to move the text?
ANSWER
Answered 2021-Feb-12 at 15:43Your code is a bit messy. I found a solution with ggrepel
, but I do not know if it is the expected figure.
Code:
one.data <- data.frame(revigo.data);
names(one.data) <- revigo.names;
one.data <- one.data [(one.data$plot_X != "null" & one.data$plot_Y != "null"), ];
one.data$plot_X <- as.numeric( as.character(one.data$plot_X) );
one.data$plot_Y <- as.numeric( as.character(one.data$plot_Y) );
one.data$plot_size <- as.numeric( as.character(one.data$plot_size) );
one.data$log10_p_value <- as.numeric( as.character(one.data$log10_p_value) );
one.data$frequency <- as.numeric( as.character(one.data$frequency) );
one.data$uniqueness <- as.numeric( as.character(one.data$uniqueness) );
one.data$dispensability <- as.numeric( as.character(one.data$dispensability) );
p1 <- ggplot( data = one.data, aes(plot_X, plot_Y, label = description) );
p1 <- p1 + geom_point( aes( plot_X, plot_Y, colour = log10_p_value, size = plot_size), alpha = I(0.6) ) + scale_size_area();
p1 <- p1 + scale_colour_gradientn( colours = c("blue", "green", "yellow", "red"), limits = c( min(one.data$log10_p_value), 0) );
p1 <- p1 + geom_point( aes(plot_X, plot_Y, size = plot_size), shape = 21, fill = "transparent", colour = I (alpha ("black", 0.6) )) + scale_size_area();
p1 <- p1 + scale_size( range=c(5, 30)) + theme_bw(); # + scale_fill_gradientn(colours = heat_hcl(7), limits = c(-300, 0) );
ex <- one.data [ one.data$dispensability < 0.15, ];
p1 <- p1 + labs (y = "semantic space x", x = "semantic space y");
p1 <- p1 + theme(legend.key = element_blank()) ;
one.x_range = max(one.data$plot_X) - min(one.data$plot_X);
one.y_range = max(one.data$plot_Y) - min(one.data$plot_Y);
p1 <- p1 + xlim(min(one.data$plot_X)-one.x_range/10,max(one.data$plot_X)+one.x_range/10);
p1 <- p1 + ylim(min(one.data$plot_Y)-one.y_range/10,max(one.data$plot_Y)+one.y_range/10);
library(ggrepel)
p1 <- p1 + geom_label_repel();
p1
Changes:
Modified: p1 <- ggplot( data = one.data, aes(plot_X, plot_Y, label = description) );
Excluded: p1 <- p1 + geom_text( data = ex, aes(plot_X, plot_Y, label = description), colour = I(alpha("black", 0.85)), size = 3 );
Added: p1 <- p1 + geom_label_repel();
Result:
QUESTION
What I've done:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2
python --version
Now I have multiple errors and cannot start terminator or update. When I start mate terminal, I receive this error:
/usr/bin/screenfetch: /usr/bin/lsb_release : /usr/bin/python3 : mauvais interpréteur: Aucun fichier ou dossier de ce type
When I actualise with synaptic, I receive this error:
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
All these errors began with the installation of Python as I describe in the beginning.
ANSWER
Answered 2020-Dec-23 at 01:29I have found that post : Problem with sudo apt update in Ubuntu 18.04: Post-Invoke-Success if /usr/bin/test -w /var/lib/command-not-found/
and i find an answer by doing :
apt download python3-minimal
sudo apt install --reinstall ./python3-minimal_*.deb
sudo apt install -f
I had to reinstall some few apps after that few lines and all is back to normal.
QUESTION
Goal
Debug with PHP Debug, Xdebug and VSCodium.
Problem
VSCode doesn't start debugging. When I click Start Debugging
the blue line under the debugging control buttons appears and moves for a few seconds and then the control buttons disappear. Same when I press the green "Run" button
Also on the left side, where "variables", "watch" and "stack" are shown nothing appears.
Description
I have no experience with the VSCodium debugging options. I used a couple of tutorials (1, 2, 3, videos and tried certainly the proposal from the VSCode PHP Debug extension site (which I use). I'm using Codium (VSCode without MS) on a Linux Mint 20 machine. PHP 7.4 and Xdebug are installed via Linux Synaptic Package Manager. Of course the Xdebug helper in Firefox is enabled, breakpoints are set and I tried it in different projects. I tried a few things in the php.ini
. That's how it looks at the moment:
[XDebug]
xdebug.remote_enable = 1
; xdebug.remote_autostart = 1
; xdebug.remote_connect_back = 1
Xdebug itself is loaded via the /etc/php/7.4/cli/conf.d/20-xdebug.ini
and in PhpStorm it works like expected but not in VSCodium.
That's the standard launch.json
, which is saved in the .vscode
folder in the project root:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Here is a part of my phpinfo()
output:
And the xdebug part:
And here the xdebug log when i try it with VSCodium:
[5625] Log opened at 2020-10-04 10:05:20
[5625] I: Connecting to configured address/port: localhost:9000.
[5625] W: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (29).
[5625] E: Could not connect to client. :-(
[5625] Log closed at 2020-10-04 10:05:20
My guess is, that there is a basic VSCodium debugging thing, I didn't enabled or so. But I don't know, what it could be. Maybe somebody has an idea?
ANSWER
Answered 2020-Dec-22 at 09:32Finally found the solution. Its a Codium specific bug. At VSCode it works. Found the solution here: https://github.com/VSCodium/vscodium/issues/466
make sure you don't have PHP Debug extension installed;
go to https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug and download vsix file using "Resources" → "Download Extension";
in VSCodium go to "Extensions" sidebar and then click three dots icon near to "Extensions" title;
choose "Install from VSIX…" and select downloaded file.
@LazyOne thanks for your help again :)
Edit:
If you are updated to Xdebug 3.* you have to modify the xdebug section in the php.ini
:
Add this:
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9000
You could drop the last line if you change instead the port to 9003 in your launch.json
.
See also this GitHub Issue
QUESTION
I have two Ubuntu 18.04 machines one have access to the internet and has ROS Melodic installed with some packages and dependencies, the other, however, doesn't have access to the internet, now my question is how to pack my ROS Melodic (on the online machine) using snapcraft, synaptic or whatever and make it available offline for the second Ubuntu machine?
ANSWER
Answered 2020-Dec-03 at 08:31Done by downloading the Debian (.deb) file of Synaptic Package Manager and its dependencies in the online machine, send them to the offline one install them and set it up to accept packages from http://packages.ros.org/ros/ubuntu
, open Synaptic Package Manager and mark (by hand) every package you want to install (by clicking on origin
and select bionic/main (packages.ros.org)
, right click on the package and select "mark for installation"), after done marking, from file click on generate package download script
you'll get a .sh file.
now take that .sh file to the online machine, create a new folder place that .sh file in the folder (so you'll not end up in mess like I did) and run the .sh, when it's done you'll have all the .deb files of the packages you marked, send those .deb files to the offline machine, open a terminal in the folder that contains the .deb files and install them by typing sudo apt install ./*
and you're done!
QUESTION
I am trying to use Kristen to generate FPGA host verilog and a C++ source software to access the FPGA host. The problem is that I have a several chunks of common registers for controlling several neurotrophic processor instances (which are parametrizable) and I don't want to just make copies of the XML definition. Is there a way to make a section of the definition file replicate? Is there a way to feed it a parameter to make it replicate? So if I increase the NMP instance, I get more instances of the SW host?
Specifically, I want to replicate the nmp register per NMP instance. But I only want one copy of the version, DDR and core registers.
What I don't want to do is make 1000 copies of those lines and give them individual names.
debug.log
walker.png
nmp_mst
NMP master configuration
32
127
zero_align
zero_align
../generated
../../docs
xreg_v1_0_0
verilog
ANSWER
Answered 2020-Apr-12 at 05:46So you probably need to break this up a little differently. Not totally knowing HOW you want this organized, I would suggest making two seperate modules. One of the modules is your single instance with your device and core stuff, and the second module is your nmp stuff and is replicated X number of times.
There is no way to feed a define or parameter to the XML to control the replication externally, but you can place a fixed number inside of the XML that will cause replication. There are some tradeoff's here. I think one way is more expensive than the other but you can try it out and see what happens.
I break it into two modules below and add a "duplicate" attribute. I think this will litterally create 1000 modules in verilog and will assign them names like nmp1, nmp2... nmp1000. I think this is very simple to do, but it will cost you lots of microprocessor interface logic.
A little more complicated thing to do is to place the duplicate on each of the registers and memories themselves. I think this will save some resources, but it is still going to be a lot of logic for a 1000 instances.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install synaptic
Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesExplore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits
Save this library and start creating your kit
Share this Page