calculating cell knn ... done
calculating convolved matrices ... done
fitting gamma coefficients ...
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
*** caught bus error ***
address 0x7f0c17a7db00, cause 'non-existent physical address'
Traceback:
1: lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
2: lm(n ~ e, data = df, weights = pw)
3: FUN(X[[i]], ...)
4: lapply(X = S, FUN = FUN, ...)
5: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: tryCatchList(expr, classes, parentenv, handlers)
8: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
11: FUN(X[[i]], ...)
12: lapply(seq_len(cores), inner.do)
13: parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } }}, mc.cores = n.cores, mc.preschedule = T)
14: do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T))
15: data.frame(do.call(rbind, parallel::mclapply(sn(rownames(conv.emat.norm)), function(gn) { if (!is.null(smat)) { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells]), o = sfit[gn, "o"]) if (zero.offset) df$o <- 0 } else { df <- data.frame(n = (conv.nmat.norm[gn, steady.state.cells]), e = (conv.emat.norm[gn, steady.state.cells])) o <- 0 if (!zero.offset) { zi <- df$e < 1/conv.emat.cs[steady.state.cells] if (any(zi)) { o <- sum(df$n[zi])/(sum(zi) + 1) } } df$o <- o } if (is.null(fit.quantile)) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = df$e^4 + df$n^4) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { if (diagonal.quantiles) { emax <- quantile(df$e, p = 0.99) nmax <- quantile(df$n, p = 0.99) if (emax == 0) emax <- max(max(df$e), 0.001) if (nmax == 0) nmax <- max(max(df$n), 0.001) x <- df$e/emax + df$n/nmax eq <- quantile(x, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat)) { pw <- as.numeric(x >= eq[2]) } else { pw <- as.numeric(x >= eq[2] | x <= eq[1]) } } else { eq <- quantile(df$e, p = c(fit.quantile, 1 - fit.quantile)) if (!is.null(smat) || zero.offset) { pw <- as.numeric(df$e >= eq[2]) } else { pw <- as.numeric(df$e >= eq[2] | df$e <= eq[1]) } } if (!is.null(smat) || zero.offset) { d <- lm(n ~ e + offset(o) + 0, data = df, weights = pw) return(c(o = df$o[1], g = as.numeric(coef(d)[1]), r = cor(df$e, df$n, method = "spearman"))) } else { d <- lm(n ~ e, data = df, weights = pw) return(c(o = as.numeric(coef(d)[1]), g = as.numeric(coef(d)[2]), r = cor(df$e, df$n, method = "spearman"))) } } }, mc.cores = n.cores, mc.preschedule = T)))
16: gene.relative.velocity.estimates(emat, nmat, deltaT = 1, kCells = 5, fit.quantile = fit.quantile)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: