Skip to content

Commit

Permalink
elementLengths was renamed -> elementNROWS in S4Vectors (new name ref…
Browse files Browse the repository at this point in the history
…lects TRUE

semantic, old name will be deprecated soon)


git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/RnBeads@113044 bc3139a8-67e5-0310-9ffc-ced21a209358
  • Loading branch information
[email protected] committed Jan 29, 2016
1 parent 7575e4f commit 414156f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Authors@R: c(
person("Fabian", "Mueller", email = "[email protected]",
role = c("aut", "cre")))
Date: 2016-01-13
Version: 1.3.5
Version: 1.3.6
Suggests:
Category,
GEOquery,
Expand Down Expand Up @@ -43,6 +43,7 @@ Suggests:
Depends:
R (>= 3.0.0),
BiocGenerics,
S4Vectors (>= 0.9.25),
GenomicRanges,
MASS,
RColorBrewer,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ import(GenomicRanges)
import(IRanges)
import(MASS)
import(RColorBrewer)
import(S4Vectors)
import(cluster)
import(ff)
import(fields)
Expand Down
2 changes: 1 addition & 1 deletion R/RnBeads-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' The complete analysis can be performed by calling the function \code{\link{rnb.run.analysis}}.
#'
#' @references Yassen Assenov*, Fabian Mueller*, Pavlo Lutsik*, Joern Walter, Thomas Lengauer and Christoph Bock (2014) Compehensive Analysis of DNA Methylation Data with RnBeads, Nature Methods, 11(11):1138-1140.
#' @import methods MASS cluster RColorBrewer fields ggplot2 IRanges GenomicRanges methylumi ff gridExtra limma
#' @import methods MASS cluster RColorBrewer fields ggplot2 S4Vectors IRanges GenomicRanges methylumi ff gridExtra limma
#' @importFrom BiocGenerics annotation
#' @importFrom BiocGenerics annotation<-
#' @importFrom illuminaio readIDAT
Expand Down
6 changes: 3 additions & 3 deletions R/annotations.R
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ load.annotations <- function(assembly = NULL, sites = NULL) {
for (a.name in updated) {
.rnb.annotations[[assembly]][["lengths"]][, a.name] <- 0L
if (a.name %in% names(genome.info$regions)) {
a.lengths <- elementLengths(genome.info$regions[[a.name]])
a.lengths <- elementNROWS(genome.info$regions[[a.name]])
} else { # a.name %in% names(genome.info$sites)
a.lengths <- elementLengths(genome.info$sites[[a.name]])
a.lengths <- elementNROWS(genome.info$sites[[a.name]])
}
.rnb.annotations[[assembly]][["lengths"]][names(a.lengths), a.name] <- a.lengths
}
Expand Down Expand Up @@ -535,7 +535,7 @@ rnb.update.annotation.infos <- function(type, assembly) {
CHROMOSOMES <- names(.rnb.annotations[[assembly]][['CHROMOSOMES']])
a.lengths.full <- rep.int(0L, length(CHROMOSOMES))
names(a.lengths.full) <- CHROMOSOMES
a.lengths <- elementLengths(.rnb.annotations[[assembly]][["regions"]][[type]])
a.lengths <- elementNROWS(.rnb.annotations[[assembly]][["regions"]][[type]])
a.lengths.full[names(a.lengths)] <- a.lengths
i.type <- which(colnames(.rnb.annotations[[assembly]][["lengths"]]) == type)
if (length(i.type) == 0) {
Expand Down
6 changes: 3 additions & 3 deletions R/normalization.R
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ rnb.execute.normalization<-function(

if(inherits(object,"MethyLumiSet")){

if(nrow(methylated(object))<sum(elementLengths(rnb.get.annotation("probes450"))) ||
if(nrow(methylated(object))<sum(elementNROWS(rnb.get.annotation("probes450"))) ||
sum(is.na(methylated(object)))>0 || sum(is.na(unmethylated(object)))>0){
rnb.warning("Funtional normalization is only supported for unfiltered data sets where intensity values are present for all probes. Skipping normalization")
object<-as(object, "RnBeadRawSet")
Expand All @@ -508,7 +508,7 @@ rnb.execute.normalization<-function(

}else if(inherits(object,"RnBeadRawSet")){

if(nrow(sites(object))<sum(elementLengths(rnb.get.annotation("probes450"))) ||
if(nrow(sites(object))<sum(elementNROWS(rnb.get.annotation("probes450"))) ||
sum(is.na(M(object)))>0 || sum(is.na(U(object)))>0){
rnb.warning("Funtional normalization is only supported for unfiltered data sets where intensity values are present for all probes. Skipping normalization")
object@status$normalized<-"none"
Expand Down Expand Up @@ -823,7 +823,7 @@ rnb.section.normalization <- function(report, rnb.set, betas.raw = NULL) {
txt <- c(txt, "The measurements in this dataset were not normalized after ",
ifelse(txt == "", "loading", "background subtraction"), ".")
if(rnb.getOption("normalization.method")=="minfi.funnorm"){
if(nrow(sites(rnb.set))<sum(elementLengths(rnb.get.annotation("probes450")))){
if(nrow(sites(rnb.set))<sum(elementNROWS(rnb.get.annotation("probes450")))){
txt<-c(txt, "The desired normalization method \"minfi.funnorm\" was not applied since the data set did not
contain information for all probes. This is most likely because of the preceding quality filtering steps.",
"In order to apply minfi.funnorm in the full RnBeads analysis you should disable SNP filtering and Greedycut.",
Expand Down

0 comments on commit 414156f

Please sign in to comment.