martin.o'gorman@nonlinear.com
2005-Nov-16 13:37 UTC
[Rd] PPC package-ppc.read.raw.nobatch (PR#8316)
Full_Name: Martin O'Gorman Version: OS: Submission from: (NULL) (84.176.63.149) I have been looking at the PPC package and have a question. As the input data is comma separated, shouldn?t the command to read in the raw (no batch) mass spec data indicate that sep=?,? (marked below) ? Otherwise, the data read in is the pair of values (m/z,intensity). It is not obvious why that should be. While playing around with the data, I noticed that xtr (the intensity matrix) is a full matrix of value NA as a result of omitting the ?,?. I apologize in advance if I have missed something obvious. However, the batch read function does use the sep=?,?. This possible bug doesn't doesn't crash the script and so is difficult to spot. Many thanks Martin ppc.read.raw.nobatch <- function(directory, mz = NULL) { datafiles.list <- ppc.xl.get.names.of.files(directory) ## ## First determine the dimensions of the data matrix ## if (is.null(mz)) { pat1 <- read.table(datafiles.list[1]) ?----- here mz <- pat1[,1] } xtr <- matrix(NA, nrow=length(mz), ncol=length(datafiles.list)) ## ## Now read in all the data ## for (j in 1:length(datafiles.list)) { if (ppc.options$debug) print(paste("Reading file", datafiles.list[j])) temp <- read.table(datafiles.list[j], sep = ",") xtr[, j] <- approx(temp[, 1], temp[, 2], xout = mz)$y } return(list(xtr = xtr, mz = mz, filenames=datafiles.list)) }
ligges@statistik.uni-dortmund.de
2005-Nov-16 16:29 UTC
[Rd] PPC package-ppc.read.raw.nobatch (PR#8316)
martin.o'gorman at nonlinear.com wrote:> Full_Name: Martin O'Gorman > Version: > OS: > Submission from: (NULL) (84.176.63.149) > > > I have been looking at the PPC package and have a question. As the input data is > comma separated, shouldn?t the command to read in the raw (no batch) mass spec > data indicate that sep=?,? (marked below) ? Otherwise, the data read in is the > pair of values (m/z,intensity). It is not obvious why that should be. While > playing around with the data, I noticed that xtr (the intensity matrix) is a > full matrix of value NA as a result of omitting the ?,?. I apologize in advance > if I have missed something obvious. However, the batch read function does use > the sep=?,?. This possible bug doesn't doesn't crash the script and so is > difficult to spot. > > > > Many thanks > > MartinPlease report bugs in contributed R packages to the package maintainer rather than to R-bugs. The R Core members cannot do anything in such a case but have to clean up teh bug repository after you... Please note that the package you are talking about is probably named "ppc" rather than "PPC". Uwe Ligges