COTAN comparision version

A. “Old / first Bioconductor release era” exports were small and monolithic

Using the Bioconductor 3.15 reference manual (COTAN v1-era), the exported surface is compact and centered on a single legacy class scCOTAN plus a small set of procedural functions for:

  • Object creation / initialization: automatic.COTAN.object.creation, initRaw

  • Cleaning / filtering: clean, drop.genes.cells

  • Core stats: cotan_analysis, get.GDI, get.pval, plus contingency-table getters like get.expected.ct, get.observed.ct

  • Coexpression extraction: extract.coex, get.coex

  • Plots: plot_GDI, plot_heatmap, plot_general.heatmap

  • Helpers: mat2vec_rfast, vec2mat_rfast

This is the “classic COTAN” feel: few entry points, user does a linear workflow, and most operations are directly on the legacy object.

B. “Current v2” exports are modular and much broader (QC + clustering + metadata + uniformity)

In the current reference manual (v2-era), the exports are clearly organized into distinct user-facing modules. You can see whole families of functions dedicated to:

  1. Object model + conversions (interoperability)

COTAN / COTAN-class and conversions to/from SingleCellExperiment (convertFromSingleCellExperiment, convertToSingleCellExperiment)

  1. Clusterization management (a first-class concept now)

Add/drop/reorder clusterizations: addClusterization, dropClusterization, reorderClusterization

Cluster-level analytics: DEAOnClusters, findClustersMarkers, clusterGeneContingencyTables, clustersSummaryData, clustersTreePlot

  1. Dataset metadata + conditions are explicit

addCondition, dropCondition, getAllConditions, plus metadata utilities like datasetTags, initializeMetaDataset, addElementToMetaDataset

  1. Raw-data QC / cleaning became a full toolbox (not just “clean()”)

Functions and plots like cellSizePlot, mitochondrialPercentagePlot, screePlot, scatterPlot, and a suite of “fully expressed genes/cells” utilities (findFullyExpressedGenes, flagNotFullyExpressedGenes, etc.)

  1. “Uniform clusters” / transcript uniformity checks (signature v2 feature)

cellsUniformClustering, checkClusterUniformity, mergeUniformCellsClusters, plus checker classes like AdvancedGDIUniformityCheck-class, SimpleGDIUniformityCheck-class, and threshold shifting helpers

  1. Performance / modern compute hooks

Multi-threading controls (handleMultiCore, canUseTorch) and explicit references to torch installation/usage pathways

  1. Backward compatibility is explicitly preserved (important for reviewers)

You can still see scCOTAN-class and legacy helpers grouped under a “legacy” area in the docs/index, which signals a conscious compatibility strategy rather than a breaking rewrite.

get_exports_from_ref <- function(ref, lib) {
  dir.create(lib, recursive = TRUE, showWarnings = FALSE)
  old_libpaths <- .libPaths()
  on.exit(.libPaths(old_libpaths), add = TRUE)
  .libPaths(c(lib, old_libpaths))

  if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")

  # Install from GitHub ref (commit hash or branch name)
  remotes::install_github(
    repo = "seriph78/COTAN",
    ref  = ref,
    upgrade = "never",
    dependencies = TRUE,
    quiet = TRUE
  )

  # Load and extract exports
  suppressPackageStartupMessages(library(COTAN))
  sort(getNamespaceExports("COTAN"))
}

lib_head <- file.path(tempdir(), "cotan_head")
lib_old  <- file.path(tempdir(), "cotan_7ea9d48")

exports_head <- get_exports_from_ref("devel", lib_head)
exports_old  <- get_exports_from_ref("7ea9d488addf651e5641052771ced4125009c151", lib_old)

added   <- setdiff(exports_head, exports_old)
removed <- setdiff(exports_old,  exports_head)
common  <- intersect(exports_head, exports_old)

list(
  n_old = length(exports_old),
  n_head = length(exports_head),
  n_added = length(added),
  n_removed = length(removed)
)
$n_old
[1] 210

$n_head
[1] 210

$n_added
[1] 0

$n_removed
[1] 0