Search
Question: marrayInput problems following fresh 1.2 install
0
gravatar for Barry Henderson
14.5 years ago by
Barry Henderson250 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]]
ADD COMMENTlink modified 14.5 years ago by Rafael A. Irizarry2.3k • written 14.5 years ago by Barry Henderson250
0
gravatar for Rafael A. Irizarry
14.5 years ago by
Rafael A. Irizarry2.3k wrote:
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 COMMENTlink written 14.5 years ago by Rafael A. Irizarry2.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 152 users visited in the last hour