是否可以只标记那些只有阳性或上调的基因?
Is it possible to only label the genes that are only positive or up regulated ones?
ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"),
fdr = 0.05, fc = 2, size = 0.4,
genenames = as.vector(diff_express$name),
ggtheme = ggplot2::theme_minimal(),
top = 0, label.select = c("BUB1", "CD83")
)
生成的图形。
我想只放置不受管制或红色标记的标签,而不是向下的标签。实现的一种方法是我可以只对上调基因执行此操作
label.select = c("BUB1", "CD83")
但是我必须手动添加标签而不是这样做可以通过其他方式或方法来完成
如有任何建议或帮助,我们将不胜感激
问题是关于数据的子集化,请参见下面的示例并根据需要进行调整:
# log2FoldChange more than 5
myGenes <- diff_express[ diff_express$log2FoldChange > 5, ]
# rank them by Pvalue, get top 5
myGenes <- myGenes[ rank(myGenes$padj) <= 5, "name"]
# some genes do not have a name, exclude
myGenes <- myGenes[ !is.na(myGenes) & myGenes != ""]
ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"),
fdr = 0.05, fc = 2, size = 0.4,
genenames = as.vector(diff_express$name),
ggtheme = ggplot2::theme_minimal(),
top = 0, label.select = myGenes)
ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"),
fdr = 0.05, fc = 2, size = 0.4,
genenames = as.vector(diff_express$name),
ggtheme = ggplot2::theme_minimal(),
top = 0, label.select = c("BUB1", "CD83")
)
生成的图形。
我想只放置不受管制或红色标记的标签,而不是向下的标签。实现的一种方法是我可以只对上调基因执行此操作
label.select = c("BUB1", "CD83")
但是我必须手动添加标签而不是这样做可以通过其他方式或方法来完成
如有任何建议或帮助,我们将不胜感激
问题是关于数据的子集化,请参见下面的示例并根据需要进行调整:
# log2FoldChange more than 5
myGenes <- diff_express[ diff_express$log2FoldChange > 5, ]
# rank them by Pvalue, get top 5
myGenes <- myGenes[ rank(myGenes$padj) <= 5, "name"]
# some genes do not have a name, exclude
myGenes <- myGenes[ !is.na(myGenes) & myGenes != ""]
ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"),
fdr = 0.05, fc = 2, size = 0.4,
genenames = as.vector(diff_express$name),
ggtheme = ggplot2::theme_minimal(),
top = 0, label.select = myGenes)