Skip to content

Commit

Permalink
Merge pull request #229 from sigven/pd_fixes
Browse files Browse the repository at this point in the history
Various last-minute fixes
  • Loading branch information
sigven authored May 31, 2024
2 parents db53c3a + 36c9600 commit c84d701
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
1 change: 0 additions & 1 deletion conda/recipe/pcgrr/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

export DISABLE_AUTOBREW=1
${R} -e "install.packages('remotes', repos = 'https://cloud.r-project.org/', lib = '${PREFIX}/lib/R/library')"
${R} -e "install.packages('openxlsx2', repos = 'https://cloud.r-project.org/', lib = '${PREFIX}/lib/R/library')"
${R} -e "remotes::install_github(repo = 'caravagnalab/CNAqc', ref = '274cde9', lib = '${PREFIX}/lib/R/library')"
${R} CMD INSTALL --build . ${R_ARGS}
4 changes: 4 additions & 0 deletions conda/recipe/pcgrr/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ requirements:
- r-assertable
- r-assertthat
- bioconductor-biostrings
- r-caret
- r-dplyr
- r-dt
- r-formattable
Expand All @@ -29,6 +30,7 @@ requirements:
- r-htmltools
- r-log4r
- bioconductor-mutationalpatterns
- r-openxlsx2
- r-plotly
- bioconductor-quantiseqr
- r-quarto
Expand All @@ -49,6 +51,7 @@ requirements:
- r-assertable
- r-assertthat
- bioconductor-biostrings
- r-caret
- r-dplyr
- r-dt
- r-formattable
Expand All @@ -58,6 +61,7 @@ requirements:
- r-htmltools
- r-log4r
- bioconductor-mutationalpatterns
- r-openxlsx2
- r-plotly
- bioconductor-quantiseqr
- r-quarto
Expand Down
1 change: 1 addition & 0 deletions pcgrr/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Imports:
assertable,
assertthat,
Biostrings,
caret,
CNAqc,
dplyr,
DT,
Expand Down
3 changes: 1 addition & 2 deletions pcgrr/R/cna.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ make_cnaqc_object <- function(
"is_driver", "driver_label"))
}else{
## Make a single dummy mutation if mutations are absent
data('example_dataset_CNAqc', package = 'CNAqc')
mutations <- example_dataset_CNAqc$mutations[3,]
mutations <- CNAqc::example_dataset_CNAqc$mutations[3,]
}

cna <- callset_cna$variant |>
Expand Down
11 changes: 7 additions & 4 deletions pcgrr/R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1037,13 +1037,16 @@ mkdir <- function(d) {
}


# from https://github.com/yihui/xfun/blob/ccee265f74eb03b9d40d7167e8933b5c72e5892c/R/string.R#L329
#' Strip HTML tags from a string
#' Strip HTML tags
#'
#' @param x string to strip away HTML text.
#' Remove HTML tags and comments from text.
#' From https://github.com/yihui/xfun/blob/ccee26/R/string.R#L329.
#'
#' @param x A character vector.
#' @return A character vector with HTML tags and comments stripped off.
#' @export
#'
#' @examples
#' strip_html('<a href="#">Hello <!-- comment -->world!</a>')
strip_html <- function(x) {
x <- gsub("<!--.*?-->", "", x)
x <- gsub("<[^>]+>", "", x)
Expand Down
1 change: 1 addition & 0 deletions pcgrr/R/utils_shortcuts.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ dummy1 <- function() {
DT::datatable
htmltools::br
plotly::plot_ly
caret::createModel
}
13 changes: 10 additions & 3 deletions pcgrr/man/strip_html.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c84d701

Please sign in to comment.