如何获取ggplot2在翻转的条形图中显示计数?

我有以下示例数据集:

row gene    Type    PercID  Count
1   AAC     MS  0   0
71  AAC     NDA 99.66   17
2   ABC superfamily ATP binding cassette transporter    MS  0   0
72  ABC superfamily ATP binding cassette transporter    NDA 98.5    7
3   acetyltransferase   MS  0   0
73  acetyltransferase   NDA 100 12
4   AcrA    MS  94.6    6
74  AcrA    NDA 0   0
5   AcrB    MS  96  11
75  AcrB    NDA 0   0

我添加了row列以使唯一的行响应于我遇到的关于要求唯一的行名的错误。我将零转换为NA,以使我的色标仅显示有效值(在这种情况下为90-100)。

我正在使用此代码创建图:

library(ggplot2)
library(viridis)

mydata = read.csv("Mydata.csv", quote = "", fileEncoding = "UTF-8-BOM")

mydata2 = mydata
mydata2[, 4:5][mydata2[, 4:5] == 0] <- NA

ggplot(mydata2, aes(x = gene, y = Count, fill = PercID))+
geom_bar(position = position_fill(reverse = TRUE), stat = 'identity')+
facet_wrap(~ Type)+
coord_flip()+
scale_x_discrete(limits = rev(levels(mydata2$gene)))+
scale_fill_viridis(discrete = FALSE, name = "Percent Identity", option = 'plasma')+
theme(axis.title.x=element_blank(),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank())

This produces a plot with all bars being the same length: enter image description here

I want my bars to reflect the actual counts from the Count column in my data so they would be of variable length.

I have tried removing stat = 'identity' however that gives me this error message Error: stat_count() can only have an x or y aesthetic. I also tried removing the y = Count but then I get an error that I need a y aesthetic.

How can I get my plot to display bar lengths that reflect the Count value?