<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Dear Dr. Gaujoux</div>
<div><br>
</div>
<div><br>
</div>
<div> I am a graduate student majoring in bioinformatics. My current project is about data mining of microarray datasets to explore dysregulated pathways in cancers.</div>
<div><br>
</div>
<div><br>
</div>
<div>I read your paper about applying NMF to data analysis. I found it very interesting and I tried your NMF package. However, when analyzing a dataset, ~50,000 probesets x 50 samples, I got an error:¡¨caught segfault error¡¨ on R3.2.2 X86_64linux.</div>
<div><br>
</div>
<div>My server spec. is CentOS release 6.4, memory: 264G.</div>
<div><br>
</div>
<div><br>
</div>
<div>Here are the command lines I have used:</div>
<div><br>
</div>
<div>¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K</div>
<div>>library(NMF)</div>
<div>>raw.data<-read.csv("HCC_RMA_normalized_expression_matrix.csv") </div>
<div>>patient.data<-read.csv(¡§HCC_survival_data.csv") </div>
<div>>group_NT<-patient.data[,5] </div>
<div>>exp.data<-raw.data[,-(1:3)] </div>
<div>>exp.data<-exp.data[,order(group_NT)] </div>
<div>>tumor_exp_data<-exp.data[,38:87] </div>
<div>>row.names(tumor_exp_data)<-raw.data[,2] </div>
<div>>tumor_exp_data<-as.matrix(tumor_exp_data)</div>
<div>>estim.r<-nmf(tumor_exp_data,2:6,method=¡§brunet¡¨,nrun=4)</div>
<div>¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K</div>
<div><br>
</div>
<div> ¡§tumor_exp_data" here is a ~50,000 x 50 numeric matrix object. The error message is as attached at the end of this e-mail.</div>
<div><br>
</div>
<div>However, if I set nrun=1, there would be no error message and NMF calculation could be finished.</div>
<div><br>
</div>
<div><br>
</div>
<div>¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K</div>
<div><br>
</div>
<div><br>
</div>
<div> *** caught segfault ***</div>
<div>address 0x7f6606886048, cause 'memory not mapped'</div>
<div><br>
</div>
<div>Traceback:</div>
<div> 1: cor(t(x))</div>
<div> 2: .local(object, ...)</div>
<div> 3: predict(x, what = what, dmatrix = TRUE)</div>
<div> 4: predict(x, what = what, dmatrix = TRUE)</div>
<div> 5: silhouette.NMF(object, what = "features")</div>
<div> 6: silhouette(object, what = "features")</div>
<div> 7: .local(object, ...)</div>
<div> 8: summary(fit(object), ...)</div>
<div> 9: summary(fit(object), ...)</div>
<div>10: summary(best.fit, ...)</div>
<div>11: summary(best.fit, ...)</div>
<div>12: summary(res, target = V)</div>
<div>13: summary(res, target = V)</div>
<div>14: doTryCatch(return(expr), name, parentenv, handler)</div>
<div>15: tryCatchOne(expr, names, parentenv, handlers[[1L]])</div>
<div>16: tryCatchList(expr, classes, parentenv, handlers)</div>
<div>17: tryCatch({ res <- nmf(x, r, method, nrun = nrun, model = model, ...) if (!isNMFfit(res, recursive = FALSE)) return(res) c.matrices[[as.character(r)]] <<- consensus(res) fit[[as.character(r)]] <<- res if (verbose) cat("+
measures ... ") measures <- summary(res, target = V) if (verbose) cat("OK\n") measures}, error = function(e) { mess <- if (is.null(e$call)) e$message else paste(e$message, " [in call to '", e$call[1], "']", sep = "")
mess <- paste("[r=", r, "] -> ", mess, sep = "") if (stop) { if (verbose) cat("\n") stop(mess, call. = FALSE) } if (verbose) message("ERROR") return(mess)})</div>
<div>18: FUN(X[[i]], ...)</div>
<div>19: lapply(X = X, FUN = FUN, ...)</div>
<div>20: sapply(range, function(r, ...) { k.rank <<- k.rank + 1L if (verbose) cat("Compute NMF rank=", r, " ... ") orng <- RNGseed() if (k.rank < length(range)) on.exit(RNGseed(orng), add = TRUE) res <- tryCatch({ res <-
nmf(x, r, method, nrun = nrun, model = model, ...) if (!isNMFfit(res, recursive = FALSE)) return(res) c.matrices[[as.character(r)]] <<- consensus(res) fit[[as.character(r)]] <<- res if (verbose)
cat("+ measures ... ") measures <- summary(res, target = V) if (verbose) cat("OK\n") measures }, error = function(e) { mess <- if (is.null(e$call)) e$message else paste(e$message, " [in call to
'", e$call[1], "']", sep = "") mess <- paste("[r=", r, "] -> ", mess, sep = "") if (stop) { if (verbose) cat("\n") stop(mess, call. = FALSE) } if (verbose) message("ERROR")
return(mess) }) res}, ..., simplify = FALSE)</div>
<div>21: nmfEstimateRank(x, range = rank, method = method, nrun = nrun, seed = seed, rng = rng, model = model, .pbackend = .pbackend, .callback = .callback, verbose = verbose, .options = .options, ...)</div>
<div>22: .local(x, rank, method, ...)</div>
<div>23: nmf(x, rank, method = strategy, ...)</div>
<div>24: nmf(x, rank, method = strategy, ...)</div>
<div>25: nmf(tumor_exp_data, 2:6, method = "brunet", nrun = 4)</div>
<div>26: nmf(tumor_exp_data, 2:6, method = "brunet", nrun = 4)</div>
<div><br>
</div>
<div>¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K¡K</div>
<div><br>
</div>
<div>I also used ¡¥top¡¦ to inspect the memory usage, the R NMF process was running until it took up to 16G RAM and then the R session was terminated.</div>
<div>At that moment, my server still had much free memory when this error occurred. </div>
<div><br>
</div>
<div>However,if I set nrun=1,there would be no error message and NMF calculation could be finished.</div>
<div>I was wondering if there is anything I can do to get around this problem. I notice that there could be additional supporting packages such as ¡§bigmemory¡¨. So, might it be helpful if I install those packages? Thank you very much.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Yi-hausan Hsieh</div>
<br>
<p></p>
</div>
</body>
</html>