lgatto / pRoloc

A unifying bioinformatics framework for organelle proteomics
http://lgatto.github.io/pRoloc/
15 stars 13 forks source link

Log tagm classification #123

Closed lgatto closed 5 years ago

lgatto commented 5 years ago

To remain consistent with the other classifiers, it would be good to add logging in tagmPredict. Something like

tagmPredict <- function(object,
                        params,
                        fcol = "markers",
                        probJoint = FALSE,
                        probOutlier = TRUE) {
    if (inherits(params, "MAPParams")) {
        ans <- tagmMapPredict(object, params, fcol, probJoint, probOutlier)
        ans@processingData@processing <- c(processingData(ans)@processing,
                                           paste0("Performed TAGM-MAP prediction", date()))
    }
    else if (inherits(params, "MCMCParams")) {
        ans  <- tagmMcmcPredict(object, params, fcol, probJoint, probOutlier)
        ans@processingData@processing <- c(processingData(ans)@processing,
                                           paste0("Performed TAGM-MCMC prediction", date()))
    } else
        stop("Parameters must either be 'MAPParams' or 'MCMCParams'.")
    return(ans)
}

What do you think @ococrook?