Skip to content

Commit

Permalink
Merge pull request #633 from cole-trapnell-lab/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
brgew authored Nov 10, 2022
2 parents 87f6e88 + e8ad345 commit b545460
Show file tree
Hide file tree
Showing 29 changed files with 464 additions and 141 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.github/CODEOWNERS @ctrapnell @hpliner @brgew
/.github/workflows/* @ctrapnell @hpliner @brgew
/src/docker/* @ctrapnell @hpliner @brgew
125 changes: 125 additions & 0 deletions .github/workflows/check_on_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
#
# Check Monocle3 repository on push event.
#
# There is information on Docker container security at
# URL: https://docs.docker.com/engine/security/
# URL: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
# Note: I don't see how one can specify the 'user' for the
# Actions runs so I don't see the value of creating
# a non-root user when the container is built.
# There is information on Github Actions security at
# URL: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
# URL: https://blog.gitguardian.com/github-actions-security-cheat-sheet/
# This Github Actions page notes:
# o Using CODEOWNERS to monitor changes: specifically changes to.github/workflows/*
# o Preventing GitHub Actions from creating or approving pull requests
# Security notes:
# o secure the docker container against meddling
# o secure the monocle3 repository against meddling
#
name: Monocle3 check on push
run-name: Check branch ${{ github.ref_name }} on push by ${{ github.actor }}

on: [push]

jobs:
monocle3_check_on_push:

# Notes: ubuntu.
# o use Ubuntu - there are messages on line about needing to use Ubuntu
# for use with Github Actions.
# o use a Docker container that has the Monocle3 dependencies installed.
# see 'github.com:cole-trapnell-lab/monocle3/src/docker/NOTES' and
# 'github.com:cole-trapnell-lab/Docker//monocle3_depend/NOTES'.
# o Github Actions has a limited variety of Linux runners. See
# URL: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: ubuntu-latest

# One can add fine-grain-control over GITHUB_TOKEN permissions but
# I have not found authoratative descriptions of the permissions
# targets. www pages have some information
# URL: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
# URL: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
# permissions:
# actions: read|write|none
# checks: read|write|none
# contents: read|write|none
# deployments: read|write|none
# id-token: read|write|none
# issues: read|write|none
# discussions: read|write|none
# packages: read|write|none
# pages: read|write|none
# pull-requests: read|write|none
# repository-projects: read|write|none
# security-events: read|write|none
# statuses: read|write|none

container:
# Note:
# in order for the GITHUB_TOKEN to work as a credential one must
# allow the Monocle3 repository to access the container 'package'.
# Navigate to the Packages tab -> <repository> tab -> Package settings ->
# Manage Actions access: click on Add Repository; give repository name
#
# The following Docker image was pushed initially to the Docker container
# but we use now the Github container registry. The following image and
# credential lines are here for documentation, if require in the future.
# image: docker.io/brgew/monocle3_depend:v1.3.0
#
# The following three (commented out) lines give credentials for a docker
# image stored at the Docker container registry.
# credentials:
# username: brgew
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN_READ }}
#


# The following Docker image was pushed to the Github container registry,
# which is found at the Github Packages tab.
# image: ghcr.io/cole-trapnell-lab/monocle3_depend.v1.3.0_20221103:v1 # old and replaced
image: ghcr.io/cole-trapnell-lab/monocle3_depend:v1.3.0_1

#
#
# The following three uncommented lines give credentials for a Github
# container registry. There is information about github.ACTOR at
# URL: https://docs.github.com/en/actions/learn-github-actions/contexts
# where there is the statement
# github.actor string The username of the user that triggered the
# initial workflow run. If the workflow run is
# a re-run, this value may differ from
# github.triggering_actor. Any workflow re-runs
# will use the privileges of github.actor, even
# if the actor initiating the re-run
# (github.triggering_actor) has different
# privileges.
credentials:
username: ${{ github.ACTOR }}
password: ${{ secrets.GITHUB_TOKEN }}

# TRAVIS: the testthat scripts check for the TRAVIS environment variable
# in order to choose the correct set of target values and to avoid
# running interactive code. For convenience, I keep the name TRAVIS after
# switching to Actions CI.
# _R_CHECK_TESTS_NLINES_: instruct the devtools::test scripts to output all
# error lines rather than the last 13. See
# https://yihui.org/en/2017/12/last-13-lines-of-output/
env:
TRAVIS: true
_R_CHECK_TESTS_NLINES_: 0

steps:
# Get current repository contents.
- uses: actions/checkout@v3
# Run tests.
# Notes:
# o the RCMD check command appears to not output the regression tests
# output unless an error occurs, in which case, the output of all
# regressions tests is output.
- name: Run R CMD build and R CMD check
run: |
R CMD build .
R CMD check monocle3*tar.gz
shell: bash

7 changes: 4 additions & 3 deletions .travis.yml → 00travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ cache: packages
sudo: required
warnings_are_errors: true
os: linux
dist: xenial
dist: focal
language: r
before_install:
- sudo apt-get install -y libnlopt-dev
- sudo apt-get install -y libudunits2-dev
- sudo apt-get install -y gdal-bin
- sudo apt-get install -y libgdal1-dev
- sudo apt-get install -y libgdal-dev
- sudo apt-get install -y libharfbuzz-dev
- sudo apt-get install -y libfribidi-dev
- sudo apt-get install -y libgit2-dev
- sudo wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
- sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
- sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ jammy main'
- sudo apt-get update
- sudo apt-get install -y cmake
r:
Expand All @@ -50,6 +50,7 @@ script:
export _R_CHECK_DONTTEST_EXAMPLES_=false
R CMD build .
export PKG_TARBALL=$(Rscript -e 'pkg <- devtools::as.package("."); cat(paste0(pkg$package,"_",pkg$version,".tar.gz"))')
export TESTTHAT_MAX_FAILS=Inf
if [ ! -f "$PKG_TARBALL" ]; then exit 1; fi
travis_wait 20 R CMD check monocle3*tar.gz
Expand Down
13 changes: 7 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: monocle3
Title: Clustering, differential expression, and trajectory analysis for single-
cell RNA-Seq
Version: 1.2.9
Title: Clustering, Differential Expression, and Trajectory Analysis for
Single-Cell RNA-Seq
Version: 1.3.1
Authors@R: c(
person(given = "Hannah",
family = "Pliner",
Expand Down Expand Up @@ -46,7 +46,7 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: false
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.1
LinkingTo:
Rcpp
Depends:
Expand Down Expand Up @@ -76,7 +76,6 @@ Imports:
lmtest (>= 0.9-36),
MASS (>= 7.3-51.4),
Matrix (>= 1.2-17),
Matrix.utils,
methods,
openssl,
pbapply (>= 1.4-0),
Expand Down Expand Up @@ -108,7 +107,6 @@ Imports:
uwot (>= 0.1.8),
terra (>= 1.4-17),
tibble (>= 2.1.1),
tictoc,
tidyr (>= 0.8.3),
viridis (>= 0.5.1)
Suggests:
Expand All @@ -120,3 +118,6 @@ Suggests:
scran
VignetteBuilder: knitr
Language: en-US
NeedsCompilation: yes
Packaged: 2022-05-10 17:21:53 UTC; brent
Maintainer: Brent Ewing <bge@uw.edu>
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ importFrom(SummarizedExperiment,Assays)
importFrom(SummarizedExperiment,assays)
importFrom(SummarizedExperiment,rowRanges)
importFrom(dplyr,"%>%")
importFrom(dplyr,n)
importFrom(future,value)
importFrom(igraph,dfs)
importFrom(lme4,glmer)
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Monocle3 1.3.0

### Changes

* Work around conflict between SingleCellExperiment and tictoc packages.
* Fix missing DelayedArray conversion in sparse_prcomp_irlba().
* Relax test for rowname consistency in transfer_cell_labels().
* Update URLs in load_worm_*() functions.
* Minor bug fixes.

# Monocle3 1.2.9

### Changes
Expand Down
9 changes: 5 additions & 4 deletions R/cluster_cells.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#' Cell, 2015.
#'
#' @examples
#' \donttest{
#' \donttest{
#' cell_metadata <- readRDS(system.file('extdata',
#' 'worm_embryo/worm_embryo_coldata.rds',
#' package='monocle3'))
Expand All @@ -71,7 +71,7 @@
#' expression_matrix <- readRDS(system.file('extdata',
#' 'worm_embryo/worm_embryo_expression_matrix.rds',
#' package='monocle3'))
#'
#'
#' cds <- new_cell_data_set(expression_data=expression_matrix,
#' cell_metadata=cell_metadata,
#' gene_metadata=gene_metadata)
Expand Down Expand Up @@ -354,7 +354,7 @@ louvain_clustering <- function(data,
weight=weight,
cell_names=cell_names,
nn_index,
k=k,
k=k,
nn_control=nn_control,
verbose=verbose)

Expand Down Expand Up @@ -471,7 +471,7 @@ leiden_clustering <- function(data,
stop("Phenotype and row name from the data don't match")

graph_result <- cluster_cells_make_graph(data=data,
weight=weight,
weight=weight,
cell_names=cell_names,
nn_index,
k=k,
Expand Down Expand Up @@ -622,6 +622,7 @@ compute_partitions <- function(g,
ncol=length(louvain_modules))

sig_links <- as.matrix(num_links)
row.names(sig_links) = colnames(sig_links) = louvain_modules
sig_links[cluster_mat > qval_thresh] = 0
diag(sig_links) <- 0

Expand Down
Loading

0 comments on commit b545460

Please sign in to comment.