marrayInput problems following fresh 1.2 install
1
0
Entering edit mode
@barry-henderson-49
Last seen 10.2 years ago
Hi I just installed R 1.71 and BioC to 1.2. Under this configuration BioC fails to to read in data/sample info. If I take the same code and try it with my previous installation (R 1.62 and BioC v1.1). I've looked at the traceback output but can't make any sense of it. Any suggestions? Has anything changed with marrayInfo, classes or the way R is handling paths under windows? I haven't been able to locate changes in the vignetes or help pages. Code and traceback output below from the new installation is below. Thanks Barry > exp <- "complete" > datadir <- paste("C:\\Array Data\\tox\\", exp, sep="") > setwd(datadir) > > > library(marrayInput) > exp.layout <- read.marrayLayout(fname=file.path(datadir, "genes.txt"), ngr= 4, ngc = 4, nsr = 12, nsc = 14, skip=0, ctl.col= 6) > ctl <- rep("Control", maNspots(exp.layout)) > ctl[maControls(exp.layout) != "Control"] <- "normal" > maControls(exp.layout) <- factor(ctl) > > #Load Sample data from samples.txt > > exp.samples <- read.marrayInfo(file.path(datadir, "samples.txt"), sep = "\t") Error in validObject(.Object) : Invalid "marrayInfo" object: Invalid object for slot "maInfo" in class "marrayInfo": got class "NULL", should be or extend class "data.frame" > traceback() 6: stop(paste("Invalid \"", Class, "\" object: ", errors, sep = "")) 5: validObject(.Object) 4: initialize(value, ...) 3: initialize(value, ...) 2: new("marrayInfo", maNotes = notes) 1: read.marrayInfo(file.path(datadir, "samples.txt"), sep = " ") > [[alternative HTML version deleted]]
• 1.1k views
ADD COMMENT
0
Entering edit mode
@rafael-a-irizarry-205
Last seen 10.2 years ago
this is a bug (that only affects windows users). the fix should appear soon. in the meantime you can use the code below. the difference is line 6 (descript <- ...) read.marrayInfo <- function (fname, info.id = NULL, labels = NULL, notes = fname, sep = " ", skip = 0, quote = "", ...) { h <- strsplit(readLines(fname, n = skip + 1), split = sep) h <- as.list(unlist(h[[length(h)]])) names(h) <- gsub("\"", "", unlist(h)) dat <- read.table(fname, sep = sep, skip = skip + 1, fill = TRUE, quote = quote, ...) colnames(dat) <- h descript <- new("marrayInfo", maInfo=data.frame(),maNotes = notes) if (is.nullinfo.id)) info.id <- 1:ncol(dat) maInfo(descript) <- as.data.frame(dat[, info.id]) if (length(labels) == nrow(dat)) maLabels(descript) <- as.vector(labels) else { if (is.null(labels)) labels <- 1 maLabels(descript) <- as.character(as.vector(dat[, labels])) } return(descript) } -r On Thu, 19 Jun 2003, Barry Henderson wrote: > Hi > > I just installed R 1.71 and BioC to 1.2. Under this configuration BioC > fails to to read in data/sample info. If I take the same code and try > it with my previous installation (R 1.62 and BioC v1.1). I've looked at > the traceback output but can't make any sense of it. Any suggestions? > Has anything changed with marrayInfo, classes or the way R is handling > paths under windows? I haven't been able to locate changes in the > vignetes or help pages. Code and traceback output below from the new > installation is below. > > Thanks > Barry > > > exp <- "complete" > > datadir <- paste("C:\\Array Data\\tox\\", exp, sep="") > > setwd(datadir) > > > > > > library(marrayInput) > > exp.layout <- read.marrayLayout(fname=file.path(datadir, "genes.txt"), > ngr= 4, ngc = 4, nsr = 12, nsc = 14, skip=0, ctl.col= 6) > > ctl <- rep("Control", maNspots(exp.layout)) > > ctl[maControls(exp.layout) != "Control"] <- "normal" > > maControls(exp.layout) <- factor(ctl) > > > > #Load Sample data from samples.txt > > > > exp.samples <- read.marrayInfo(file.path(datadir, "samples.txt"), sep > = "\t") > Error in validObject(.Object) : Invalid "marrayInfo" object: Invalid > object for slot "maInfo" in class "marrayInfo": got class "NULL", should > be or extend class "data.frame" > > traceback() > 6: stop(paste("Invalid \"", Class, "\" object: ", errors, sep = "")) > 5: validObject(.Object) > 4: initialize(value, ...) > 3: initialize(value, ...) > 2: new("marrayInfo", maNotes = notes) > 1: read.marrayInfo(file.path(datadir, "samples.txt"), sep = " ") > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT

Login before adding your answer.

Traffic: 870 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6