/usr/lib/R/site-library/VariantAnnotation/unitTests/test_summarizeVariants-methods.R is in r-bioc-variantannotation 1.20.2-1+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | grl <- GRangesList(
A=GRanges("20", IRanges(14370, 17331)),
B=GRanges("20", IRanges(17330, width=1)),
C=GRanges("20", IRanges(1110696, width=1)),
D=GRanges("20", IRanges(1110696, width=2)))
test_summarizeVariants <- function()
{
fl <- system.file("extdata", "ex2.vcf", package="VariantAnnotation")
vcf <- readVcf(fl, "hg19")
sv <- summarizeVariants(grl, vcf, findOverlaps)
checkIdentical(ncol(vcf), ncol(sv))
checkIdentical(length(grl), nrow(sv))
target <- matrix(c(0, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1), ncol=3)
current <- unname(assays(sv)$counts)
checkIdentical(current, target)
}
|