Skip to content

Calculating Significance between legend variables in different groups #151

Description

@lyisrae1

Hello, I'm trying to use geom_signif() to calculate the significance across gene expression in different sites. I am easily able to go by site, but I want to compare at specific pathways in different sites. I have tried this fix:

ggplot(Nitro_Level4_date, aes(x = paste0(Collection_Date, "_", KEGG_Level_4), y = norm_value, fill = KEGG_Level_4, group = KEGG_Level_4)) +
geom_col(stat = 'identity', position = position_dodge(width = 0.9), colour = "grey40") +
geom_signif(comparisons = list(c("Crab_Collection_Date1_Assimilatory Nitration Reduction", "Crab_Collection_Date3_Assimilatory Nitration Reduction")),
map_signif_level = c("**" = 0.01, "*" = 0.05), vjust = 0.5, y_position = c(1.50, 1.60, 1.70))

But I still get the error:

Computation failed in stat_signif().
Caused by error in if (scales$x$map(comp[1]) == data$group[1] | manual) ...:
! missing value where TRUE/FALSE needed

Is there anything that can be done, or should I use a different program?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions