Skip to content

Commit

Permalink
Merge pull request #116 from FertigLab/dev
Browse files Browse the repository at this point in the history
update master to 0.99.2
  • Loading branch information
jmitchell81 authored May 8, 2024
2 parents 4f50596 + 8bb1db7 commit 9ef93f0
Show file tree
Hide file tree
Showing 338 changed files with 12,060 additions and 3,702 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
^old\.README\.md$
^readme_images$
^scenic_bash$
^vignettes/articles$
.nojekyll$

1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
30 changes: 30 additions & 0 deletions .github/copy_to_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Designate desired directories and files
SRC_FOLDER_PATHS=(data-raw man R tests vignettes)
SRC_FILE_PATHS=(DESCRIPTION LICENSE NAMESPACE NEWS.md README.md inst/CITATION)

# Get files from directories
FILES=$(find "${SRC_FOLDER_PATHS[@]}" -type f)

# Add indicated individual files
for F in "${SRC_FILE_PATHS[@]}"
do
FILES+=" ${F}"
done

echo "${FILES[@]}"

# Pass these to github:
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
# Fetch branches
git fetch
# Checkout target branch
git checkout $TARGET_BRANCH
# copy files from the branch the action is being run upon
SRC_BRANCH=$(git symbolic-ref --short HEAD)
git checkout $SRC_BRANCH -- $FILES
# Commit to the repository (ignore if no changes)
git add -A
git diff-index --quiet HEAD || git commit -am "update files"
# Push to remote branch
git push origin $TARGET_BRANCH
20 changes: 19 additions & 1 deletion .github/workflows/bioc_branch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
name: Update Bioconductor package files

on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

jobs:
copy:
name: Copy files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: copy
env:
TARGET_BRANCH: 'master'
run: .github/copy_to_branch.sh
shell: bash
44 changes: 42 additions & 2 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
name: documentation-update
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
paths: ["R/**"]
workflow_dispatch:

name: documentation-update

jobs:
document:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Commit and push changes
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add man/\* NAMESPACE DESCRIPTION
git commit -m "Update documentation" || echo "No changes to commit"
git pull --ff-only
git push origin
49 changes: 47 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
name: pkgdown-update
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown-update

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

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

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .github/workflows/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ we just want to avoid storing code that is not OK.
## For the submitter

- [ ] `R CMD build` & `R CMD check` pass
- [ ] `BiocCheck` passes
- [ ] Needed tests exist and passing or not needed
- [ ] The change is sufficiently small

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/r-build-check.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: r-build-check
on:
push:
branches: ['v0.2.2_development']
pull_request:
branches: ['master', 'v0.2.2']
branches: ['master', 'dev']
workflow_dispatch:

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ R/.Rhistory
scenic/*

scratch/

.github/workflows/doc_update.yml
.github/workflows/pkgdown_update.yml
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

15 changes: 9 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: domino2
Package: dominoSignal
Title: Cell Communication Analysis for Single Cell RNA Sequencing
Version: 0.99.1
Version: 0.99.2
Authors@R: c(
person("Christopher", "Cherry", role = c("aut"), email = "[email protected]", comment = c(ORCID = "0000-0002-5481-0055")),
person("Jacob T", "Mitchell", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-5370-9692")),
Expand All @@ -11,8 +11,8 @@ Authors@R: c(
person("Jennifer", "Elisseeff", role = "ctb", email = "[email protected]", comment = c(ORCID = "0000-0002-5066-1996"))
)
Description:
Domino2 is a package developed to analyze cell signaling through ligand - receptor - transcription factor networks in scRNAseq data. It takes as input information transcriptomic data, requiring counts, z-scored counts, and cluster labels, as well as information on transcription factor activation (such as from SCENIC) and a database of ligand and receptor pairings (such as from cellphoneDB). This package creates an object storing ligand - receptor - transcription factor linkages by cluster and provides several methods for exploring, summarizing, and visualizing the analysis.
BugReports: https://github.com/FertigLab/domino2/issues
dominoSignal is a package developed to analyze cell signaling through ligand - receptor - transcription factor networks in scRNAseq data. It takes as input information transcriptomic data, requiring counts, z-scored counts, and cluster labels, as well as information on transcription factor activation (such as from SCENIC) and a database of ligand and receptor pairings (such as from cellphoneDB). This package creates an object storing ligand - receptor - transcription factor linkages by cluster and provides several methods for exploring, summarizing, and visualizing the analysis.
BugReports: https://github.com/FertigLab/dominoSignal/issues
Depends:
R(>= 4.2.0),
Imports:
Expand All @@ -31,7 +31,7 @@ Imports:
License: GPL-3 | file LICENSE
Encoding: UTF-8
LazyData: false
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
biocViews:
SystemsBiology,
SingleCell,
Expand All @@ -43,7 +43,10 @@ Suggests:
rmarkdown,
Seurat,
testthat,
formatR
formatR,
BiocFileCache,
SingleCellExperiment
VignetteBuilder: knitr
Language: en-US
Roxygen: list(markdown = TRUE)
URL: https://fertiglab.github.io/dominoSignal/
22 changes: 20 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# domino2 v0.2.2
# dominoSignal v0.99.2

## Package Name

- Update of package name from "domino2" to "dominoSignal"

## Bioconductor Standards

- Update to Vignettes presenting application of the DominoSignal pipeline on data formatted as a SingleCellExperiment object
- Implemented caching of example data by BiocCache to meet package size limits
- Removal of depreciated scripts for running SCENIC. Tutorials for running SCENIC are still present in vignettes
- Corrected BiocCheck notes pertaining to coding practices including paste in conditional statements, functions with dontrun examples, usage of seq_len or seq_along in place of seq, and usage of vapply in place of sapply


# dominoSignal v0.99.1

- Update to Bioconductor version numbering conventions for package submission

# dominoSignal v0.2.2

## Linkage functions
- Addition of new class to summarize linkages in objects
Expand All @@ -8,7 +26,7 @@
## Package structure
- Adjustments made to meet BioConductor standards

# domino2 v0.2.1
# dominoSignal v0.2.1

## Updates to domino object construction
- Uniform formats for inputs of receptor-ligand interaction databases, transcription factor activity features, and regulon gene lists for operability with alternative databases and transcription factor activation inference methods
Expand Down
8 changes: 5 additions & 3 deletions R/class_definitions.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ NULL
#' @name domino-class
#' @rdname domino-class
#' @exportClass domino
#' @return an instance of class `domino `
#'
domino <- methods::setClass(
Class = "domino",
Expand Down Expand Up @@ -58,6 +59,7 @@ domino <- methods::setClass(
#' @name linkage_summary-class
#' @rdname linkage_summary-class
#' @exportClass linkage_summary
#' @return an instance of class `linkage_summary`
#'
linkage_summary <- setClass(
Class = "linkage_summary",
Expand All @@ -76,7 +78,7 @@ linkage_summary <- setClass(
#' @return a printed description of the number of cell clusters in the object
#' @keywords internal
#' @examples
#' print(domino2:::pbmc_dom_built_tiny)
#' print(dominoSignal:::pbmc_dom_built_tiny)
#'
setMethod("print", "domino", function(x, ...) {
if (x@misc$build) {
Expand All @@ -103,9 +105,9 @@ setMethod("print", "domino", function(x, ...) {
#' @return a printed description of the number of cells in a domino object and its build status
#' @keywords internal
#' @examples
#' domino2:::pbmc_dom_built_tiny
#' dominoSignal:::pbmc_dom_built_tiny
#'
#' show(domino2:::pbmc_dom_built_tiny)
#' show(dominoSignal:::pbmc_dom_built_tiny)
#'
setMethod("show", "domino", function(object) {
if (object@misc$build) {
Expand Down
73 changes: 49 additions & 24 deletions R/convenience_fxns.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,64 @@ NULL
#'
#' @param dom Domino object to rename clusters in
#' @param clust_conv Named vector of conversions from old to new clusters. Values are taken as new clusters IDs and names as old cluster IDs.
#' @param warning Logical. If TRUE, will warn if a cluster is not found in the conversion table. Default is FALSE.
#' @return A domino object with clusters renamed in all applicable slots.
#' @keywords internal
#' @export
#' @examples
#' new_clust <- c("CD8_T_cell" = "CD8+ T Cells",
#' "CD14_monocyte" = "CD14+ Monocytes", "B_cell" = "B Cells")
#' pbmc_dom_built_tiny <- rename_clusters(domino2:::pbmc_dom_built_tiny, new_clust)
#' pbmc_dom_built_tiny <- rename_clusters(dominoSignal:::pbmc_dom_built_tiny, new_clust)
#'
rename_clusters <- function(dom, clust_conv) {
if (is.null(dom@clusters)) {
stop("There are no clusters in this domino object")
}
if (dom@misc$create) {
dom@clusters <- revalue(dom@clusters, clust_conv)
colnames(dom@clust_de) <- clust_conv
names(colnames(dom@clust_de)) <- c()
colnames(dom@misc$cl_rec_percent) <- clust_conv
}
if (dom@misc$build) {
names(dom@linkages$clust_tf) <- clust_conv
names(dom@linkages$clust_rec) <- clust_conv
names(dom@linkages$clust_incoming_lig) <- clust_conv
names(dom@linkages$clust_tf_rec) <- clust_conv
colnames(dom@signaling) <- paste0("L_", clust_conv)
rownames(dom@signaling) <- paste0("R_", clust_conv)
names(dom@cl_signaling_matrices) <- clust_conv
for (cl in clust_conv) {
colnames(dom@cl_signaling_matrices[[cl]]) <- paste0("L_", clust_conv)
rename_clusters <- function(dom, clust_conv, warning = FALSE) {
if (is.null(dom@clusters)) {
stop("There are no clusters in this domino object")
}
}
return(dom)
if (dom@misc$create) {
dom@clusters <- plyr::revalue(dom@clusters, clust_conv, warn_missing = warning)
colnames(dom@clust_de) <- plyr::revalue(colnames(dom@clust_de), clust_conv, warn_missing = warning)
names(colnames(dom@clust_de)) <- c()
colnames(dom@misc$cl_rec_percent) <- plyr::revalue(colnames(dom@misc$cl_rec_percent),
clust_conv,
warn_missing = warning
)
}
if (dom@misc$build) {
names(dom@linkages$clust_tf) <- plyr::revalue(names(dom@linkages$clust_tf), clust_conv, warn_missing = warning)
names(dom@linkages$clust_rec) <- plyr::revalue(names(dom@linkages$clust_rec), clust_conv, warn_missing = warning)
names(dom@linkages$clust_incoming_lig) <- plyr::revalue(names(dom@linkages$clust_incoming_lig),
clust_conv,
warn_missing = warning
)
names(dom@linkages$clust_tf_rec) <- plyr::revalue(names(dom@linkages$clust_tf_rec),
clust_conv,
warn_missing = warning
)
sig_ligands <- colnames(dom@signaling)
sig_rec <- rownames(dom@signaling)
# Remove L_ prefix
sig_ligand_clust <- gsub("^L_", "", sig_ligands)
# Remove R_ prefix
sig_rec_clust <- gsub("^R_", "", sig_rec)
new_lig_clust <- plyr::revalue(sig_ligand_clust, clust_conv, warn_missing = warning)
new_rec_clust <- plyr::revalue(sig_rec_clust, clust_conv, warn_missing = warning)
colnames(dom@signaling) <- paste0("L_", new_lig_clust)
rownames(dom@signaling) <- paste0("R_", new_rec_clust)
names(dom@cl_signaling_matrices) <- plyr::revalue(names(dom@cl_signaling_matrices),
clust_conv,
warn_missing = warning
)
for (cl in names(dom@cl_signaling_matrices)) {
cl_sig_ligands <- colnames(dom@cl_signaling_matrices[[cl]])
# Remove L_ prefix
cl_sig_lig_clust <- gsub("^L_", "", cl_sig_ligands)
cl_sig_lig_new <- plyr::revalue(cl_sig_lig_clust, clust_conv, warn_missing = warning)
colnames(dom@cl_signaling_matrices[[cl]]) <- paste0("L_", cl_sig_lig_new)
}
}
return(dom)
}


#' Convert Genes Using Table
#'
#' Takes a vector of gene inputs and a conversion table and returns a
Expand Down
Loading

0 comments on commit 9ef93f0

Please sign in to comment.