You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -102,3 +102,42 @@ Similar codes can be used for another set of LefSe biomarkers associated with: R
102
102
We can generate a nice plot showing the mutual biomarkers shared between different sexual practices by combining these plots.
103
103

104
104
105
+
### Lollipop plot
106
+
107
+
#### R packages required
108
+
109
+
*[ggpubr](https://rpkgs.datanovia.com/ggpubr/)
110
+
111
+
In the last section, we will use lillipop plot to show the number of shared biomarkers associated with different sexual practices.
112
+
Here, you can start directly from our prepared file [shared_biomarkers.tsv](../example_data/shared_biomarkers.tsv) containing the number of LefSe biomarkers shared by different sexual practices (categorized as *risk.increasing* and *risk.reducing*).
113
+
114
+
Firstly, open a new R working script, and load [shared_biomarkers.tsv](../example_data/shared_biomarkers.tsv) from `path_to_the_package/KunDH-2023-CRM-MSM_metagenomics/examples/`.
Once the data was loaded, we use a function [ggdotchart](https://rpkgs.datanovia.com/ggpubr/reference/ggdotchart.html) implement in [ggpubr](https://rpkgs.datanovia.com/ggpubr/) for visualization.
124
+
125
+
```{r}
126
+
>ggdotchart(shared_biomarkers, x = "group.number", y ="shared.biomarker.number",
127
+
color = "type", palette = c("#fb5238", "#469537"), size = 5,

142
+
143
+
Note: The figures displayed above had been edited and arranged using inkscape on the base of the crude output in order to enhance the readability and aesthetic sense.
0 commit comments