Packages
Install a package’s vignettes, reference manual, R scripts, and filtered source from the Bioconductor catalog.
Bioconductor packages
3,842 indexed · four repositories
Materializing documentation and source…
Installed clusterProfiler 4.18.0
bioctx answers Bioconductor questions from the package documentation and source on your disk. Every claim cites a file, a line range, and a package version.
bioctx◉ openai/gpt-5.6-luna/medium
Welcome to bioc-context. 30 Bioconductor package resources loaded locally.
You
@DESeq2 How does apeglm log2FoldChange shrinkage differ from ashr shrinkage? What is the recommended log2FoldChange shrinkage method? Show source code chunks to compare.
Agent thinking...
◆ AI
Scope
This is for DESeq2 1.52.0 (Bioconductor 3.23). Both estimators are called through lfcShrink().
coef Supported apeglm re-estimates the coefficient under the negative-binomial count likelihood, whereas ashr treats the estimated LFC and its standard error as an approximately Normal measurement and shrinks it under an empirical mixture prior. [E4] [E7]
Recommended method
For the usual single-coefficient LFC shrinkage, use:
res <- lfcShrink(dds, coef=2, type="apeglm") apeglm has been the DESeq2 default since 1.28.0 and is the general
recommendation wherever its coef requirement fits. [E6]
DESeq2 source code showing the computation
DESeq2 builds the inputs to the external apeglm optimizer from the count data
and the fitted model:
Y <- counts(dds)
design <- model.matrix(design(dds), data=colData(dds))
disps <- dispersions(dds)
mle <- log(2) * cbind(res$log2FoldChange, res$lfcSE)
fit <- apeglm::apeglm(
Y=Y, x=design, param=disps, coef=coefNum,
mle=mle, weights=weights, offset=offset,
method=apeMethod, ...
)
res$log2FoldChange <- log2(exp(1)) * fit$map[,coefNum]
res$lfcSE <- log2(exp(1)) * fit$sd[,coefNum]
apeglm receives the negative-binomial quantities and returns fit$map and fit$sd; DESeq2 converts them from natural-log to log2 scale. [E1] [E2]
Install the package documentation, set the scope, and read the sources behind the answer.
Install a package’s vignettes, reference manual, R scripts, and filtered source from the Bioconductor catalog.
Bioconductor packages
3,842 indexed · four repositories
Materializing documentation and source…
Installed clusterProfiler 4.18.0
Name the packages a question can read. bioctx searches only what is already on disk.
Resources
A mention replaces the scope. No mention keeps the last one.
Read the files behind the answer. Each source names a line range in a pinned package version.
◆ AI
Take the coefficient name from resultsNames(dds), then pass it to lfcShrink(). apeglm shrinks a named coefficient, so no contrast is needed. [E1] [E2]
The BioContext skill runs the same session without a screen. Your agent opens one terminal, asks a package-scoped question, and reads the cited answer before it edits your R.
› Check this paired bulk RNA-seq limma-voom script. I am unsure duplicateCorrelation is used correctly. Use $biocontext to verify the workflow, then fix the script.
Verifying duplicateCorrelation workflow
The script runs voom once and passes block only to lmFit. limma documents a different order for a paired design, so I will check the
versioned source before I change anything.
$biocontext skill · pty session
@bioc:limma With voom and duplicateCorrelation, what order does limma document for a paired design?
run /copy to copy message to clipboard
BioContext evidence retrieved from the versioned limma vignette, reference manual,
and source. limma runs voom twice: once to get weights for
duplicateCorrelation, then again with the consensus correlation.
Applying the smallest correction:
v <- limma::voom(dge, design, plot = FALSE)
corfit <- limma::duplicateCorrelation(
v,
design = design,
block = sample_info$subject
)
v <- limma::voom(
dge,
design,
plot = FALSE,
block = sample_info$subject,
correlation = corfit$consensus.correlation
)
fit <- limma::lmFit(
v,
design,
block = sample_info$subject,
correlation = corfit$consensus.correlation
)
fit <- limma::eBayes(fit) The focused test checks that the paired block is retained, the consensus correlation is finite, and the fitted model keeps every coefficient in the design.
The skill keeps one session open for the whole task, waits for the copy marker instead of
reading the redrawn terminal, and closes it with a single Ctrl-C.