Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Dec 20, 2024
1 parent c27c28b commit c4dc378
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 68 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:

- name: Query dependencies
run: |
install.packages('remotes')
install.packages('remotes', repos='http://cran.us.r-project.org')
install.packages('rcmdcheck', repos='http://cran.us.r-project.org')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
Expand All @@ -68,26 +69,13 @@ jobs:
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), check_dir = "check")
shell: Rscript {0}

- name: Check testthat
if: runner.os != 'Windows'
id: check_check
run: |
error_num=$(Rscript --vanilla '.github/workflows/check_testthat.R')
echo "error_num=$error_num" >> $GITHUB_OUTPUT
- name: Stop if there are errors!
if: ${{ steps.check_check.outputs.error_num != '0' }}
run: exit 1
- name: Check package
uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual")'

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Authors@R: c(
)
)
Description: This package allows a pipeline to be built for analyzing genetic interactions of paired guide CRISPR screens. It is based off of original research from the Alice Berger lab at Fred Hutchinson Cancer Center.
License: GPL-3
License: GPL-3 + file LICENSE
URL: https://github.com/FredHutch/gimap
BugReports: https://github.com/FredHutch/gimap/issues
Imports:
Expand Down
2 changes: 1 addition & 1 deletion R/06-calculate_gi.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' @param .data Data can be piped in with tidyverse pipes from function to function. But the data must still be a gimap_dataset
#' @param gimap_dataset A special dataset structure that is setup using the `setup_data()` function.
#' @export
#' @examples {
#' @examples \dontrun{
#' gimap_dataset <- get_example_data("gimap")
#'
#' # Highly recommended but not required
Expand Down
29 changes: 1 addition & 28 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
utils::globalVariables(c(
"timepoints", "value", "timepoint_avg", "target_type",
"mean_observed_cs", "timepoints", "value", "timepoint_avg", "target_type",
"unexpressed_ctrl_flag", "median", "lfc_adj", "median", "gRNA1_seq", "gRNA2_seq",
"control_gRNA_seq", "crispr_score", "pgRNA_target", "mean_double_control_crispr",
"pgRNA_target", "targeting_gRNA_seq", "mean_single_crispr", "double_crispr_score",
Expand Down Expand Up @@ -92,33 +92,6 @@ get_example_data <- function(which_data) {
}
}

#' @import ggplot2

## ggplot themes
## see: https://www.rdocumentation.org/packages/ggplot2/versions/2.1.0/topics/theme_update
## and https://stackoverflow.com/questions/23173915/can-ggplot-theme-formatting-be-saved-as-an-object
plot_theme <- function() {
theme(
axis.text = element_text(colour = "black"),
axis.ticks = element_line(color = "black")
)
}

#' @import ggplot2
plot_options <- function() {
list(theme_bw(base_size = 12))
}

#' @import kableExtra
print_kbl <- function(tbl) {
kbl(tbl) %>%
kable_styling(
full_width = FALSE,
position = "left",
bootstrap_options = c("striped", "hover", "responsive")
)
}


#' Get file path to an default credentials RDS
#' @export
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Now you can [go to our quick start tutorial to get started!](https://fredhutch.g
We also have tutorial examples that show how to run timepoint or treatment experimental set ups with gimap:

- [Timepoint example](https://fredhutch.github.io/gimap/articles/timepoint-example.html)
- [Treatment example](https://fredhutch.github.io/gimap/articles/treatment-example.html)
- [Treatment example](https://fredhutch.github.io/gimap/articles/treatment_example.html)

Follow the steps there that will walk you through the example data. Then you can tailor that tutorial to use your own data.

Expand Down
18 changes: 0 additions & 18 deletions man/save_tbl.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test-gi-calc.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test_that("Test Genetic Interaction score calculations", {

testthat::expect_true(all.equal(gimap_dataset$overall_results$rep, results$rep))
testthat::expect_identical(round(gimap_dataset$overall_results$intercept[1], 3), round(results$intercept[1], 3))
testthat::expect_identical(round(gimap_dataset$overall_results$rep[1], 3), round(results$rep[1], 3))
testthat::expect_identical(gimap_dataset$overall_results$rep[1], results$rep[1])

testthat::expect_identical(round(gimap_dataset$gi_scores$mean_expected_cs[1], 3), round(3.691114, 3))
testthat::expect_identical(round(gimap_dataset$gi_scores$mean_observed_cs[1], 3), round(-2.321601, 3))
Expand Down

0 comments on commit c4dc378

Please sign in to comment.