From a6e5ff358577b0c4b3e8f231332a3c29a9e0d4f7 Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Wed, 25 Nov 2026 22:44:43 -0500 Subject: [PATCH] Wrap isSNV() in a closure in filterVcf vignette FilterRules S4Vectors 0.53.0 (commit 904dc54) removed the standardGeneric -> FilterClosure coercion, so passing the isSNV generic directly to FilterRules() now fails at evaluation time with "call to standardGeneric("isSNV") apparently not from the body of that generic function". This broke vignette building on r-universe for every platform. Wrapping the generic in an ordinary closure works with both old and new S4Vectors. Co-Authored-By: Claude --- vignettes/filterVcf.Rmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vignettes/filterVcf.Rmd b/vignettes/filterVcf.Rmd index f39c852..326aefd 100644 --- a/vignettes/filterVcf.Rmd +++ b/vignettes/filterVcf.Rmd @@ -158,7 +158,9 @@ they may be passed as parameters to *filterVcf*. We use them here to combine the library(VariantAnnotation) prefilters <- FilterRules(list(germline=isGermlinePrefilter, dbsnp=notInDbsnpPrefilter)) -filters <- FilterRules(list(isSNV=isSNV, AD=allelicDepth)) +## wrap the isSNV() generic in a closure: FilterRules() does not accept +## S4 generics directly with recent S4Vectors +filters <- FilterRules(list(isSNV=function(x) isSNV(x), AD=allelicDepth)) ``` ## Create the Filtered file