# Bioconductor Cotan

Statistical and computational method to analyze the co-expression of gene pairs at...

- Repository: https://github.com/bioMate-AI/biomate-bioconductor-kb (793 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-06-20
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-cotan -g -a claude-code -y`
Codex: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-cotan -g -a codex -y`
Cursor: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-cotan -g -a cursor -y`
Gemini CLI: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-cotan -g -a gemini-cli -y`

## Description

Statistical and computational method to analyze the co-expression of gene pairs at single cell level. It provides the foundation for single-cell gene interactome analysis. The basic idea is studying the zero UMI counts' distribution instead of focusing on positive counts; this is done with a generalized contingency tables framework. COTAN can effectively assess the correlated or anti-correlated expression of gene pairs. It provides a numerical index related to the correlation and an approximate

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# COTAN

## Workflows

### Standard Workflow

Clean raw single-cell UMI count datasets by identifying and removing doublets, dead cells, and low-efficiency cells.

```r
library(COTAN)
library(zeallot)

# Resolve operator precedence conflicts
conflicted::conflict_prefer("%<-%", "zeallot")

# 1. Create COTAN object and initialize metadata
rawDataset <- data.frame(Gene1 = c(1, 0, 5), Gene2 = c(0, 2, 0)) # Mock raw counts
obj <- COTAN(raw = rawDataset)
obj <- initializeMetaDataset(
  obj, 
  GEO = "GSM2861514", 
  sequencingMethod = "Drop_seq", 
  sampleCondition = "mouse_cortex_E17.5"
)

# 2. Add condition metadata
data(vignette.cells.origin)
obj <- addCondition(obj, condName = "origin", conditions = vignette.cells.origin)

# 3. Drop problematic cells and run cleaning
obj <- dropGenesCells(obj, cells = c())
obj <- clean(obj)

# 4. Generate diagnostic plots
c(pcaCellsPlot, pcaCellsData, genesPlot, UDEPlot, nuPlot, zoomedNuPlot) %<-% cleanPlots(obj)
```
*Note on inputs/outputs:* Input is a raw UMI count matrix; output is a cleaned and filtered `COTAN` object with estimated cell efficiency (`nu`) parameters.

### Cell Clustering And Dea

Cluster cells based on expression uniformity and perform differential expression analysis (DEA) on the resulting clusters.

```r
library(COTAN)

# 1. Load pre-calculated clusterizations
data("vignette.split.clusters", package = "COTAN")
vignette.split.clusters <- asClusterization(
  vignette.split.clusters, 
  allCells = getCells(obj)
)

# 2. Execute Differential Expression Analysis on clusters
vignette.split.coexDF <- DEAOnClusters(obj, clusters = vignette.split.clusters)

The rest: https://github.com/bioMate-AI/biomate-bioconductor-kb/blob/HEAD/skills/transcriptomics/cotan/SKILL.md
