# ecological process to community assembly

**URL:** <https://help.galaxyproject.org/t/ecological-process-to-community-assembly/10933>\
**Category:** Uncategorized\
**Created:** [October 11, 2023, 9:35am UTC](https://help.galaxyproject.org/t/ecological-process-to-community-assembly/10933 "2023-10-11T09:35:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex\_123](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@alex\_123](https://help.galaxyproject.org/u/alex_123)\
**Post date:** [October 11, 2023, 9:35am UTC](https://help.galaxyproject.org/t/ecological-process-to-community-assembly/10933/1 "2023-10-11T09:35:31Z")

</div>

I calculated the microbial community assembly file through IEG Statistical Analysis Pipeline, and now I want to visualize this data file.  
I want to convert my data into the form of FIG 1

 ![image](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/0/0aab6e23a7650dee090891c65d4c4aa33a0d9f67.png)  
FIG 1

I did a data visualization in R and this is the result I got FIG 2

 ![FIG 2](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/e/e6ffefcdc9fbf87983684b789d7ec22bf1f2aad7.png)

This is obviously a big difference, and the percentages for each group do not add up to 100%.  
My metadata file(FIG 3) and process file(FIG 4) are as follows, how can I write R code to achieve the effect of FIG 1

 ![FIG 3](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/5/50b864a898b34c21d0ccdfbd6ff5f532f8a37fc6.png)

 ![FIG 4](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/b/bdbe90a83f4fde772bac52ad784c3fec26cb7a0d.png)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [October 11, 2023, 8:51pm UTC](https://help.galaxyproject.org/t/ecological-process-to-community-assembly/10933/2 "2023-10-11T20:51:18Z")

</div>

Hi @alex_123

You data is currently in a stacked bar graph.

You could graph your data as a percentage bar graph instead.

Find all the graphing tools by clicking on the little graph icon inside an expanded dataset.
