Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -29,7 +30,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -47,3 +48,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
28 changes: 20 additions & 8 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,36 +16,47 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ Description: Provides functionality to infer trajectories from single-cell data,
represent them into a common format, and adapt them. Other biological information
can also be added, such as cellular grouping, RNA velocity and annotation.
Saelens et al. (2019) <doi:10.1038/s41587-019-0071-9>.
Version: 1.2.4
Version: 1.2.5
Authors@R: c(
person(
"Robrecht",
"Cannoodt",
email = "rcannood@gmail.com",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood")
comment = c(ORCID = "0000-0003-3641-729X")
),
person(
"Wouter",
"Saelens",
email = "wouter.saelens@gmail.com",
role = c("aut"),
comment = c(ORCID = "0000-0002-7114-6248", github = "zouter")
comment = c(ORCID = "0000-0002-7114-6248")
)
)
URL: https://github.com/dynverse/dynwrap
Expand Down
7 changes: 6 additions & 1 deletion R/method_create_ti_method_r.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ generate_parameter_documentation <- function(definition) {
parameter_ids,
function(parameter_id) {
parameter <- definition$parameters$parameters[[parameter_id]]
paste0("@param ", parameter$id, " ", dynparam::get_description(parameter, sep = ". "), ".")
param_desc <- dynparam::get_description(parameter, sep = ". ")
# escape { and } to avoid roxygen issues
param_desc_escaped <- param_desc %>%
stringr::str_replace_all("\\{", "\\\\{") %>%
stringr::str_replace_all("\\}", "\\\\}")
paste0("@param ", parameter$id, " ", param_desc_escaped, ".")
}
)
}
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ library(tidyverse)
```
<!-- badges: start -->
[![R-CMD-check](https://github.com/dynverse/dynwrap/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dynverse/dynwrap/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/dynverse/dynwrap/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dynverse/dynwrap?branch=master)
[![Codecov test coverage](https://codecov.io/gh/dynverse/dynwrap/graph/badge.svg)](https://app.codecov.io/gh/dynverse/dynwrap)
[**Tutorials**](https://dynverse.org)
[**Reference documentation**](https://dynverse.org/reference/dynwrap/)
<!-- badges: end -->
Expand Down
64 changes: 23 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dynwrap: Representing and Inferring Single-Cell Trajectories

[![R-CMD-check](https://github.com/dynverse/dynwrap/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dynverse/dynwrap/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/dynverse/dynwrap/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dynverse/dynwrap?branch=master)
coverage](https://codecov.io/gh/dynverse/dynwrap/graph/badge.svg)](https://app.codecov.io/gh/dynverse/dynwrap)
[**Tutorials**](https://dynverse.org) [**Reference
documentation**](https://dynverse.org/reference/dynwrap/)
<!-- badges: end -->
Expand All @@ -16,15 +16,15 @@ documentation**](https://dynverse.org/reference/dynwrap/)
**dynwrap** contains the code for a common model of single-cell
trajectories. The package can:

- Wrap the input data of a trajectory inference method, such as
expression and prior information
- Run a trajectory inference method in R, in a docker container or a
singularity container
- Wrap the output of a trajectory inference method, such as the
pseudotime, a clustering or a branch network, and convert it into a
common trajectory model
- Further postprocess and adapt the trajectory model, such as
labelling the milestones and rooting the trajectory
- Wrap the input data of a trajectory inference method, such as
expression and prior information
- Run a trajectory inference method in R, in a docker container or a
singularity container
- Wrap the output of a trajectory inference method, such as the
pseudotime, a clustering or a branch network, and convert it into a
common trajectory model
- Further postprocess and adapt the trajectory model, such as labelling
the milestones and rooting the trajectory

![](man/figures/trajectory_model.png)

Expand All @@ -38,13 +38,13 @@ containers in [dynmethods](https://github.com/dynverse/dynmethods).

The advantage of using a common model is that it allows:

- Comparison between a prediction and a gold standard, eg. using
[dyneval](https://github.com/dynverse/dyneval)
- Comparing two predictions
- Easily visualise the trajectory, eg. using
[dynplot](https://github.com/dynverse/dynplot)
- Extracting relevant features/genes, eg. using
[dynfeature](https://github.com/dynverse/dynfeature)
- Comparison between a prediction and a gold standard, eg. using
[dyneval](https://github.com/dynverse/dyneval)
- Comparing two predictions
- Easily visualise the trajectory, eg. using
[dynplot](https://github.com/dynverse/dynplot)
- Extracting relevant features/genes, eg. using
[dynfeature](https://github.com/dynverse/dynfeature)

## Latest changes

Expand All @@ -53,34 +53,16 @@ list of changes.

<!-- This section gets automatically generated from inst/NEWS.md -->

### Recent changes in dynwrap 1.2.3
### Recent changes in dynwrap 1.2.5

- MINOR CHANGE: Fixes to metadata (documentation, citation entry,
broken links).
- BUG FIX `convert_definition()`: Fix for purrr having deprecated
`invoke` in favour of `exec` (PR \#166).

### Recent changes in dynwrap 1.2.2
### Recent changes in dynwrap 1.2.4

- MAJOR CHANGE `convert_milestone_percentages_to_progressions()`:
Rewrite implementation to attain significant speedup.
- Resubmission after babelwhale was removed from CRAN.

- MINOR CHANGE `infer_trajectory()`: Infer command (Rscript/python)
from file extension if possible and avoid using shebang to execute
script, because R CMD check for R 4.0 puts Rscript and R dummy
executables on the path before R CMD check. This means
`#!/usr/bin/env Rscript` does not work anymore.

- MINOR CHANGE `add_feature_importance()`: Add a function for adding
feature importance scores to a trajectory.

- BUG FIX `project_waypoints()`: Rename milestone waypoints such that
the names are unique.

- BUG FIX `infer_trajectory()`: Fix error message printing.

- BUG FIX: `dyndimred` is used conditionally.

- BUG FIX: `wrap_expression()` and `add_expression()`: Do not override
feature_info when it already exists in dataset.
- MINOR CHANGE: Added `@return` documentation to all functions.

## Dynverse dependencies

Expand Down
9 changes: 4 additions & 5 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# dynwrap 1.2.4
# dynwrap 1.2.5

* Resubmission after babelwhale was removed from CRAN.
* BUG FIX `convert_definition()`: Fix for purrr having deprecated `invoke` in favour of `exec` (PR #166).

* MINOR CHANGE: Added `@return` documentation to all functions.

## Test environments
* local Fedora install, R 4.2
* ubuntu 22.04, mac os x, windows (on github actions), R 4.2
* local Fedora install, R 4.5
* ubuntu, mac os x, windows (on github actions), multiple r versions
* win-builder (devel and release)
1 change: 1 addition & 0 deletions tests/testthat/test-method_create_ti_method_container.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ context("Testing create_ti_method_container")
skip_on_appveyor()
skip_on_os("mac")
skip_on_cran()
skip_if_not(test_docker_installation(), "Docker is not available")

tags <- c("dynwrapr_tester:latest") # "dynwrappy_tester:v0.1.0"

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-wrap_add_timings.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ test_that("Testing add_timings", {
testthat::expect_equivalent(names(tl), c("start", "second", "third", "stop"))

diffs <- diff(unlist(wr$timings))
testthat::expect_true(all(abs(diffs - c(1, .5, .25)) < .1))
testthat::expect_true(all(abs(diffs - c(1, .5, .25)) < .5))
})
2 changes: 1 addition & 1 deletion vignettes/create_ti_method_definition.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ knitr::asis_output(paste0("```r\n", run_r_string, "\n```"))

Make sure this script is executable!

```{bash, eval=NOT_CRAN && NOT_TRAVIS}
```{bash, eval=NOT_CRAN && NOT_TRAVIS && .Platform$OS.type != "windows"}
chmod +x run.R
```

Expand Down