bcm-uga / pcadapt

Performing highly efficient genome scans for local adaptation with R package pcadapt v4
https://bcm-uga.github.io/pcadapt
39 stars 10 forks source link

plot(x, option = "screeplot") #94

Open DrGonEWilD opened 3 weeks ago

DrGonEWilD commented 3 weeks ago

Warning message: The <scale> argument of guides() cannot be FALSE. Use "none" instead as of ggplot2 3.3.4. ℹ The deprecated feature was likely used in the pcadapt package. Please report the issue at https://github.com/bcm-uga/pcadapt/issues. This warning is displayed once every 8 hours. Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.

lifecycle::last_lifecycle_warnings() [[1]] <warning/lifecycle_warning_deprecated> Warning: The <scale> argument of guides() cannot be FALSE. Use "none" instead as of ggplot2 3.3.4. ℹ The deprecated feature was likely used in the pcadapt package. Please report the issue at https://github.com/bcm-uga/pcadapt/issues.

Backtrace: ▆

  1. ├─base::plot(pcadapt_result, option = "screeplot")
  2. ├─base::plot(pcadapt_result, option = "screeplot")
  3. └─pcadapt:::plot.pcadapt(pcadapt_result, option = "screeplot")
  4. └─pcadapt::scree_plot(x, K)
  5. └─ggplot2::guides(colour = FALSE)
  6. └─ggplot2:::deprecate_warn0("3.3.4", "guides(<scale> = 'cannot be FALSE. Use \"none\" instead')")
privefl commented 3 weeks ago

Reproducible example:

library(pcadapt)
path_to_file <- system.file("extdata", "geno3pops.bed", package = "pcadapt")
filename <- read.pcadapt(path_to_file, type = "bed")
x <- pcadapt(input = filename, K = 20) 
plot(x, option = "screeplot")
privefl commented 3 weeks ago

I'll try to update the ggplot code from {pcadapt}.

privefl commented 3 weeks ago

Basically all the functions here:

Tell me if you want to submit a PR yourself.