Skip to content

diffatac fails for hs1_chrR: object 'roiAnnodf' not found in DESeq2.Rmd #125

Closed

Description

@kopardev

Summary

DESeq2.Rmd fails for the hs1_chrR genome with:

Error in merge.data.frame(resdf, roiAnnodf, by = "Geneid") :
  object 'roiAnnodf' not found

This crashes the diffatac rule for every peakcaller/method/contrast combination when genome: hs1_chrR (also affects hs1).

Root cause

The pieplot chunk in workflow/scripts/DESeq2.Rmd only builds roiAnnodf when params$genome is "hg38" or "mm10":

if (params$genome == "hg38") { ... roiAnnodf <- as.data.frame(roiAnno) ... }
if (params$genome == "mm10") { ... roiAnnodf <- as.data.frame(roiAnno) ... }

There is no branch for hs1/hs1_chrR, so roiAnnodf is never created, and the later result chunk crashes at:

resdf_w_anno <- merge(resdf, roiAnnodf, by = "Geneid")

This is the same class of gap fixed in #123 for ccbr_annotate_bed.R/ccbr_annotate_peaks.R (T2T CHM13v2.0 TxDb support), but it was missed in DESeq2.Rmd when hs1_chrR support was added in #120.

Proposed fix

Add an hs1/hs1_chrR branch to the pieplot chunk in DESeq2.Rmd, reusing the T2T TxDb (/opt2/annotation/TxDb.Hsapiens.NCBI.T2T.CHM13v2.0.sqlite) and org.Hs.eg.db pattern already used in ccbr_annotate_bed.R/ccbr_annotate_peaks.R, including filling ENSEMBL/SYMBOL/GENENAME with NA when ChIPseeker can't map T2T gene IDs (since SYMBOL is referenced later in the volcano plot chunk).

Affected

  • workflow/scripts/DESeq2.Rmd
  • Snakemake diffatac rule (all peakcaller × method × contrast combinations for hs1_chrR/hs1 genomes)

⚡ Generated using AI ⚡

Activity

  1. self-assigned this
    on Aug 6, 2026
  2. added 2 commits that reference this issue on Aug 6, 2026
    24bdee8
    be9c5da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ASPENRepoNamegenerated-by-AIContent generated with AI assistance

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions