Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the following mappings: colour #123

Open
vetmohit89 opened this issue Nov 21, 2023 · 0 comments
Open

Fix the following mappings: colour #123

vetmohit89 opened this issue Nov 21, 2023 · 0 comments

Comments

@vetmohit89
Copy link

vetmohit89 commented Nov 21, 2023

Hello, Please help me with fixing this issue. I just want to two color coded volcano plot. Blue for Fold_Change < -1.5 & p_value <= 0.05 and rest of them should be grey in colors. Here is code I am trying:

PUS7KD_microarray <- PUS7KD_microarray %>%

  • mutate(keyvals = ifelse(Fold_Change < -1.5 & p_value <= 0.05, 'blue', 'grey'))

View(PUS7KD_microarray)

Continue with the EnhancedVolcano function

EnhancedVolcano(

  • PUS7KD_microarray,
  • x = "Fold_Change",
  • y = "p_value",
  • lab = PUS7KD_microarray$Gene_Symbol,
  • pCutoff = 0.05,
  • FCcutoff = 1.5,
  • pointSize = 3.0,
  • labSize = 6.0,
  • shape = 19,
  • drawConnectors = TRUE,
  • widthConnectors = 0.5,
  • colCustom = PUS7KD_microarray$keyvals,
  • colAlpha = 1/2,
  • boxedLabels = FALSE,
  • xlim = -15,
  • selectLab = c('ATF4', 'PSAT1', 'PHGDH', 'ASNS', 'SLC7A11', 'DDIT3', 'MTHFD2', 'CEBPB', 'CEBPG'),
  • labCol = "black"
  • )
    Error in geom_point():
    ! Problem while computing aesthetics.
    ℹ Error occurred in the 1st layer.
    Caused by error in check_aesthetics():
    ! Aesthetics must be either length 1 or the same as the
    data (31133)
    ✖ Fix the following mappings: colour
    Run rlang::last_trace() to see where the error occurred.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant