I have raw read counts of miRNAs in two conditions like below
> head(long1)
miRNA Read count Condition
1: hsa-miR-539-3p 33 living
2: hsa-miR-199b-5p 102 living
3: hsa-miR-146a-3p 27 living
4: hsa-let-7a-3p 186 living
5: hsa-miR-1275 54 living
6: hsa-miR-29a-3p 6464 living
>
For each individual miRNAs, I want to show the difference of raw read counts across conditions by
p=ggplot(data = long1, aes(x=long1$miRNA, y=long1$`Read count`)) + geom_boxplot(aes(fill=Condition))
p <- p + guides(fill=guide_legend(title="Condition"))
p <- p + xlab("miRNAs") + ylab("Raw mapped reads") + ggtitle("s vs living with cancer")
p + facet_wrap( ~ miRNA, scales="free")+theme_bw() add_pval(p, pairs = list(c("s", "living")), test='wilcox.test')
Which returns this
[![enter image description here][1]][1]
This plot is not good
How I can a plot like below in which miRNAs are on Y axis and two colours shows the conditions like this