How can I create an aesthetic gene neighborhood diagram from CSV data to showcase synteny?
0
0
Entering edit mode
4 months ago
Rohan ▴ 20

I have a dataset in CSV format containing gene information for different species. The data includes columns for species, gene symbol, start position, stop position, and orientation. I would like to create a gene neighborhood diagram with the following specifications:

  1. Y-Axis: Species should be arranged on the Y-axis.
  2. X-Axis: Genes should be plotted on the X-axis, represented as arrows of equal size and equidistant from each other.
  3. Arrow Labels: Each arrow should have the gene symbol value written inside it.
  4. Color Coding: Arrows should be colored based on the gene symbol value.
  5. Orientation: The orientation of the arrow should reflect the orientation value (0 or 1), where 0 represents left and 1 represents right.
  6. Connecting Rectangles: Arrows with the same gene symbol across different species should be connected vertically with a rectangle shape.

Here's a sample of the data in Github Gist:

Is there a way to achieve this visualization in R? What other tools or methods should I use to create such a diagram? Any guidance or examples would be greatly appreciated.

R Plot Diagram Visualization • 563 views
ADD COMMENT
1
Entering edit mode

Never tried it but I just remembered this R package geneviewer mentioned on this Monday's Biostars Herald (22 july), it may be of use.

ADD REPLY
0
Entering edit mode

Thank you, this could prove to be helpful.

ADD REPLY
1
Entering edit mode

Please do not paste screenshots of plain text content, it is counterproductive. You can copy paste the content directly here (using the code formatting option shown below), or use a GitHub Gist if the content volume exceeds allowed length here.

code_formatting

ADD REPLY
1
Entering edit mode

Thank you for your suggestion, I made the appropriate changes.

ADD REPLY

Login before adding your answer.

Traffic: 1956 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6