Skip to content

Commit 4d4e8bf

Browse files
committed
add degpattern actions
1 parent d380b19 commit 4d4e8bf

6 files changed

Lines changed: 487 additions & 842 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: DEG Pattern Report
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- '04_gene_patterns/DEGpattern.qmd'
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- '04_gene_patterns/DEGpattern.qmd'
12+
workflow_dispatch:
13+
14+
jobs:
15+
r-degpattern:
16+
runs-on: ubuntu-22.04
17+
18+
env:
19+
RENV_PATHS_ROOT: ~/.local/share/renv # persistent cache location
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up R
26+
uses: r-lib/actions/setup-r@v2
27+
28+
- name: Install system dependencies for R packages
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y build-essential libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev libmagick++-dev libharfbuzz-dev libfribidi-dev
32+
shell: bash
33+
34+
- name: Cache R packages (renv)
35+
uses: actions/cache@v4
36+
with:
37+
path: ${{ env.RENV_PATHS_ROOT }}
38+
key: ${{ runner.os }}-renv-${{ hashFiles('04_gene_patterns/renv.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-renv-
41+
42+
- name: Set repositories
43+
run: Rscript ubuntu.R
44+
45+
- name: Restore environment from renv.lock
46+
run: |
47+
install.packages("renv", repos = "https://cloud.r-project.org")
48+
renv::restore(prompt = FALSE, lockfile = "04_gene_patterns/renv.lock")
49+
shell: Rscript {0}
50+
51+
- name: Set up Quarto
52+
uses: quarto-dev/quarto-actions/setup@v2
53+
54+
- name: Run DEGpattern report
55+
id: render_degpattern
56+
run: |
57+
cd 04_gene_patterns
58+
quarto render DEGpattern.qmd
59+
shell: bash
60+
61+
- name: Deploy HTML to gh-pages
62+
if: success()
63+
run: |
64+
git config --global user.name "github-actions[bot]"
65+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
66+
git fetch origin gh-pages || git checkout --orphan gh-pages
67+
git switch gh-pages || git checkout -b gh-pages
68+
git add 04_gene_patterns/DEGpattern.html
69+
git commit -m "Deploy DEGpattern.html [skip ci]" || echo "No changes to commit"
70+
git push origin gh-pages
71+
shell: bash

04_gene_patterns/DEGpattern.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ library(ggplot2)
6060
library(knitr)
6161
library(glue)
6262
library(R.utils)
63+
library(grafify)
64+
library(ggprism)
6365
ggplot2::theme_set(ggprism::theme_prism(base_size = 12))
6466
catCols <- as.vector(grafify:::graf_palettes[["kelly"]])
6567
scale_colour_discrete <- function(...) {

04_gene_patterns/WGCNA.qmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,17 @@ library(flashClust)
8282
library(gridExtra)
8383
library(DT)
8484
library(AnnotationDbi)
85-
library(bcbioR)
86-
8785
library(knitr)
8886
library(ggprism)
87+
library()
88+
library(grafify)
89+
library(ggprism)
90+
ggplot2::theme_set(ggprism::theme_prism(base_size = 12))
91+
catCols <- as.vector(grafify:::graf_palettes[["kelly"]])
92+
scale_colour_discrete <- function(...) {
93+
scale_colour_manual(..., values = catCols)
94+
}
8995
90-
91-
colors <- cb_friendly_cols(1:15)
92-
ggplot2::theme_set(theme_prism(base_size = 14))
9396
opts_chunk[["set"]](
9497
cache = F,
9598
cache.lazy = FALSE,

0 commit comments

Comments
 (0)