Skip to content

Commit

Permalink
Add quiet install of CRAN packages
Browse files Browse the repository at this point in the history
  • Loading branch information
j-berg committed Apr 5, 2020
1 parent 6c673e1 commit 1a3f48f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions xpresspipe/RbuildIndex.r
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sub_license <- function() {
# Install dependencies
if (!requireNamespace("BiocManager", quietly = TRUE)) {install.packages("BiocManager", repos = "http://cran.us.r-project.org")}

install.packages("stringi", repos = "http://cran.us.r-project.org")
install.packages("stringi", repos = "http://cran.us.r-project.org", quiet = TRUE)
library(stringi)

if ("GenomicFeatures" %in% rownames(installed.packages()) == FALSE) {
Expand All @@ -68,7 +68,7 @@ library(GenomicFeatures)

if ("data.table" %in% rownames(installed.packages()) == FALSE) {
print("Installing data.table...")
install.packages("data.table", repos = "http://cran.us.r-project.org")
install.packages("data.table", repos = "http://cran.us.r-project.org", quiet = TRUE)
} else {
print("data.table package already installed")
}
Expand Down
4 changes: 2 additions & 2 deletions xpresspipe/Rcomplexity.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ license <- function() {
}

# Measure library complexity of RNA-seq sample
install.packages("stringi", repos = "http://cran.us.r-project.org")
install.packages("stringi", repos = "http://cran.us.r-project.org", quiet = TRUE)
library(stringi)

# Install dependencies
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager", repos = "http://cran.us.r-project.org")
install.packages("BiocManager", repos = "http://cran.us.r-project.org", quiet = TRUE)
}

if ("Rsubread" %in% rownames(installed.packages()) == FALSE) {
Expand Down
2 changes: 1 addition & 1 deletion xpresspipe/Rdiffxpress.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ license <- function() {
}

# Control batch effects for prep, chips, etc
install.packages("stringi", repos = "http://cran.us.r-project.org")
install.packages("stringi", repos = "http://cran.us.r-project.org", quiet = TRUE)
library(stringi)

if (!requireNamespace("BiocManager", quietly = TRUE)) {install.packages("BiocManager", repos = "http://cran.us.r-project.org")}
Expand Down
6 changes: 3 additions & 3 deletions xpresspipe/Rmetagene.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ license <- function() {
}

# Import dependencies
install.packages("stringi", repos = "http://cran.us.r-project.org")
install.packages("stringi", repos = "http://cran.us.r-project.org", quiet = TRUE)
library(stringi)

if (!requireNamespace("BiocManager", quietly = TRUE)) {install.packages("BiocManager", repos = "http://cran.us.r-project.org")}
if (!requireNamespace("BiocManager", quietly = TRUE)) {install.packages("BiocManager", repos = "http://cran.us.r-project.org", quiet = TRUE)}

if ("data.table" %in% rownames(installed.packages()) == FALSE) {
print("Installing data.table...")
install.packages("data.table", repos = "http://cran.us.r-project.org")
install.packages("data.table", repos = "http://cran.us.r-project.org", quiet = TRUE)
} else {
print("data.table package already installed")
}
Expand Down
8 changes: 4 additions & 4 deletions xpresspipe/Rperiodicity.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ license <- function() {
}

# Run install of data.table to make sure most recent version is installed
install.packages("stringi", repos = "http://cran.us.r-project.org")
install.packages("stringi", repos = "http://cran.us.r-project.org", quiet = TRUE)
library(stringi)

library(data.table)
Expand All @@ -42,9 +42,9 @@ OUTPUT_P_SITES <- args[3] # Path and filename with .txt extension
PATH <- args[4] # File directory

# Install riboWaltz functions
source(paste(toString(PATH), "ribowaltz_annotation.R", sep=""))
source(paste(toString(PATH), "ribowaltz_psites.R", sep=""))
source(paste(toString(PATH), "ribowaltz_combine_bam.R", sep=""))
source(paste(toString(PATH), "ribowaltz_annotation.r", sep=""))
source(paste(toString(PATH), "ribowaltz_psites.r", sep=""))
source(paste(toString(PATH), "ribowaltz_combine_bam.r", sep=""))

# Get p-site offsets
annotation_dt <- create_annotation(gtfpath=GTF)
Expand Down

0 comments on commit 1a3f48f

Please sign in to comment.