hbc / bcbioRNASeq

R package for bcbio RNA-seq analysis.
https://bioinformatics.sph.harvard.edu/bcbioRNASeq
GNU Affero General Public License v3.0
58 stars 21 forks source link

`_setup.R` file needs to be updated. #195

Closed jxshi closed 5 months ago

jxshi commented 5 months ago

Hi guys,

Since the function scale_color_synesthesia_c in AcidPlots package has been updated to acid_scale_color_synesthesia_c, the corresponding code in _setup.R file needs to be updated.

## Set default ggplot2 colors and theme.
options(
    "ggplot2.continuous.colour" =
        AcidPlots::scale_color_synesthesia_c,
    "ggplot2.continuous.fill" =
        AcidPlots::scale_fill_synesthesia_c,
    "ggplot2.discrete.colour" =
        AcidPlots::scale_color_synesthesia_d,
    "ggplot2.discrete.fill" =
        AcidPlots::scale_fill_synesthesia_d
)

Updated version:

## Set default ggplot2 colors and theme.
options(
    "ggplot2.continuous.colour" =
        AcidPlots::acid_scale_color_synesthesia_c,
    "ggplot2.continuous.fill" =
        AcidPlots::acid_scale_fill_synesthesia_c,
    "ggplot2.discrete.colour" =
        AcidPlots::acid_scale_color_synesthesia_d,
    "ggplot2.discrete.fill" =
        AcidPlots::acid_scale_fill_synesthesia_d
)
jxshi commented 5 months ago

According to the following error message:

! Error from the generic function 'plotMA' defined in package 'BiocGenerics': no S4 method definition for argument 'object' of class 'DESeqAnalysis' was found. Did you perhaps mean calling the function 'plotMA' from another package, e.g. 'limma'? In that case, please use the syntax 'limma::plotMA'.

The following template inst/rmarkdown/templates/02-differential-expression/skeleton/skeleton.Rmd, line 279 also needs to be updated:

print(plotMa(object = object, i = i))

Updated version:

print(limma::plotMA(object = object, i = i))
mjsteinbaugh commented 5 months ago

Thanks @jxshi I'll make a couple tweaks to these templates. Note that plotMa is correct -- we're not using the BiocGenerics variant here.

mjsteinbaugh commented 5 months ago

It looks like you may need to update your R packages -- what does utils::sessionInfo return?

Current _setup.R file is here: https://github.com/acidgenomics/r-acidmarkdown/blob/main/inst/rmarkdown/shared/_setup.R

You can check whether your library is current with:

if (!requireNamespace("BiocManager", quietly = TRUE)) {
    install.packages("BiocManager")
}
install.packages(
    pkgs = "AcidDevTools",
    repos = c(
        "https://r.acidgenomics.com",
        BiocManager::repositories()
    ),
    dependencies = TRUE
)
AcidDevTools::valid()
jxshi commented 5 months ago

Hi @mjsteinbaugh,

Thank you for your timely reply! You are right, the AcidDevTools package is outdated and needs to be updated. After updating this package, the issue is resolved.

Best, Jianxiang