Skip to content

Commit 3fcc47b

Browse files
authored
Merge pull request #378 from taraeicher/fixWarningsInBuild
Fixed warnings and notes in build
2 parents 74636d8 + 8ff6230 commit 3fcc47b

22 files changed

+121
-67
lines changed

R/BLOBFISH.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ GenerateNullPANDADistribution <- function(ppiFile, motifFile, sampSize = 20,
131131

132132
# Return the values.
133133
nullPandasAll <- unlist(nullPandas)
134-
return(sample(nullPandasAll, n = length(nullPandasAll)))
134+
return(sample(nullPandasAll, size = length(nullPandasAll)))
135135
}
136136

137137
#' Find the subnetwork of significant edges connecting the genes.

R/PANDA.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' \strong{PANDA}(Passing Attributes between Networks for Data Assimilation) is a message-passing model
44
#' to reconstruct gene regulatory network, which integrates multiple sources of biological data-including protein-protein interaction data,
55
#' gene expression data, and transcription factor binding motifs data to reconstruct genome-wide, condition-specific regulatory networks.
6-
#' \doi{10.1371/journal.pone.0064832}{(Glass et al. 2013)}
6+
#' (Glass et al. (2013), \doi{10.1371/journal.pone.0064832})
77
#' This function is designed to run the a derived PANDA implementation in Python Library "netZooPy" \href{https://github.com/netZoo/netZooPy}{netZooPy}.
88
#'
99
#' @param expr_file Character string indicating the file path of expression values file, with each gene(in rows) across samples(in columns).

R/YARN.R

Lines changed: 49 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
#'
2020
#' @examples
2121
#' \dontrun{
22-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/'
23-
#' bladder <- paste0(u, 'yarn/bladder.rdata')
24-
#' skin <- paste0(u, 'yarn/skin.rdata')
25-
#' download.file(bladder, destfile='netZooR/data/bladder.rdata')
26-
#' download.file(skin, destfile='netZooR/data/skin.rdata')
22+
#' data(bladder)
2723
#' data(skin)
2824
#' # subsetting and changing column name just for a silly example
2925
#' skin <- skin[1:10,]
@@ -74,8 +70,7 @@ annotateFromBiomart <- function(obj,genes=featureNames(obj),filters="ensembl_gen
7470
#'
7571
#' @examples
7672
#' \donttest{
77-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
78-
#' bladder <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'bladder.rdata'),tmp,quiet=TRUE); local({load(tmp);get('bladder')})}, error=function(e) NULL)
73+
#' data(bladder)
7974
#' if(!is.null(bladder)) checkMisAnnotation(bladder,'GENDER',controlGenes='Y',legendPosition='topleft')
8075
#' }
8176
#'
@@ -112,8 +107,7 @@ checkMisAnnotation <- function(obj, phenotype, controlGenes = "all",
112107
#'
113108
#' @examples
114109
#' \donttest{
115-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
116-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
110+
#' data(skin)
117111
#' if(!is.null(skin)) checkTissuesToMerge(skin,'SMTS','SMTSD')
118112
#' }
119113
#'
@@ -245,8 +239,7 @@ downloadGTEx <- function(type = "genes", file = NULL, ...) {
245239
#' @return matrix
246240
#' @examples
247241
#' \donttest{
248-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
249-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
242+
#' data(skin)
250243
#' if(!is.null(skin)) head(netZooR:::extractMatrix(skin,normalized=FALSE,log=TRUE))
251244
#' if(!is.null(skin)) head(netZooR:::extractMatrix(skin,normalized=FALSE,log=FALSE))
252245
#' }
@@ -288,10 +281,13 @@ extractMatrix <- function(obj, normalized = FALSE, log = TRUE) {
288281
#'
289282
#' @examples
290283
#' \donttest{
291-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
292-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
293-
#' if(!is.null(skin)) filterGenes(skin,labels=c('X','Y','MT'),featureName='chromosome_name')
294-
#' if(!is.null(skin)) filterGenes(skin,labels='protein_coding',featureName='gene_biotype',keepOnly=TRUE)
284+
#' data(skin)
285+
#' if(!is.null(skin)){
286+
#' filterGenes(skin,labels=c('X','Y','MT'),featureName='chromosome_name')
287+
#' }
288+
#' if(!is.null(skin)){
289+
#' filterGenes(skin,labels='protein_coding',featureName='gene_biotype',keepOnly=TRUE)
290+
#' }
295291
#' }
296292
#'
297293
filterGenes <- function(obj, labels = c("X", "Y", "MT"), featureName = "chromosome_name",
@@ -324,8 +320,7 @@ filterGenes <- function(obj, labels = c("X", "Y", "MT"), featureName = "chromoso
324320
#'
325321
#' @examples
326322
#' \donttest{
327-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
328-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
323+
#' data(skin)
329324
#' if(!is.null(skin)) filterLowGenes(skin,'SMTSD')
330325
#' }
331326
#'
@@ -362,8 +357,7 @@ filterLowGenes <- function(obj, groups, threshold = 1, minSamples = NULL,
362357
#'
363358
#' @examples
364359
#' \donttest{
365-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
366-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
360+
#' data(skin)
367361
#' if(!is.null(skin)) filterMissingGenes(skin)
368362
#' }
369363
#'
@@ -391,8 +385,7 @@ filterMissingGenes <- function(obj, threshold = 0) {
391385
#'
392386
#' @examples
393387
#' \donttest{
394-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
395-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
388+
#' data(skin)
396389
#' if(!is.null(skin)) filterSamples(skin,ids="Skin - Not Sun Exposed (Suprapubic)",groups="SMTSD")
397390
#' if(!is.null(skin)) filterSamples(skin,ids=c("GTEX-OHPL-0008-SM-4E3I9","GTEX-145MN-1526-SM-5SI9T"))
398391
#' }
@@ -438,8 +431,7 @@ filterSamples <- function(obj, ids, groups = colnames(obj), keepOnly = FALSE) {
438431
#'
439432
#' @examples
440433
#' \donttest{
441-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
442-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
434+
#' data(skin)
443435
#' if(!is.null(skin)) normalizeTissueAware(skin,"SMTSD")
444436
#' }
445437
#'
@@ -502,8 +494,7 @@ normalizeTissueAware <- function(obj, groups, normalizationMethod = c("qsmooth",
502494
#' @export
503495
#' @examples
504496
#' \donttest{
505-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
506-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
497+
#' data(skin)
507498
#' if(!is.null(skin)) res <- plotCMDS(skin,pch=21,bg=factor(pData(skin)$SMTSD))
508499
#' }
509500
plotCMDS <- function(obj, comp = 1:2, normalized = FALSE, distFun = dist,
@@ -550,8 +541,7 @@ plotCMDS <- function(obj, comp = 1:2, normalized = FALSE, distFun = dist,
550541
#'
551542
#' @examples
552543
#' \donttest{
553-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
554-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
544+
#' data(skin)
555545
#' if(!is.null(skin)) {
556546
#' filtData <- filterLowGenes(skin,"SMTSD")
557547
#' plotDensity(filtData,groups="SMTSD",legendPos="topleft")
@@ -592,8 +582,7 @@ plotDensity <- function(obj, groups = NULL, normalized = FALSE,
592582
#' @export
593583
#' @examples
594584
#' \donttest{
595-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
596-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
585+
#' data(skin)
597586
#' if(!is.null(skin)) {
598587
#' tissues <- pData(skin)$SMTSD
599588
#' plotHeatmap(skin,normalized=FALSE,log=TRUE,trace="none",n=10)
@@ -639,8 +628,7 @@ plotHeatmap <- function(obj, n = NULL, fun = stats::sd, normalized = TRUE,
639628
#' @source \href{https://raw.githubusercontent.com/kokrah/qsmooth/master/R/qsmooth.r}{Kwame Okrah's qsmooth R package}
640629
#' @examples
641630
#' \donttest{
642-
#' u <- 'https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/'
643-
#' skin <- tryCatch({tmp<-tempfile(); download.file(paste0(u,'skin.rdata'),tmp,quiet=TRUE); local({load(tmp);get('skin')})}, error=function(e) NULL)
631+
#' data(skin)
644632
#' if(!is.null(skin)) head(netZooR:::qsmooth(skin,groups=pData(skin)$SMTSD))
645633
#' }
646634
#'
@@ -757,3 +745,33 @@ qstats <- function(exprs, groups, window) {
757745
SSB = SSB, SSE = SST - SSB, roughWeights = roughWeights,
758746
smoothWeights = smoothWeights)
759747
}
748+
749+
#' Bladder dataset
750+
#'
751+
#' Bladder RNA-seq data from the GTEx consortium. V6 release.
752+
#' @docType data
753+
#' @keywords datasets
754+
#' @name bladder
755+
#' @usage data(bladder)
756+
#' @format An object of class "ExpressionSet".
757+
#' @return An object of class "ExpressionSet".
758+
#' @references GTEx Consortium, 2015. The Genotype-Tissue Expression (GTEx)
759+
#' pilot analysis: Multitissue gene regulation in humans. Science, 348(6235),
760+
#' pp.648-660.
761+
#'
762+
NULL
763+
764+
#' Skin dataset
765+
#'
766+
#' Skin RNA-seq data from the GTEx consortium. V6 release.
767+
#' @docType data
768+
#' @keywords datasets
769+
#' @name skin
770+
#' @usage data(skin)
771+
#' @format An object of class "ExpressionSet".
772+
#' @return An object of class "ExpressionSet".
773+
#' @references GTEx Consortium, 2015. The Genotype-Tissue Expression (GTEx)
774+
#' pilot analysis: Multitissue gene regulation in humans. Science, 348(6235),
775+
#' pp.648-660.
776+
#'
777+
NULL

R/pandaToCondorObject.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' \strong{CONDOR} (COmplex Network Description Of Regulators) implements methods for clustering biapartite networks
44
#' and estimatiing the contribution of each node to its community's modularity,
5-
#' \doi{10.1371/journal.pcbi.1005033}{(Platig et al. 2016)}
5+
#' (Platig et al. (2016), \doi{10.1371/journal.pcbi.1005033})
66
#' This function uses the result of PANDA algorithm as the input dataset to run CONDOR algorithm. More about \href{https://github.com/jplatig/condor}{condor} package and usage.
77
#'
88
#' @param panda.net Data Frame indicating the result of PANDA regulatory network, created by \code{\link{pandaPy}}

data/bladder.rda

1.22 MB
Binary file not shown.

man/annotateFromBiomart.Rd

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bladder.Rd

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/checkMisAnnotation.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/checkTissuesToMerge.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/extractMatrix.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)