diff --git a/.github/workflows/BiocCheck.yaml b/.github/workflows/BiocCheck.yaml new file mode 100644 index 0000000..f37b239 --- /dev/null +++ b/.github/workflows/BiocCheck.yaml @@ -0,0 +1,46 @@ +on: + push: + branches: [main, devel] + pull_request: + +name: BiocCheck.yaml + +permissions: read-all + +jobs: + BiocCheck: + runs-on: ubuntu-latest + name: BiocCheck + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Setup Pandoc + uses: r-lib/actions/setup-pandoc@v2 + + - name: Setup R + uses: r-lib/actions/setup-r@v2 + with: + r-version: release + http-user-agent: release + use-public-rspm: true + + - name: Install Deps + uses: r-lib/actions/setup-r-dependencies@v2 + with: + cache: always + # Remove pivlab/CLAMPData once CLAMPData is on Bioconductor; + # it will then be picked up automatically from DESCRIPTION. + extra-packages: | + bioc::BiocCheck + pivlab/CLAMPData + + - name: Build tarball + run: R CMD build --no-manual . + + - name: Run BiocCheck + run: | + tarball <- list.files(pattern = "^CLAMP_.*\\.tar\\.gz$")[1] + BiocCheck::BiocCheck(tarball, `quit-with-status` = TRUE) + shell: Rscript {0} diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..c612919 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,58 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, devel] + pull_request: + +name: R-CMD-check.yaml + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v6 + + - name: Install XQuartz (macOS) + if: runner.os == 'macOS' + run: brew install --cask xquartz + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + cache: always + extra-packages: | + any::rcmdcheck + pivlab/CLAMPData + # Remove pivlab/CLAMPData once CLAMPData is on Bioconductor; + # it will then be picked up automatically from DESCRIPTION. + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..9c57fa3 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,52 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [bioconductor_submission] + pull_request: + release: + types: [published] + workflow_dispatch: + +name: pkgdown.yaml + +permissions: read-all + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + # Remove pivlab/CLAMPData once CLAMPData is on Bioconductor; + # it will then be picked up automatically from DESCRIPTION. + extra-packages: | + any::pkgdown + local::. + pivlab/CLAMPData + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/README.md b/README.md index 223c056..549d109 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,8 @@ [![GitHub issues](https://img.shields.io/github/issues/chikinalab/CLAMP)](https://github.com/chikinalab/CLAMP/issues) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) -[![BiocCheck](https://github.com/chikinalab/CLAMP/actions/workflows/BiocCheck.yaml/badge.svg)](https://github.com/chikinalab/CLAMP/actions/workflows/BiocCheck.yaml) +[![BiocCheck](https://github.com/mchikina/CLAMP/actions/workflows/BiocCheck.yaml/badge.svg)](https://github.com/chikinalab/CLAMP/actions/workflows/BiocCheck.yaml) [![R-CMD-check](https://github.com/chikinalab/CLAMP/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/chikinalab/CLAMP/actions/workflows/R-CMD-check.yaml) - ## Bioconductor release status diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png new file mode 100644 index 0000000..761454a Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-120x120.png differ diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png new file mode 100644 index 0000000..20bbb60 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-152x152.png differ diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png new file mode 100644 index 0000000..522af7b Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-180x180.png differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png new file mode 100644 index 0000000..978086f Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-60x60.png differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png new file mode 100644 index 0000000..bbcd05d Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-76x76.png differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png new file mode 100644 index 0000000..a78b391 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon.png differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png new file mode 100644 index 0000000..a97af25 Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png new file mode 100644 index 0000000..9d75cf3 Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 0000000..a8f2b91 Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ diff --git a/src/Makevars b/src/Makevars new file mode 100644 index 0000000..22ebc63 --- /dev/null +++ b/src/Makevars @@ -0,0 +1 @@ +PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win new file mode 100644 index 0000000..22ebc63 --- /dev/null +++ b/src/Makevars.win @@ -0,0 +1 @@ +PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/vignettes/comparing_clampbase_clampfull.Rmd b/vignettes/comparing_clampbase_clampfull.Rmd index 92003b3..f79a03b 100644 --- a/vignettes/comparing_clampbase_clampfull.Rmd +++ b/vignettes/comparing_clampbase_clampfull.Rmd @@ -59,7 +59,6 @@ dataWholeBlood <- tscale(dataWholeBlood) # How to download pathway and cell marker libraries from Enrichr. # Not run during vignette build to avoid network calls; pre-fetched # .rds files are loaded in the next chunk instead. -enrichr_url <- "https://maayanlab.cloud/Enrichr/geneSetLibrary" gmtList <- list( CellMarkers = getGMT( paste0(enrichr_url, "?mode=text&libraryName=CellMarker_2024"), @@ -75,12 +74,8 @@ gmtList <- list( ```{r load-priors} # Load pre-fetched gene set libraries bundled with the package gmtList <- list( - CellMarkers = readRDS( - system.file("extdata", "CellMarker_2024.rds", package = "CLAMP") - ), - KEGG = readRDS( - system.file("extdata", "KEGG_2021_Human.rds", package = "CLAMP") - ) + CellMarkers = readRDS(system.file("extdata", "CellMarker_2024.rds", package = "CLAMP")), + KEGG = readRDS(system.file("extdata", "KEGG_2021_Human.rds", package = "CLAMP")) ) # Combine into a single sparse matrix diff --git a/vignettes/get_started.Rmd b/vignettes/get_started.Rmd index 981e319..16993d7 100644 --- a/vignettes/get_started.Rmd +++ b/vignettes/get_started.Rmd @@ -475,36 +475,11 @@ alz_baseRes <- CLAMPbase( ## Prepare pathway priors -```{r fbm-priors-download, eval=FALSE} -# How to fetch the libraries; not run during vignette build. -enrichr_url <- "https://maayanlab.cloud/Enrichr/geneSetLibrary" -alz_gmtList <- list( - GTEx_Tissues = getGMT( - paste0(enrichr_url, "?mode=text&libraryName=GTEx_Tissues_V8_2023") - ), - BP = getGMT( - paste0(enrichr_url, "?mode=text&libraryName=GO_Biological_Process_2025") - ), - MSigDB = getGMT( - paste0(enrichr_url, "?mode=text&libraryName=MSigDB_Hallmark_2020") - ) -) -``` - ```{r fbm-priors, message=FALSE} alz_gmtList <- list( - GTEx_Tissues = readRDS( - system.file("extdata", "GTEx_Tissues_V8_2023.rds", package = "CLAMP") - ), - BP = readRDS( - system.file( - "extdata", "GO_Biological_Process_2025.rds", - package = "CLAMP" - ) - ), - MSigDB = readRDS( - system.file("extdata", "MSigDB_Hallmark_2020.rds", package = "CLAMP") - ) + GTEx_Tissues = getGMT("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=GTEx_Tissues_V8_2023"), + BP = getGMT("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=GO_Biological_Process_2025"), + MSigDB = getGMT("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=MSigDB_Hallmark_2020") ) alz_pathMat <- gmtListToSparseMat(alz_gmtList) @@ -628,39 +603,11 @@ islet_baseRes <- CLAMPbase( ## Prepare pathway priors -```{r islet-priors-download, eval=FALSE} -# How to fetch the libraries; not run during vignette build. -enrichr_url <- "https://maayanlab.cloud/Enrichr/geneSetLibrary" -islet_gmtList <- list( - GTEx_Tissues = getGMT( - paste0(enrichr_url, "?mode=text&libraryName=GTEx_Tissues_V8_2023") - ), - Diabetes_Perturbations = getGMT( - paste0( - enrichr_url, - "?mode=text&libraryName=Diabetes_Perturbations_GEO_2022" - ) - ), - MSigDB_Hallmark = getGMT( - paste0(enrichr_url, "?mode=text&libraryName=MSigDB_Hallmark_2020") - ) -) -``` - ```{r islet-priors, message=FALSE} islet_gmtList <- list( - GTEx_Tissues = readRDS( - system.file("extdata", "GTEx_Tissues_V8_2023.rds", package = "CLAMP") - ), - Diabetes_Perturbations = readRDS( - system.file( - "extdata", "Diabetes_Perturbations_GEO_2022.rds", - package = "CLAMP" - ) - ), - MSigDB_Hallmark = readRDS( - system.file("extdata", "MSigDB_Hallmark_2020.rds", package = "CLAMP") - ) + GTEx_Tissues = getGMT("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=GTEx_Tissues_V8_2023"), + Diabetes_Perturbations = getGMT("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=Diabetes_Perturbations_GEO_2022"), + MSigDB_Hallmark = getGMT("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=MSigDB_Hallmark_2020") ) islet_pathMat <- gmtListToSparseMat(islet_gmtList)