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

v2.0rc - 2024 #52

Merged
merged 107 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
89b815e
GHA: use multi-version R condabuild
pdiakumis Jul 22, 2023
bda1174
conda: remove pcgrr as dependency to avoid cyclic dependency hell
pdiakumis Jul 31, 2023
407b149
conda: include assertable; remove pcgrr from DESCRIPTION
pdiakumis Jul 31, 2023
e300ef2
Bump version: 1.0.1 → 1.0.2
pdiakumis Jul 31, 2023
cedd024
refactor gha
pdiakumis Nov 30, 2023
1dd3cd9
yaml -> yml
pdiakumis Nov 30, 2023
25dacd5
Bump version: 1.0.2 → 1.0.3
pdiakumis Nov 30, 2023
4c93e85
pkgdown: specify conda channels
pdiakumis Nov 30, 2023
250b051
crancheck
pdiakumis Nov 30, 2023
2104465
gha: cleanup
pdiakumis Nov 30, 2023
b27af58
Bump version: 1.0.3 → 1.0.1
pdiakumis Nov 30, 2023
84d79b1
mv examples -> inst/examples; satisfy crancheck
pdiakumis Nov 30, 2023
fb9156a
fixes for updated pcgr pre-report pipeline
sigven Dec 6, 2023
dfcc3de
quarto dev
sigven Dec 13, 2023
d9df37d
resolved conflicts
sigven Dec 13, 2023
f903aba
Merge branch 'umccr-update_conda_r' into bundle_update_2023
sigven Dec 13, 2023
e02019e
bumpversion: use dev part
pdiakumis Dec 13, 2023
b13bd97
Bump version: 1.0.1 → 1.0.1.9000
pdiakumis Dec 13, 2023
b73f1b7
add pcgrr to DESCRIPTION
pdiakumis Dec 14, 2023
b6568e2
Bump version: 1.0.1.9000 → 1.0.1.9001
pdiakumis Dec 14, 2023
f2d6a37
conda: cleanup dependencies
pdiakumis Dec 14, 2023
44e8189
Bump version: 1.0.1.9001 → 1.0.1.9002
pdiakumis Dec 14, 2023
3faf189
stick to R v4.2 for now
pdiakumis Dec 14, 2023
87a12a1
Bump version: 1.0.1.9002 → 1.0.1.9003
pdiakumis Dec 14, 2023
f94a656
fix gnomAD tag
sigven Dec 15, 2023
04c2cd8
Merge branch 'bundle_update_2023' of github.com:sigven/cpsr into bund…
sigven Dec 15, 2023
0fea684
fix gnomad col and classify all logic
sigven Dec 17, 2023
db35955
classification update
sigven Dec 18, 2023
56863e8
fix quarto processing - HTML output
sigven Dec 19, 2023
7cc57f6
use openxlsx2
sigven Dec 19, 2023
7f2618a
remove html file in inst
sigven Dec 19, 2023
50090d7
quarto formatting
sigven Dec 19, 2023
9d6de98
report polishing
sigven Dec 20, 2023
cca8253
custom panel and sf debug
sigven Dec 20, 2023
d250dbb
doc polishing
sigven Dec 20, 2023
8b3927b
sf in XLSX output
sigven Jan 5, 2024
dd3ae44
vignettes update
sigven Feb 4, 2024
0005c54
value boxes and re-engineering
sigven Mar 7, 2024
8db47b6
ClinVar update
sigven Mar 10, 2024
dfd3ad6
virtual panel 0 update
sigven Mar 10, 2024
6228d0c
comment panel zero prep
sigven Mar 10, 2024
5b0c960
doc cleaning
sigven Mar 11, 2024
232d8f8
minor cleaning
sigven Mar 11, 2024
fe7edb8
update ClinVar concordance plot
sigven Mar 11, 2024
3be31a6
minor bug fixing
sigven Mar 12, 2024
be7664f
pull DP from VCF and show
sigven Mar 13, 2024
4715e03
final polish
sigven Mar 14, 2024
7ca2e6b
dark color update
sigven Mar 26, 2024
b1478db
Fix bug with empty cpg set
sigven Apr 23, 2024
db492be
add vignettes to .Rbuildignore
pdiakumis May 16, 2024
d831ee7
DESCRIPTION: add readr, glue, stringi
pdiakumis May 16, 2024
f2fc741
conda: install JanMarvin/openxlsx2 during build stage
pdiakumis May 16, 2024
cdb981b
conda: install glue, quartos, readr, stringi
pdiakumis May 16, 2024
840e45f
why not install openxlsx2 from cran, d'oh
pdiakumis May 16, 2024
daa95f8
GHA: update pkgdown commit msg
pdiakumis May 16, 2024
31c7132
use r-base 4.3.3
pdiakumis May 27, 2024
ff08536
Date update
sigven May 27, 2024
c22c744
Bump version: 1.0.1.9003 → 1.0.1.9004
pdiakumis May 27, 2024
c7d00a7
Bump version: 1.0.1.9004 → 1.0.1.9005
pdiakumis May 27, 2024
7c1d904
doc updates and Excel output fix
sigven May 27, 2024
8aa15d0
Merge branch 'bundle_update_2023' of github.com:sigven/cpsr into bund…
sigven May 27, 2024
3b5491a
GHA: fix pkgdown commit msg
pdiakumis May 29, 2024
8c3b33d
Bump version: 1.0.1.9005 → 1.0.1.9006
pdiakumis May 29, 2024
83aaae3
add excel sheet for existing data only
sigven May 30, 2024
31dbff9
docs update
sigven May 30, 2024
9af4298
Add CPSR superpanel Excel, clean space in report
sigven May 30, 2024
8cf42c7
final polish and changelog
sigven May 31, 2024
5ca4659
added new screenshots
sigven May 31, 2024
2e9ec36
openxlsx2: install from conda
pdiakumis May 31, 2024
17b5de3
Bump version: 1.0.1.9006 → 1.0.1.9007
pdiakumis May 31, 2024
d31a0bd
Remove LOFTEE
sigven Jun 7, 2024
c031634
Merge branch 'bundle_update_2023' of github.com:sigven/cpsr into bund…
sigven Jun 7, 2024
21ce3af
Bump version: 1.0.1.9007 → 1.0.1.9008
pdiakumis Jun 10, 2024
f72d90d
update db versions and lof info
sigven Jun 11, 2024
8a8cc52
Merge branch 'bundle_update_2023' of github.com:sigven/cpsr into bund…
sigven Jun 11, 2024
dafb514
Bump version: 1.0.1.9008 → 1.0.1.9009
pdiakumis Jun 11, 2024
2f4babe
delete cpsr_summary_old.qmd
pdiakumis Jun 12, 2024
86a2ae7
add deps: bslib, crosstalk, DT, htmltools, shiny
pdiakumis Jun 12, 2024
738c922
copy bs_icon from bsicons pkg
pdiakumis Jun 12, 2024
61386ab
Bump version: 1.0.1.9009 → 1.0.1.9010
pdiakumis Jun 13, 2024
437936a
add fs dependency
pdiakumis Jun 14, 2024
f5e500e
mkdir -> fs::dir_create
pdiakumis Jun 14, 2024
f646537
style R/utils.R
pdiakumis Jun 14, 2024
9355b7d
use fs instead of system calls throughout
pdiakumis Jun 14, 2024
6826abd
style R/main.R
pdiakumis Jun 14, 2024
b141eac
use local favicon-16x16.png (no need to access https)
pdiakumis Jun 14, 2024
38010ba
Bump version: 1.0.1.9010 → 1.0.1.9011
pdiakumis Jun 14, 2024
5fe1add
quarto render: tmp -> tmp/templates
pdiakumis Jun 14, 2024
a321108
Bump version: 1.0.1.9011 → 1.0.1.9012
pdiakumis Jun 14, 2024
d124380
fix access right for dir_create
sigven Jun 14, 2024
8c7ac14
Bump version: 1.0.1.9012 → 1.0.1.9013
sigven Jun 14, 2024
4f8bbc4
remove fs dep, move to base calls instead
pdiakumis Jun 16, 2024
d787724
Bump version: 1.0.1.9013 → 1.0.1.9014
pdiakumis Jun 16, 2024
8cedc78
docs update
sigven Jun 18, 2024
5edbbad
remove top quarto tmp folder
pdiakumis Jun 19, 2024
70d10bd
GHA: pkgdown deploy only on master
pdiakumis Jun 19, 2024
2fafa4b
Bump version: 1.0.1.9014 → 1.0.1.9015
pdiakumis Jun 19, 2024
a730c9f
minor doc fixes
sigven Jun 21, 2024
50bf185
Merge branch 'bundle_update_2023' of github.com:sigven/cpsr into bund…
sigven Jun 21, 2024
2048790
docs update
sigven Jun 22, 2024
825181a
remove DESCRIPTION date
sigven Jun 22, 2024
5801a26
Bump version: 1.0.1.9015 → 1.0.1.9016
sigven Jun 22, 2024
e5a00ea
polish docs for release
sigven Jun 26, 2024
4ae3135
update LICENSE date
pdiakumis Jun 26, 2024
31b856e
vignettes/running.Rmd: fix whitespace
pdiakumis Jun 26, 2024
3bd49f5
README: fix CHANGELOG link
pdiakumis Jun 26, 2024
1ca778f
vignettes: fix typos
pdiakumis Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@
^\.Rproj\.user$
^\.bumpversion\.cfg$
^\.github$

^examples
^data-raw$
^LICENSE\.md$

^conda$
^cpsr_classification\.pdf$
^cpsr_classification\.png$
^cpsr_superpanel_0\.6\.2\.xlsx$
^cpsr_views\.png$
^docs$
^example\.vcf\.gz$
^example\.vcf\.gz.tbi$
^pkgdown/_pkgdown\.yml$
^pkgdown$
^_pkgdown\.yml$
^\.pre-commit-config\.yaml$
^vignettes$
6 changes: 5 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[bumpversion]
current_version = 1.0.1
current_version = 1.0.1.9016
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<dev>\d+))?
serialize =
{major}.{minor}.{patch}.{dev}
{major}.{minor}.{patch}

[bumpversion:file:DESCRIPTION]
search = Version: {current_version}
Expand Down
63 changes: 26 additions & 37 deletions .github/workflows/build_conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
branches:
- master
- dev
- bundle_update_2023
env:
atoken: ${{ secrets.ANACONDA_UPLOAD_TOKEN }}
recipe_path: conda/recipe
env_yml_path: conda/env/yml
VERSION: '1.0.1' # versioned by bump2version
VERSION: '1.0.1.9016' # versioned by bump2version
jobs:
build_conda_pkgs:
# When merging to one of the branches above and the commit message matches
Expand All @@ -19,25 +19,31 @@ jobs:
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Mambaforge
uses: conda-incubator/setup-miniconda@v2
uses: actions/checkout@v4
- name: Micromamba setup
uses: mamba-org/setup-micromamba@v1
with:
miniforge-variant: Mambaforge
miniforge-version: 4.11.0-0
show-channel-urls: true
auto-activate-base: false
activate-environment: condabuild
environment-file: conda/condabuild_env.yml
use-mamba: true
- name: Build + upload cpsr conda pkg
environment-file: ${{ env.env_yml_path }}/condabuild_env.yml
- name: 🐍 Conda pkg build and upload
run: |
conda mambabuild ${recipe_path}/cpsr -c pcgr -c conda-forge -c bioconda --token ${atoken}
- name: 🔖 Tag creation
uses: actions/github-script@v7
with:
script: |
const the_tag_name = 'refs/tags/v' + process.env.VERSION
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: the_tag_name,
sha: context.sha
})

pkgdown_site:
# only build pkgdown site on master
if: github.ref_name == 'master'
name: Deploy pkgdown website
runs-on: ubuntu-latest
needs: build_conda_pkgs
Expand All @@ -46,34 +52,17 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v2
uses: actions/checkout@v4
- name: Micromamba setup
uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: true
auto-activate-base: true
activate-environment: ""
mamba-version: "*"
channels: "pcgr,conda-forge,bioconda"
- name: Install conda packages
run: mamba env create -n pkgdown -f ${env_yml_path}/pkgdown.yml
environment-file: ${{ env.env_yml_path }}/pkgdown.yml
- name: Publish pkgdown website
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
conda activate pkgdown
micromamba activate pkgdown
printf "cpsr version:\n"
Rscript -e "packageVersion('cpsr')"
Rscript -e "pkgdown::deploy_to_branch(pkg = '.', commit_message = paste(pkgdown:::construct_commit_message('.'), '- see https://sigven.github.io/cpsr/'), branch = 'gh-pages', new_process = FALSE)"
Rscript -e "pkgdown::deploy_to_branch(pkg = '.', commit_message = 'Built CPSR website: https://sigven.github.io/cpsr/', branch = 'gh-pages', new_process = FALSE)"

- name: Create tag
uses: actions/github-script@v5
with:
script: |
const the_tag_name = 'refs/tags/v' + process.env.VERSION
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: the_tag_name,
sha: context.sha
})
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ vignettes/*.pdf

/outputs
docs
inst/doc

data-raw/variant_classification
27 changes: 17 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Package: cpsr
Type: Package
Title: Cancer Predisposition Sequencing Reporter (CPSR)
Version: 1.0.1
Date: 2022-11-11
Version: 1.0.1.9016
Authors@R:
c(person(given = "Sigve",
family = "Nakken",
Expand All @@ -27,27 +26,35 @@ Description: CPSR is a computational workflow that interprets germline variants
predisposition and inherited cancer syndromes.
License: MIT + file LICENSE
biocViews:
Remotes: github::sigven/pcgr/pcgrr@master
Remotes: github::sigven/pcgr/pcgrr
Imports:
assertable,
assertthat,
bslib,
crosstalk,
dplyr,
DT,
ggplot2,
log4r,
magrittr,
glue,
htmltools,
openxlsx2,
pcgrr,
quarto,
readr,
rlang,
scales,
shiny,
stringr,
stringi,
tidyr
Depends:
R (>= 4.0)
Suggests:
testthat,
devtools,
BSgenome.Hsapiens.UCSC.hg19,
BSgenome.Hsapiens.UCSC.hg38
BSgenome.Hsapiens.UCSC.hg38,
knitr,
rmarkdown
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2022
YEAR: 2024
COPYRIGHT HOLDER: Sigve Nakken
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2022 Sigve Nakken
Copyright (c) 2024 Sigve Nakken

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 12 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Generated by roxygen2: do not edit by hand

export(append_cpg_properties)
export(assign_classification)
export(assign_pathogenicity_evidence)
export(assign_variant_tiers)
export(detect_cancer_traits_clinvar)
export(determine_pathogenicity_classification)
export(bs_icon2)
export(check_variant2cancer_phenotype)
export(combine_novel_and_preclassified)
export(exclude_vars_by_maf)
export(exclude_vars_non_cancer)
export(exclude_vars_noncoding)
export(generate_cpsr_report)
export(get_germline_biomarkers)
export(get_insilico_prediction_statistics)
export(get_max_rows_pr_datatable)
export(load_germline_snv_indel)
export(plot_summary_statistics)
export(plot_virtual_panels)
export(retrieve_secondary_calls)
export(summary_donut_chart)
importFrom(magrittr,"%>%")
export(write_cpsr_output)
importFrom(rlang,":=")
importFrom(rlang,.data)
92 changes: 92 additions & 0 deletions R/bsicons.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copied from https://github.com/rstudio/bsicons/blob/f7dca31/R/icons.R
icon_info_mini <- list(
name = c(
"bullseye",
"check-square"
),
contents = c(
"<path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\"></path>\n<path d=\"M8 13A5 5 0 1 1 8 3a5 5 0 0 1 0 10zm0 1A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\"></path>\n<path d=\"M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8z\"></path>\n<path d=\"M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z\"></path>",
"<path d=\"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z\"></path>\n<path d=\"M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z\"></path>"
)
)

#' Use Bootstrap icons (as inline SVG)
#'
#' Copied from https://github.com/rstudio/bsicons.
#' @param name The name of the Bootstrap icon. Whitespace is replaced with `-`
#' (that way, `"arrow up"` can be used to refer to the "actual name" of
#' `"arrow-up"`). For a searchable list of names, see <https://icons.getbootstrap.com/>
#' @param size Any valid CSS unit defining both the height and width of the
#' icon.
#' @param class Additional CSS classes to add to the `<svg>` element. Consider
#' providing Bootstrap 5+ utility classes (e.g., `text-success`) here to
#' stylize the icon (but also note that those utility classes will only work
#' when Bootstrap 5+ is on the page).
#' @param title If provided (highly recommended), `a11y` defaults to `"sem"`,
#' meaning the title is used for on-hover text and screen reader
#' announcements.
#' @param a11y Cases that distinguish the role of the icon and inform which
#' accessibility attributes to be used. Icons can either be `"deco"`
#' (decorative, the default case), `"sem"` (semantic), `"none"` (no
#' accessibility features). The default, `"auto"`, resolves to `"sem"` if a
#' `title` is provided (and `"deco"` otherwise).
#' @param ... additional CSS properties (e.g., `margin`, `position`, etc.)
#' placed on the `<svg>` tag.
#'
#' @return An [htmltools::HTML()] string containing the SVG icon.
#' @export
bs_icon2 <- function(name, size = "1em", class = NULL, title = NULL,
a11y = c("auto", "deco", "sem", "none"), ...) {
if (length(name) != 1) {
rlang::abort("The number of icons specified in `name` must be 1.")
}

"%||%" <- function(x, y) {
if (is.null(x)) y else x
}

name <- sub("\\s+", "-", tolower(name))
idx <- match(name, tolower(icon_info_mini$name))
stopifnot(!is.na(idx))
svg_children <- icon_info_mini$contents[idx]
size <- htmltools::validateCssUnit(size)
style_attr <- paste0(
"height:", size, ";",
"width:", size, ";",
"fill:currentColor;",
# Better default vertical positioning of icons in a inline context (inspired by fontawesome::fa())
"vertical-align:-0.125em;",
htmltools::css(...)
)

# Generate accessibility attributes if either of
# the "deco" or "sem" cases are chosen
a11y <- rlang::arg_match(a11y)
a11y_attrs <- ""

if (a11y == "auto") {
a11y <- if (is.null(title)) "deco" else "sem"
}

if (a11y == "deco") {
a11y_attrs <- 'aria-hidden="true" role="img" '
} else if (a11y == "sem") {
title <- title %||% name
a11y_attrs <- sprintf(
'aria-label="%s" role="img" ',
htmltools::htmlEscape(title, attribute = TRUE)
)
}

res <- sprintf(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="bi bi-%s %s" style="%s" %s>%s%s</svg>',
name,
paste(class, collapse = " "),
style_attr,
a11y_attrs,
if (is.null(title)) "" else paste0("<title>", htmltools::htmlEscape(title), "</title>"),
svg_children
)

htmltools::browsable(htmltools::HTML(res))
}
Loading