-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fastSmoothEMD-review
- Loading branch information
Showing
103 changed files
with
6,143 additions
and
1,880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
^data-raw$ | ||
^.travis.yml | ||
^appveyor\.yml$ | ||
^doc$ | ||
^Meta$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# 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: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
schedule: | ||
- cron: "5 5 5 * *" # run at 05:05 on 5th day of each month | ||
|
||
name: Build | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: ubuntu-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'oldrel'} | ||
- {os: ubuntu-latest, r: 'devel'} | ||
- {os: macOS-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
# on PR set branch to be able to push back, see https://github.com/actions/checkout/issues/124 | ||
- uses: actions/checkout@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- uses: actions/checkout@v2 | ||
if: github.event_name != 'pull_request' | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
- uses: r-lib/actions/setup-tinytex@v2 | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: | | ||
any::devtools | ||
any::covr | ||
- name: Document | ||
run: devtools::document() | ||
shell: Rscript {0} | ||
|
||
- name: Commit and push documentation changes | ||
if: ${{ (matrix.config.os == 'ubuntu-latest') && (matrix.config.r == 'release') }} | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
git add man/\* NAMESPACE | ||
git commit -m "Update documentation" || echo "No changes to commit" | ||
git pull --ff-only | ||
git push origin | ||
- name: Check package | ||
run: devtools::check() | ||
shell: Rscript {0} | ||
|
||
- name: Check coverage | ||
run: covr::codecov(quiet = FALSE) | ||
shell: Rscript {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# 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: | ||
push: | ||
branches: [main, master] | ||
release: | ||
types: [published] | ||
|
||
name: Website | ||
|
||
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 }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- 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, local::. | ||
|
||
- name: Build site | ||
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Deploy to GitHub pages 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
clean: false | ||
branch: gh-pages | ||
folder: docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ | |
*.so | ||
*.dll | ||
vignettes/.build.timestamp | ||
inst/doc | ||
doc | ||
Meta | ||
docs/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: netdist | ||
Title: An implementation of the NetEMD alignment-free network distance measure | ||
Version: 0.4.9000 | ||
Version: 0.4.9100 | ||
Authors@R: person("Martin", "O'Reilly",email = "[email protected]", | ||
role = c("aut", "cre")) | ||
Description: An implementation of the NetEMD alignment-free network | ||
|
@@ -20,14 +20,15 @@ Imports: | |
purrr, | ||
lpSolve, | ||
plyr, | ||
dplyr, | ||
Rcpp | ||
pheatmap, | ||
Rcpp, | ||
Suggests: | ||
dplyr, | ||
phangorn, | ||
testthat, | ||
knitr, | ||
phangorn, | ||
rmarkdown, | ||
roxygen2 | ||
RoxygenNote: 6.1.1 | ||
RoxygenNote: 7.2.0 | ||
VignetteBuilder: knitr | ||
Encoding: UTF-8 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
#' Heatmap of Netdis many-to-many comparisons | ||
#' | ||
#' Provides a heatmap and dendrogram for the network comparisons via \code{pheatmap}. | ||
#' | ||
#' @param netdislist Default output of \code{netdis_many_to_many}. | ||
#' | ||
#' @param whatrow Selection of the row in \code{netdis_many_to_many$comp_spec} to be used for plotting. | ||
#' | ||
#' @param clustering_method Clustering method as allowed in the \code{pheatmap} function from the \code{pheatmap} package. The dendrogram will appear if \code{docluster} is TRUE (default). | ||
#' | ||
#' @param main Title of the plot. | ||
#' | ||
#' @param docluster controls the order of the rows and columns. If TRUE (default) the rows and columns will be reordered to create the dendrogram. If FALSE, then only the heatmap is drawn. | ||
#' | ||
#' @return Provides a heatmap and dendrogram for the network comparisons via \code{pheatmap}. | ||
#' @export | ||
|
||
netdis.plot <- function(netdislist,whatrow=c(1,2)[2],clustering_method="ward.D",main="Nedis",docluster=TRUE){ | ||
adjmat <- cross_comp_to_matrix(measure = netdislist$netdis[whatrow,], cross_comparison_spec = netdislist$comp_spec) | ||
vnames <- rownames(adjmat) | ||
|
||
legend1 <- seq(min(adjmat),max(adjmat),length.out = 5) | ||
levels1 <- round(legend1,digits = 2) | ||
pheatmap::pheatmap(mat = as.dist(adjmat),cluster_rows = docluster,cluster_cols = docluster,clustering_method = clustering_method,angle_col=45,main = main,treeheight_row = 80,labels_row = vnames,labels_col = vnames,display_numbers = TRUE,legend_breaks = legend1,legend_labels = levels1) | ||
} | ||
|
||
|
||
|
||
|
||
#' Heatmap of NetEmd many-to-many comparisons | ||
#' | ||
#' Provides a heatmap and dendrogram for the network comparisons via \code{pheatmap}. | ||
#' | ||
#' @param netdislist Default output of \code{netdis_many_to_many}. | ||
#' | ||
#' @param whatrow Selection of the row in \code{netdis_many_to_many$comp_spec} to be used for plotting. | ||
#' | ||
#' @param clustering_method Clustering method as allowed in the \code{pheatmap} function from the \code{pheatmap} package. The dendrogram will appear if \code{docluster} is TRUE (default). | ||
#' | ||
#' @param main Title of the plot. | ||
#' | ||
#' @param docluster controls the order of the rows and columns. If TRUE (default) the rows and columns will be reordered to create the dendrogram. If FALSE, then only the heatmap is drawn. | ||
#' | ||
#' @return Provides a heat map and dendrogram for the network comparisons via \code{pheatmap}. | ||
#' @export | ||
|
||
netemd.plot <- function(netemdlist,clustering_method="ward.D",main="NetEmd",docluster=TRUE){ | ||
adjmat <- cross_comp_to_matrix(measure = netemdlist$netemds, cross_comparison_spec = netemdlist$comp_spec) | ||
vnames <- rownames(adjmat) | ||
|
||
legend1 <- seq(min(adjmat),max(adjmat),length.out = 5) | ||
levels1 <- round(legend1,digits = 2) | ||
pheatmap::pheatmap(mat = as.dist(adjmat),cluster_rows = docluster,cluster_cols = docluster,clustering_method = clustering_method,angle_col=45,main = main,treeheight_row = 80,labels_row = vnames,labels_col = vnames,display_numbers = TRUE,legend_breaks = legend1,legend_labels = levels1) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.