Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34c190c
commit ec15cc8
Showing
15 changed files
with
274 additions
and
186 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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
Package: Rseb | ||
Type: Package | ||
Title: A package for NGS data managing and visualization | ||
Version: 0.1.6 | ||
Version: 0.1.7 | ||
Author: Sebastian Gregoricchio | ||
Maintainer: Sebastian Gregoricchio <sebastian.gregoricchio@gmail.com> | ||
Description: An R-package for daily tasks required to handle biological data as well as avoid re-coding of small functions for quick but necessary data managing. | ||
License: GNU GENERAL PUBLIC LICENSE version 3 | ||
Depends: | ||
R (>= 3.2.0), BiocManager, Biostrings, biomaRt, GO.db, rtracklayer, cowplot, data.table, ggplot2 (>= 3.3.3), ggrepel, matrixStats, plyr, dplyr, purrr, robustbase, stringr, tidyr, tools, labeling, devtools, rvcheck, curl | ||
R (>= 4.0.0) | ||
Imports: | ||
BiocManager, Biostrings, biomaRt, GO.db, rtracklayer, cowplot, data.table, ggplot2 (>= 3.3.3), ggrepel, ggpubr, matrixStats, plyr, dplyr, tidyr, purrr, robustbase, stringr, tools, devtools, rvcheck, curl | ||
biocViews: | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 7.1.1 | ||
git_url: https://github.com/sebastian-gregoricchio/Rseb/ | ||
URL: | ||
https://sebastian-gregoricchio.github.io/Rseb/ | ||
https://github.com/sebastian-gregoricchio/Rseb/ | ||
https://sebastian-gregoricchio.github.io/ | ||
BugReports: https://github.com/sebastian-gregoricchio/Rseb/issues |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,56 @@ | ||
#' @title \code{Rseb} updates verification | ||
#' | ||
#' @description It verifies if \code{Rseb} is up-to-date and installs it when required. | ||
#' | ||
#' @param update Logical value to define whether update the \code{Rseb} package. By default \code{TRUE}. | ||
#' @param verbose Logical value to define whether print messages. By default \code{TRUE}. | ||
#' @param force Logical value to define whether to force the installation of \code{Rseb} even though already up-to-date. Parameter passed to \code{devtools::install_github()}. By default \code{FALSE}. | ||
#' | ||
#' @return Warnings and/or messages. Installation of the latest version of \code{Rseb} if required. | ||
#' | ||
#' @details This function will check for internet availability. | ||
#' | ||
#' @export actualize | ||
|
||
|
||
actualize = function(update = TRUE, | ||
verbose = TRUE, | ||
force = FALSE) { | ||
|
||
# Check internet connection | ||
if (isFALSE(curl::has_internet())) {return(invisible(NULL))} | ||
|
||
# Store Rseb package versions | ||
check = suppressMessages(rvcheck::check_github("sebastian-gregoricchio/Rseb")) | ||
# When up-to-date == NA it means that it is a developmental version higher then the last release | ||
if (is.na(check$up_to_date)) {return(invisible(NULL))} | ||
|
||
# Check if Rseb is up-to-date | ||
if (check$up_to_date == FALSE) { | ||
return(warning(paste("The Rseb package is not up-to-date. Installed version", | ||
check$installed_version, "-->", check$latest_version, | ||
"available. \nTo update Rseb type: Rseb::actualize()"))) | ||
} | ||
|
||
# Update Rseb if required | ||
if (check$up_to_date == FALSE & update == TRUE) { | ||
devtools::install_github("sebastian-gregoricchio/Rseb", force = force) | ||
} else if (verbose == T) { | ||
return(message(paste("Rseb's latest version (v", check$installed_version, ") is already installed.", sep = "")))} | ||
|
||
} # END function | ||
#' @title \code{Rseb} updates verification | ||
#' | ||
#' @description It verifies if \code{Rseb} is up-to-date and installs it when required. | ||
#' | ||
#' @param update Logical value to define whether update the \code{Rseb} package. By default \code{TRUE}. | ||
#' @param verbose Logical value to define whether print messages. By default \code{TRUE}. | ||
#' @param force Logical value to define whether to force the installation of \code{Rseb} even though already up-to-date. Parameter passed to \code{devtools::install_github()}. By default \code{FALSE}. | ||
#' | ||
#' @return Warnings and/or messages. Installation of the latest version of \code{Rseb} if required. | ||
#' | ||
#' @details This function will check for internet availability. | ||
#' | ||
#' @export actualize | ||
|
||
|
||
actualize = function(update = TRUE, | ||
verbose = TRUE, | ||
force = FALSE) { | ||
|
||
# Check internet connection | ||
if (isFALSE(curl::has_internet())) {return(invisible(NULL))} | ||
|
||
# Store Rseb package versions | ||
check = suppressMessages(rvcheck::check_github("sebastian-gregoricchio/Rseb")) | ||
# When up-to-date == NA it means that it is a developmental version higher then the last release | ||
if (is.na(check$up_to_date)) {return(invisible(NULL))} | ||
|
||
# Check if Rseb is up-to-date and return a message if not up-to-date | ||
if (check$up_to_date == FALSE) { | ||
message = paste("| The 'Rseb' package is not up-to-date. Installed version", | ||
check$installed_version, "-->", check$latest_version, | ||
"available. |") | ||
command = "| To update Rseb type: Rseb::actualize()" | ||
|
||
return(message(paste("\033[0;37;44m", | ||
paste(rep("-", nchar(message)), collapse = ""), | ||
"\n", message, "\n", | ||
command, paste(rep(" ", (nchar(message) - nchar(command)) - 1), collapse = ""), "|", | ||
"\n", paste(rep("-", nchar(message)), collapse = ""), | ||
"\033[0m", | ||
sep = ""))) | ||
} | ||
|
||
|
||
|
||
# Update Rseb if required | ||
if (check$up_to_date == F & update == T) {devtools::install_github("sebastian-gregoricchio/Rseb")} | ||
else if (check$up_to_date == T) { | ||
if (force == T) {devtools::install_github("sebastian-gregoricchio/Rseb", force = force)} | ||
else if (verbose == T) {return(message(paste("Rseb's latest version (v", check$installed_version, ") is already installed.", sep = "")))} | ||
} | ||
|
||
|
||
|
||
|
||
} # END function |
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.