Question: help to generate 100% Stacked Bar Chart or a histogram
0
gravatar for kamel
3 months ago by
kamel0
kamel0 wrote:

Hi,

I have the orthology results on 8 proteomes to generate the core, accessory and specific sequences.

I need to represent my data for a 100% Stacked Bar Chart or a histogram on R to see the cores, accessories and specific sequences between the 8 proteomes. Do you have an idea about which code to use or which ideas?

Below a part of the generated matrix I use

For information (if the first column at number 8 and the second 8 also means -> core sequence ) (If the 1: 1 ---> specific ). (The other: accessory)

Species Genes   RS.faa  KN.fasta    YT.fasta    JK.fasta    NJ.fasta    ER.fasta    AZ.fasta    QS.fasta
8 8   RS001_00035-RA  KN013_12875-RA  YT_13112-RA JK_12364-RA NJ_12794-RA ER_10866-RA AZ_13111-RA QS_12228-RA
7 7   RS001_00034-RA  KN013_12876-RA  YT_13116-RA JK005_12363-RA  NJ_12793-RA ER_10865-RA *   QS_12229-RA
8 8   RS001_00033-RA  KN013_12877-RA  YT_13113-RA JK005_12362-RA  NJ_12792-RA ER_10864-RA AZ_12122-RA QS_12230-RA
8 8   RS001_00032-RA  KN013_12878-RA  YT_13114-RA JK005_12361-RA  NJ_12791-RA ER_10863-RA AZ_12123-RA QS_12231-RA
7 7   RS001_00030-RA  KN013_12880-RA  YT_13111-RA JK005_12359-RA  NJ_12789-RA ER_10861-RA AZ_12125-RA QS_12232-RA
8 8   RS001_00029-RA  KN013_12881-RA  YT_13102-RA     NJ_12788-RA ER_10695-RA AZ_12126-RA QS_12233-RA
8 8   RS001_00027-RA  KN013_12883-RA  YT_13109-RA JK005_12356-RA  NJ_12786-RA ER_10697-RA AZ_12128-RA QS_12235-RA
8 8   RS001_00026-RA  KN013_12884-RA  YT_13108-RA JK005_12355-RA  NJ_12785-RA ER_10698-RA AZ_12129-RA QS_12236-RA
3 3   RS_13141-RA         JK_13111-RA     ER_13111-RA     
2 2       KN_13119-RA         NJ_13111-RA         
4 4       KN_13181-RA YT_13111-RA         ER_13111-RA     QS_1371-RA
1 1       KN_15111-RA                     
2 2           YT_13111-RA JK_13111-RA             
2 2                   NJ_13111-RA ER_13111-RA     
2 2       KN_13411-RA                     QS_1313-RA
1 1   RS_13111-RA                         
1 1       KN_13113-RA                     
1 1           YT_1318-RA
  
sequence R gene • 135 views
ADD COMMENTlink modified 3 months ago • written 3 months ago by kamel0

Can you try to tidy your formatting a bit? Just re-paste it, highlight it, and then use the 101 010 button. People will look at your data and not want to spend time helping you because the data looks very messy. They would have to copy-paste it and then spend time manipulating it to an 'analysis ready' format.

If you just want a stacked barchart, just take a look at the barchart function in R. Also, look here:

ADD REPLYlink modified 3 months ago • written 3 months ago by Kevin Blighe28k

You are looking for the 2nd example in this article.

http://rgraphgallery.blogspot.com/2013/04/rg-stacked-bar-chart-number-and-percent.html

ADD REPLYlink written 3 months ago by arup480
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 981 users visited in the last hour