Bioconductor / Contributions

Contribute Packages to Bioconductor
131 stars 33 forks source link

treeclimbR #3320

Closed csoneson closed 3 months ago

csoneson commented 4 months ago

Update the following URL to point to the GitHub repository of the package you wish to submit to Bioconductor

Confirm the following by editing each check box to '[x]'

I am familiar with the essential aspects of Bioconductor software management, including:

For questions/help about the submission process, including questions about the output of the automatic reports generated by the SPB (Single Package Builder), please use the #package-submission channel of our Community Slack. Follow the link on the home page of the Bioconductor website to sign up.

bioc-issue-bot commented 4 months ago

Hi @csoneson

Thanks for submitting your package. We are taking a quick look at it and you will hear back from us soon.

The DESCRIPTION file for this package is:

Package: treeclimbR
Type: Package
Title: An algorithm to find optimal signal levels in a tree
Version: 0.99.0
Date: 2024-02-24
Authors@R: c(person("Ruizhu", "Huang", email = "ruizhuRH@gmail.com",
          role = c("aut"), 
          comment = c(ORCID = "0000-0003-3285-1945")),
   person("Charlotte", "Soneson", 
          email = "charlottesoneson@gmail.com",
          role = c("aut", "cre"), 
          comment = c(ORCID = "0000-0003-3833-2169")))
Description: The arrangement of hypotheses in a hierarchical structure appears 
    in many research fields and often indicates different resolutions at which 
    data can be viewed. This raises the question of which resolution level 
    the signal should best be interpreted on. treeclimbR provides a flexible 
    method to select optimal resolution levels (potentially different levels 
    in different parts of the tree), rather than cutting the tree at an 
    arbitrary level. treeclimbR uses a tuning parameter to generate candidate 
    resolutions and from these selects the optimal one.
License: Artistic-2.0
Encoding: UTF-8
biocViews: StatisticalMethod, CellBasedAssays
Imports:
    TreeSummarizedExperiment (>= 1.99.0),
    edgeR,
    methods,
    SummarizedExperiment,
    S4Vectors,
    dirmult,
    dplyr,
    tibble,
    tidyr,
    ape,
    diffcyt,
    ggnewscale,
    ggplot2 (>= 3.4.0),
    viridis,
    ggtree,
    stats,
    utils,
    rlang
Suggests:
    knitr,
    rmarkdown,
    scales,
    testthat (>= 3.0.0),
    BiocStyle
RoxygenNote: 7.3.1
VignetteBuilder: knitr
URL: https://github.com/csoneson/treeclimbR
BugReports: https://github.com/csoneson/treeclimbR/issues
Config/testthat/edition: 3
bioc-issue-bot commented 4 months ago

Your package has been added to git.bioconductor.org to continue the pre-review process. A build report will be posted shortly. Please fix any ERROR and WARNING in the build report before a reviewer is assigned or provide a justification on why you feel the ERROR or WARNING should be granted an exception.

IMPORTANT: Please read this documentation for setting up remotes to push to git.bioconductor.org. All changes should be pushed to git.bioconductor.org moving forward. It is required to push a version bump to git.bioconductor.org to trigger a new build report.

Bioconductor utilized your github ssh-keys for git.bioconductor.org access. To manage keys and future access you may want to active your Bioconductor Git Credentials Account

bioc-issue-bot commented 4 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): treeclimbR_0.99.0.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/treeclimbR to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot commented 3 months ago

A reviewer has been assigned to your package for an indepth review. Please respond accordingly to any further comments from the reviewer.

jianhong commented 3 months ago

Package 'treeclimbR' Review

Thank you for submitting your package to Bioconductor. The package passed check and build. It is in pretty good shape. Please try to answer the comments line by line when you are ready for a second review. Code: Note: please consider; Important: must be addressed.

The DESCRIPTION file

General package development

actual: "3" "3" "1" "1" "3" "8" "1" "3" expected: "3" "1" "1" "3" "3" "8" "1" "6"

[ FAIL 5 | WARN 0 | SKIP 0 | PASS 2080 ] Error: Test failures Execution halted


## R code
- [ ] NOTE: `::` is not suggested in source code unless you can make sure all the packages are imported. Some people think it is better to keep `::`. However please note that you need to manully double check the import items when you make any change in the DESCRIPTION file during development. My recommendation is to remove one or two repeats to force the dependency check.
- [ ] NOTE: Vectorize: `for` loops present, try to replace them by `*apply` funcitons.
    * In file R/aggDS.R:
        + at line 167 found '    for (i in seq_along(dat_list)) {'
    * In file R/evalCand.R:
        + at line 141 found '    for (i in seq_along(score_data)) {'
        + at line 151 found '            for (i in seq_along(score_data)) {'
        + at line 261 found '    for (i in seq_along(t)) {'
    * In file R/getCand.R:
        + at line 131 found '    for (i in seq_along(t)) {'
    * In file R/getLevel.R:
        + at line 174 found '    for (i in seq_along(descI)) {'
    * In file R/runDS.R:
        + at line 151 found '    for (i in seq_along(alias)) {'
    * In file R/simData.R:
        + at line 802 found '        for (i in seq_len(n1)) {'
        + at line 823 found '        for (i in seq_len(n2)) {'
    * In file R/treeScore.R:
        + at line 115 found '    for (i in seq_len(ncol(tempMat))) {'
- [ ] NOTE: Try to check the edge condition when using `seq.int` or `seq_len` or `head`. For example using `seq.int(min(5, nrow(data)))` to replace `seq.int(5)`
    * In file R/utils.R:
        + at line 86 found '        vvPrint <- paste(c(validValues[seq_len(15)],'
- [ ] NOTE: Functional programming: code repetition.
    * repetition in `.doFC`, `.infLoc`, and `.pickLoc`
        + in .doFC
            - line 3:{
            - line 4:    leaf <- setdiff(tree$edge[, 2], tree$edge[, 1])
            - line 5:    leaf <- sort(leaf)
            - line 6:    nodI <- setdiff(tree$edge[, 1], leaf)
            - line 7:    nodI <- sort(nodI)
            - line 8:    nodA <- c(leaf, nodI)
            - line 22:    nodI.A <- setdiff(nodA.A, tip.A)
            - line 23:    des.IA <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 24:        node = nodI.A, only.leaf = TRUE, self.include = TRUE, 
            - line 25:        use.alias = TRUE)
            - line 26:    des.IA <- lapply(des.IA, FUN = function(x) {
            - line 27:        TreeSummarizedExperiment::convertNode(tree = tree, node = x, 
            - line 28:            use.alias = TRUE, message = FALSE)
            - line 29:    })
            - line 30:    pars <- parEstimate(obj = data)$pi
            - line 31:    nam1 <- names(pars)
            - line 32:    val1 <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 33:        node = nam1, message = FALSE)
            - line 34:    nam2 <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 35:        node = val1, use.alias = TRUE, message = FALSE)
            - line 36:    names(pars) <- nam2
        + in .infLoc
            - line 2:{
            - line 3:    pars <- parEstimate(obj = data)$pi
            - line 4:    nam1 <- names(pars)
            - line 5:    val1 <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 6:        node = nam1, message = FALSE)
            - line 7:    nam2 <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 8:        node = val1, use.alias = TRUE, message = FALSE)
            - line 9:    names(pars) <- nam2
            - line 10:    leaf <- setdiff(tree$edge[, 2], tree$edge[, 1])
            - line 11:    leaf <- sort(leaf)
            - line 12:    nodI <- setdiff(tree$edge[, 1], leaf)
            - line 13:    nodI <- sort(nodI)
            - line 14:    nodA <- c(leaf, nodI)
            - line 15:    desI <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 16:        node = nodI, only.leaf = TRUE, self.include = TRUE, use.alias = TRUE)
            - line 17:    desI <- lapply(desI, FUN = function(x) {
            - line 18:        TreeSummarizedExperiment::convertNode(tree = tree, node = x, 
            - line 19:            use.alias = TRUE, message = FALSE)
            - line 20:    })
            - line 21:    names(desI) <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 22:        node = nodI, use.alias = TRUE, message = FALSE)
            - line 23:    nodP <- mapply(function(x, y) {
            - line 24:        sum(x[y])
            - line 25:    }, x = list(pars), y = desI)
            - line 26:    lenI <- unlist(lapply(desI, length))
            - line 27:    tt <- cbind(nodP, lenI)
            - line 28:    rownames(tt) <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 29:        node = nodI, use.alias = TRUE, message = FALSE)
            - line 36:        A_tips = tt[labA, 2], B_tips = tt[labB, 2], A_prop = round(tt[labA, 
            - line 37:            1], digits = 4), B_prop = round(tt[labB, 1], digits = 4))
            - line 38:    rownames(du) <- NULL
            - line 39:    return(du)
        + in .pickLoc
            - line 3:{
            - line 4:    pars <- parEstimate(obj = data)$pi
            - line 5:    nam1 <- names(pars)
            - line 6:    val1 <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 7:        node = nam1, message = FALSE)
            - line 8:    nam2 <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 9:        node = val1, use.alias = TRUE, message = FALSE)
            - line 10:    names(pars) <- nam2
            - line 11:    leaf <- setdiff(tree$edge[, 2], tree$edge[, 1])
            - line 12:    leaf <- sort(leaf)
            - line 13:    nodI <- setdiff(tree$edge[, 1], leaf)
            - line 14:    nodI <- sort(nodI)
            - line 15:    desI <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 16:        node = nodI, only.leaf = TRUE, self.include = TRUE, use.alias = TRUE)
            - line 17:    desI <- lapply(desI, FUN = function(x) {
            - line 18:        TreeSummarizedExperiment::convertNode(tree = tree, node = x, 
            - line 19:            use.alias = TRUE, message = FALSE)
            - line 20:    })
            - line 21:    names(desI) <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 22:        node = nodI, use.alias = TRUE, message = FALSE)
            - line 23:    nodP <- mapply(function(x, y) {
            - line 24:        sum(x[y])
            - line 25:    }, x = list(pars), y = desI)
            - line 26:    lenI <- unlist(lapply(desI, length))
            - line 27:    tt <- cbind(nodP, lenI)
            - line 28:    rownames(tt) <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 29:        node = nodI, use.alias = TRUE, message = FALSE)
            - line 91:        A_tips = tt[an, 2], B_tips = tt[bn, 2], A_prop = round(tt[an, 
            - line 92:            1], digits = 4), B_prop = round(tt[bn, 1], digits = 4))
            - line 93:    rownames(du) <- NULL
            - line 94:    return(du)
    * repetition in `.DS`, and`runDA`
        + in .DS
            - line 1:    assay, option = c("glm", "glmQL"), design = NULL, contrast = NULL, 
            - line 2:    filter_min_count = 10, filter_min_total_count = 15, filter_large_n = 10, 
            - line 3:    filter_min_prop = 0.7, normalize = TRUE, normalize_method = "TMM", 
            - line 4:    group_column = "group", design_terms = "group", ...) 
            - line 5:{
            - line 16:    if (is.null(design)) {
            - line 17:        formula <- as.formula(paste("~", paste(design_terms, 
            - line 18:            collapse = "+")))
            - line 19:        design <- model.matrix(formula, data = data.frame(sp_info))
            - line 20:    }
            - line 22:    keep <- edgeR::filterByExpr(count, design = design, min.count = filter_min_count, 
            - line 23:        min.total.count = filter_min_total_count, large.n = filter_large_n, 
            - line 24:        min.prop = filter_min_prop)
            - line 25:    count_keep <- count[keep, , drop = FALSE]
            - line 26:    isLow <- !keep
            - line 27:    feature_drop <- rownames(count)[isLow]
            - line 28:    lrt <- edgerWrp(count = count_keep, lib_size = NULL, option = option, 
            - line 29:        design = design, contrast = contrast, normalize = normalize, 
            - line 30:        normalize_method = normalize_method, ...)
            - line 31:    return(lrt)
        + in runDA
            - line 1:    assay = NULL, option = c("glm", "glmQL"), design = NULL, 
            - line 2:    contrast = NULL, filter_min_count = 10, filter_min_total_count = 15, 
            - line 3:    filter_large_n = 10, filter_min_prop = 0.7, normalize = TRUE, 
            - line 4:    normalize_method = "TMM", group_column = "group", design_terms = "group", 
            - line 5:    ...) 
            - line 46:    if (is.null(design)) {
            - line 47:        formula <- as.formula(paste("~", paste(design_terms, 
            - line 48:            collapse = "+")))
            - line 49:        design <- model.matrix(formula, data = data.frame(sp_info))
            - line 50:    }
            - line 53:    keep <- edgeR::filterByExpr(count, design = design, lib.size = lib_size, 
            - line 54:        min.count = filter_min_count, min.total.count = filter_min_total_count, 
            - line 55:        large.n = filter_large_n, min.prop = filter_min_prop)
            - line 56:    count_keep <- count[keep, , drop = FALSE]
            - line 57:    isLow <- !keep
            - line 58:    feature_drop <- rownames(count)[isLow]
            - line 59:    lrt <- edgerWrp(count = count_keep, lib_size = lib_size, 
            - line 60:        option = option, design = design, contrast = contrast, 
            - line 61:        normalize = normalize, normalize_method = normalize_method, 
            - line 62:        ...)
    * repetition in `.estimateA`, and `.estimateB`
        + in .estimateA
            - line 2:    if (is.list(obj)) {
            - line 3:        ind <- setequal(names(obj), c("pi", "theta"))
            - line 4:        if (!ind) {
            - line 5:            stop("obj is a list; it should contain pi and theta")
            - line 6:        }
            - line 7:        parList <- obj
            - line 8:    }
        + in .estimateB
            - line 3:    ind <- setequal(names(obj), c("pi", "theta"))
            - line 4:    if (!ind) {
            - line 5:        stop("obj is a list; it should contain pi and theta")
            - line 6:    }
            - line 7:    parList <- obj
    * repetition in `.estimateA`, and `.estimateC`
        + in .estimateA
            - line 13:        estP <- rep(0, nrow(obj))
            - line 14:        names(estP) <- rownames(obj)
            - line 15:        DirMultOutput <- dirmult::dirmult(data = t(obj))
            - line 16:        estP[names(DirMultOutput$pi)] <- DirMultOutput$pi
            - line 17:        theta <- DirMultOutput$theta
        + in .estimateC
            - line 13:        estP <- rep(0, ncol(tdat))
            - line 14:        names(estP) <- nodeLab
            - line 15:        DirMultOutput <- dirmult::dirmult(data = tdat)
            - line 16:        estP[names(DirMultOutput$pi)] <- DirMultOutput$pi
            - line 17:        theta <- DirMultOutput$theta
    * repetition in `.fdr0`, and `.tpr0`
        + in .fdr0
            - line 1:    found = NULL, only.leaf = TRUE) 
            - line 2:{
            - line 3:    if (!is.null(truth) && !(is.character(truth) || is.numeric(truth))) {
            - line 4:        stop("'truth' should be either a character vector or a numeric ", 
            - line 5:            "vector")
            - line 6:    }
            - line 7:    if (!is.null(found) && !(is.character(found) || is.numeric(found))) {
            - line 8:        stop("'found' should be either a character vector or a numeric ", 
            - line 9:            "vector")
            - line 10:    }
            - line 11:    if (is.null(found) || length(found) == 0) {
            - line 12:        c(fd = 0, disc = 1)
            - line 13:    }
            - line 14:    else {
            - line 15:        nodeF <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 16:            node = found, only.leaf = only.leaf, self.include = TRUE)
            - line 17:        nodeF <- unique(unlist(nodeF))
            - line 18:        if (is.null(truth)) {
            - line 20:        }
            - line 21:        else {
            - line 22:            nodeT <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 23:                node = truth, only.leaf = only.leaf, self.include = TRUE)
            - line 24:            nodeT <- unique(unlist(nodeT))
            - line 25:            fd <- setdiff(nodeF, nodeT)
            - line 26:            c(fd = length(fd), disc = length(nodeF))
        + in .tpr0
            - line 1:    found = NULL, only.leaf = TRUE) 
            - line 2:{
            - line 3:    if (!is.null(truth) && !(is.character(truth) || is.numeric(truth))) {
            - line 4:        stop("'truth' should be either a character vector or a numeric ", 
            - line 5:            "vector")
            - line 6:    }
            - line 7:    if (!is.null(found) && !(is.character(found) || is.numeric(found))) {
            - line 8:        stop("'found' should be either a character vector or a numeric ", 
            - line 9:            "vector")
            - line 10:    }
            - line 11:    if (is.null(truth) || length(truth) == 0) {
            - line 12:        c(tp = 1, pos = 1)
            - line 13:    }
            - line 14:    else {
            - line 15:        nodeT <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 16:            node = truth, only.leaf = only.leaf, self.include = TRUE)
            - line 17:        nodeT <- unique(unlist(nodeT))
            - line 18:        if (is.null(found)) {
            - line 20:        }
            - line 21:        else {
            - line 22:            nodeF <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 23:                node = found, only.leaf = only.leaf, self.include = TRUE)
            - line 24:            nodeF <- unique(unlist(nodeF))
            - line 25:            TP <- intersect(nodeT, nodeF)
            - line 26:            c(tp = length(TP), pos = length(nodeT))
    * repetition in `.pickLoc`, `fdr`, `findChild`, `findExcl`, `selNode`, `tpr`, and `isConnect`
        + in .pickLoc
            - line 41:    else {
            - line 42:        if (!is.character(from.A)) {
            - line 43:            from.A <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 44:                node = from.A, use.alias = TRUE, message = FALSE)
            - line 45:        }
        + in fdr
            - line 1:    found, only.leaf = TRUE) 
            - line 2:{
            - line 3:    .assertVector(x = tree, type = "phylo")
            - line 4:    .assertScalar(x = only.leaf, type = "logical")
            - line 5:    if (is.character(truth)) {
            - line 6:        truth <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 7:            node = truth, message = FALSE)
            - line 8:    }
            - line 9:    if (is.character(found)) {
            - line 10:        found <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 11:            node = found, message = FALSE)
            - line 12:    }
            - line 13:    tt <- .fdr0(tree = tree, truth = truth, found = found, only.leaf = only.leaf)
            - line 14:    fdr <- tt[1]/tt[2]
            - line 15:    names(fdr) <- "fdr"
            - line 16:    return(fdr)
        + in findChild
            - line 20:}, function (tree, node, use.alias = FALSE) 
            - line 21:{
            - line 22:    .assertVector(x = tree, type = "phylo")
            - line 23:    .assertScalar(x = use.alias, type = "logical")
            - line 24:    if (!(is.character(node) || is.numeric(node))) {
            - line 25:        stop("'node' should be either a character vector or a numeric ", 
            - line 26:            "vector")
            - line 27:    }
            - line 30:    if (is.character(node)) {
            - line 31:        numA <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 32:            node = node, use.alias = TRUE, message = FALSE)
            - line 33:    }
        + in findExcl
            - line 1:    node, use.alias = FALSE) 
            - line 2:{
            - line 3:    .assertVector(x = tree, type = "phylo")
            - line 4:    .assertScalar(x = use.alias, type = "logical")
            - line 5:    if (!(is.character(node) || is.numeric(node))) {
            - line 6:        stop("'node' should be either a character vector or a numeric ", 
            - line 7:            "vector")
            - line 8:    }
            - line 9:    if (is.character(node)) {
            - line 10:        node <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 11:            node = node, message = FALSE)
            - line 12:    }
            - line 13:    inT <- TreeSummarizedExperiment::findDescendant(tree = tree, 
        + in selNode
            - line 89:        if (is.character(skip)) {
            - line 90:            skip <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 91:                node = skip, message = FALSE)
            - line 92:        }
            - line 93:        tipS <- TreeSummarizedExperiment::findDescendant(tree = tree, 
        + in tpr
            - line 1:    found, only.leaf = TRUE) 
            - line 2:{
            - line 3:    .assertVector(x = tree, type = "phylo")
            - line 4:    .assertScalar(x = only.leaf, type = "logical")
            - line 5:    if (is.character(truth)) {
            - line 6:        truth <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 7:            node = truth, message = FALSE)
            - line 8:    }
            - line 9:    if (is.character(found)) {
            - line 10:        found <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 11:            node = found, message = FALSE)
            - line 12:    }
            - line 13:    tt <- .tpr0(tree = tree, truth = truth, found = found, only.leaf = only.leaf)
            - line 14:    tpr <- tt[1]/tt[2]
            - line 15:    names(tpr) <- "tpr"
            - line 16:    return(tpr)
        + in isConnect
            - line 3:    .assertVector(x = tree, type = "phylo")
            - line 4:    if (!(is.character(node_a) || is.numeric(node_a))) {
            - line 5:        stop("'node_a' should be either a character vector or a numeric ", 
            - line 6:            "vector")
            - line 7:    }
            - line 8:    if (!(is.character(node_b) || is.numeric(node_b))) {
            - line 9:        stop("'node_b' should be either a character vector or a numeric ", 
            - line 10:            "vector")
            - line 11:    }
            - line 14:    if (is.character(node_a)) {
            - line 15:        node_a <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 16:            node = node_a, use.alias = FALSE)
            - line 17:    }
            - line 18:    if (is.character(node_b)) {
            - line 19:        node_b <- TreeSummarizedExperiment::convertNode(tree = tree, 
            - line 20:            node = node_b, use.alias = FALSE)
            - line 21:    }
    * repetition in `aggDS`, `evalCand`, and `runDS`
        + in aggDS
            - line 34:    node <- TreeSummarizedExperiment::showNode(tree = tree, only.leaf = FALSE, 
            - line 35:        use.alias = TRUE)
            - line 36:    desd_list <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 37:        node = node, only.leaf = TRUE, self.include = TRUE)
            - line 69:        if (message) {
            - line 70:            message(i, " out of ", length(dat_list), " nodes finished", 
            - line 71:                "\r", appendLF = FALSE)
            - line 72:            utils::flush.console()
            - line 73:        }
        + in evalCand
            - line 51:            if (message) {
            - line 52:                message(x, " out of ", length(score_data), " features finished", 
            - line 53:                  "\r", appendLF = FALSE)
            - line 54:                utils::flush.console()
            - line 55:            }
            - line 65:            if (message) {
            - line 66:                message(x, " out of ", length(node_list), " features finished", 
            - line 67:                  "\r", appendLF = FALSE)
            - line 68:                utils::flush.console()
            - line 69:            }
            - line 86:        node_all <- TreeSummarizedExperiment::showNode(tree = tree, 
            - line 87:            only.leaf = FALSE)
            - line 88:        desc_all <- TreeSummarizedExperiment::findDescendant(tree = tree, 
            - line 89:            node = node_all, only.leaf = TRUE, self.include = TRUE)
        + in runDS
            - line 34:        if (message) {
            - line 35:            message(i, " out of ", length(alias), " nodes finished", 
            - line 36:                "\r", appendLF = FALSE)
            - line 37:            utils::flush.console()
            - line 38:        }
    * repetition in `aggDS`, and `runDA`
        + in aggDS
            - line 6:    if (is.character(assay)) {
            - line 7:        stopifnot(assay %in% SummarizedExperiment::assayNames(TSE))
            - line 8:    }
            - line 9:    else {
            - line 10:        stopifnot(is.numeric(assay) && assay %in% seq_len(length(SummarizedExperiment::assays(TSE))))
        + in runDA
            - line 20:    }
            - line 21:    else {
            - line 22:        if (is.character(assay)) {
            - line 23:            stopifnot(assay %in% SummarizedExperiment::assayNames(TSE))
            - line 24:        }
            - line 25:        else if (is.numeric(assay)) {
            - line 26:            stopifnot(assay <= length(SummarizedExperiment::assays(TSE)))
    * repetition in `calcMediansByTreeMarker`, `calcTreeCounts`, and `calcTreeMedians`
        + in calcMediansByTreeMarker
            - line 1:    function (d_se, tree) 
            - line 2:    {
            - line 3:        .assertVector(x = d_se, type = "SummarizedExperiment")
            - line 4:        if (!("cluster_id" %in% (colnames(SummarizedExperiment::rowData(d_se))))) {
            - line 5:            stop("Data object does not contain cluster labels.\n             Run 'diffcyt::generateClusters' to generate cluster labels.")
            - line 6:        }
            - line 7:        if (!methods::is(tree, "phylo")) {
            - line 8:            stop("tree is not a phylo object.\n             Run 'buildTree(d_se)' to generate the tree.")
            - line 9:        }
            - line 10:        rlab <- as.character(SummarizedExperiment::rowData(d_se)$cluster_id)
            - line 11:        d_lse <- TreeSummarizedExperiment::TreeSummarizedExperiment(assays = SummarizedExperiment::assays(d_se), 
            - line 12:            rowData = SummarizedExperiment::rowData(d_se), rowTree = tree, 
            - line 13:            rowNodeLab = rlab, colData = SummarizedExperiment::colData(d_se), 
            - line 14:            metadata = S4Vectors::metadata(d_se))
            - line 15:        d_lse <- d_lse[, SummarizedExperiment::colData(d_lse)$marker_class %in% 
            - line 16:            c("type", "state")]
            - line 17:        if (ncol(d_lse) == 0) {
            - line 18:            stop("No type or state markers found in the object.")
            - line 19:        }
            - line 22:        d_tse <- TreeSummarizedExperiment::aggTSE(x = d_lse, 
            - line 23:            rowLevel = nodes, rowFun = function(x) {
            - line 24:                stats::median(x, na.rm = TRUE)
            - line 25:            })
        + in calcTreeCounts
            - line 1:    tree) 
            - line 2:{
            - line 3:    .assertVector(x = d_se, type = "SummarizedExperiment")
            - line 4:    if (!("cluster_id" %in% (colnames(SummarizedExperiment::rowData(d_se))))) {
            - line 5:        stop("Data object does not contain cluster labels.\n             Run 'diffcyt::generateClusters' to generate cluster labels.")
            - line 6:    }
            - line 7:    if (!methods::is(tree, "phylo")) {
            - line 8:        stop("tree is not a phylo object.\n             Run 'buildTree(d_se)' to generate the tree.")
            - line 9:    }
            - line 11:    rlab <- as.character(SummarizedExperiment::rowData(d_counts)$cluster_id)
            - line 12:    counts_leaf <- TreeSummarizedExperiment::TreeSummarizedExperiment(assays = SummarizedExperiment::assays(d_counts), 
            - line 13:        rowData = SummarizedExperiment::rowData(d_counts), rowTree = tree, 
            - line 14:        rowNodeLab = rlab, colData = SummarizedExperiment::colData(d_counts), 
            - line 15:        metadata = S4Vectors::metadata(d_counts))
        + in calcTreeMedians
            - line 3:    .assertScalar(x = message, type = "logical")
            - line 4:    .assertVector(x = d_se, type = "SummarizedExperiment")
            - line 5:    if (!("cluster_id" %in% (colnames(SummarizedExperiment::rowData(d_se))))) {
            - line 6:        stop("Data object does not contain cluster labels.\n             Run 'diffcyt::generateClusters' to generate cluster labels.")
            - line 7:    }
            - line 8:    if (!methods::is(tree, "phylo")) {
            - line 9:        stop("tree is not a phylo object.\n             Run 'buildTree(d_se)' to generate the tree.")
            - line 10:    }
            - line 11:    rlab <- as.character(SummarizedExperiment::rowData(d_se)$cluster_id)
            - line 12:    d_lse <- TreeSummarizedExperiment::TreeSummarizedExperiment(assays = SummarizedExperiment::assays(d_se), 
            - line 13:        rowData = SummarizedExperiment::rowData(d_se), rowTree = tree, 
            - line 14:        rowNodeLab = rlab, colData = SummarizedExperiment::colData(d_se), 
            - line 15:        metadata = S4Vectors::metadata(d_se))
            - line 16:    d_lse <- d_lse[, SummarizedExperiment::colData(d_lse)$marker_class %in% 
            - line 17:        c("type", "state")]
            - line 18:    if (ncol(d_lse) == 0) {
            - line 19:        stop("No type or state markers found in the object.")
            - line 20:    }
            - line 33:        xx <- d_lse[sel, ]
            - line 34:        ax <- TreeSummarizedExperiment::aggTSE(x = xx, rowLevel = nodes, 
            - line 35:            rowFun = function(x) {
            - line 36:                stats::median(x, na.rm = TRUE)
    * repetition in `getCand`, `selNode`, and `simData`
        + in getCand
            - line 13:    .assertScalar(x = threshold, type = "numeric", rngIncl = c(0, 
            - line 14:        1))
            - line 15:    .assertScalar(x = pct_na, type = "numeric", rngIncl = c(0, 
            - line 16:        1))
            - line 17:    .assertScalar(x = message, type = "logical")
            - line 18:    if (is.null(t)) {
        + in selNode
            - line 3:{
            - line 4:    .assertScalar(x = minTip, type = "numeric", rngIncl = c(0, 
            - line 5:        Inf))
            - line 6:    .assertScalar(x = maxTip, type = "numeric", rngIncl = c(0, 
            - line 7:        Inf))
            - line 8:    .assertScalar(x = minPr, type = "numeric", rngIncl = c(0, 
            - line 9:        1))
            - line 10:    .assertScalar(x = maxPr, type = "numeric", rngIncl = c(0, 
            - line 11:        1))
            - line 12:    .assertScalar(x = all, type = "logical")
            - line 13:    if (!is.null(pr)) {
        + in simData
            - line 21:    .assertScalar(x = minPr.A, type = "numeric", rngIncl = c(0, 
            - line 22:        1))
            - line 23:    .assertScalar(x = maxPr.A, type = "numeric", rngIncl = c(0, 
            - line 24:        1))
            - line 25:    .assertScalar(x = ratio, type = "numeric")
    * repetition in `nodeResult`, and `topNodes`
        + in nodeResult
            - line 38:            ct <- dplyr::slice(dplyr::filter(dplyr::arrange(ct, 
            - line 39:                dplyr::desc(abs(.data$logFC))), .data$FDR <= 
            - line 40:                p_value), seq_len(n))
            - line 41:        }
            - line 44:                p_value), seq_len(n))
            - line 45:        }
            - line 46:    }
            - line 47:    return(ct)
        + in topNodes
            - line 36:            res <- dplyr::slice(dplyr::filter(dplyr::arrange(res, 
            - line 37:                dplyr::desc(abs(.data[[sort_by]]))), .data$adj.p <= 
            - line 38:                p_value), seq_len(n))
            - line 39:        }
            - line 43:                p_value), seq_len(n))
            - line 44:        }
            - line 45:    }
            - line 46:    return(res)
    * repetition in `runDA`, and `runDS`
        + in runDA
            - line 7:    .assertVector(x = TSE, type = "TreeSummarizedExperiment")
            - line 8:    .assertScalar(x = feature_on_row, type = "logical")
            - line 9:    .assertVector(x = design, type = "matrix", allowNULL = TRUE)
            - line 10:    .assertVector(x = contrast, type = "numeric", allowNULL = TRUE)
            - line 11:    .assertScalar(x = filter_min_count, type = "numeric")
            - line 12:    .assertScalar(x = filter_min_total_count, type = "numeric")
            - line 13:    .assertScalar(x = filter_large_n, type = "numeric")
            - line 14:    .assertScalar(x = filter_min_prop, type = "numeric")
            - line 15:    .assertScalar(x = normalize, type = "logical")
            - line 16:    .assertScalar(x = normalize_method, type = "character")
        + in runDS
            - line 7:    .assertVector(x = SE, type = "SummarizedExperiment")
            - line 8:    .assertVector(x = tree, type = "phylo")
            - line 9:    .assertVector(x = design, type = "matrix", allowNULL = TRUE)
            - line 10:    .assertVector(x = contrast, type = "numeric", allowNULL = TRUE)
            - line 11:    .assertScalar(x = filter_min_count, type = "numeric")
            - line 12:    .assertScalar(x = filter_min_total_count, type = "numeric")
            - line 13:    .assertScalar(x = filter_large_n, type = "numeric")
            - line 14:    .assertScalar(x = filter_min_prop, type = "numeric")
            - line 15:    .assertScalar(x = min_cells, type = "numeric")
            - line 16:    .assertScalar(x = normalize, type = "logical")
            - line 17:    .assertScalar(x = normalize_method, type = "character")
## Documentation
- [ ] Important: Vignette should have an *Installation* section.
    * rmd file vignettes/treeclimbR.Rmd
bioc-issue-bot commented 3 months ago

Received a valid push on git.bioconductor.org; starting a build for commit id: d2929b8de155d15bc8e581d79640c2817c569a09

bioc-issue-bot commented 3 months ago

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

Congratulations! The package built without errors or warnings on all platforms.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: Linux (Ubuntu 22.04.3 LTS): treeclimbR_0.99.1.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to git@git.bioconductor.org:packages/treeclimbR to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

csoneson commented 3 months ago

@jianhong Thanks a lot for your review! Please find my responses below - all the code changes can also be viewed in this PR.

bioc-issue-bot commented 3 months ago

Your package has been accepted. It will be added to the Bioconductor nightly builds.

Thank you for contributing to Bioconductor!

Reviewers for Bioconductor packages are volunteers from the Bioconductor community. If you are interested in becoming a Bioconductor package reviewer, please see Reviewers Expectations.

jwokaty commented 3 months ago

The default branch of your GitHub repository has been added to Bioconductor's git repository as branch devel.

To use the git.bioconductor.org repository, we need an 'ssh' key to associate with your github user name. If your GitHub account already has ssh public keys (https://github.com/csoneson.keys is not empty), then no further steps are required. Otherwise, do the following:

  1. Add an SSH key to your github account
  2. Submit your SSH key to Bioconductor

See further instructions at

https://bioconductor.org/developers/how-to/git/

for working with this repository. See especially

https://bioconductor.org/developers/how-to/git/new-package-workflow/ https://bioconductor.org/developers/how-to/git/sync-existing-repositories/

to keep your GitHub and Bioconductor repositories in sync.

Your package will be included in the next nigthly 'devel' build (check-out from git at about 6 pm Eastern; build completion around 2pm Eastern the next day) at

https://bioconductor.org/checkResults/

(Builds sometimes fail, so ensure that the date stamps on the main landing page are consistent with the addition of your package). Once the package builds successfully, you package will be available for download in the 'Devel' version of Bioconductor using BiocManager::install("treeclimbR"). The package 'landing page' will be created at

https://bioconductor.org/packages/treeclimbR

If you have any questions, please contact the bioc-devel mailing list (https://stat.ethz.ch/mailman/listinfo/bioc-devel); this issue will not be monitored further.