This file is indexed.

/usr/lib/R/site-library/Rsamtools/unitTests/test_compression.R is in r-bioc-rsamtools 1.30.0-1.

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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
test_bgzip_openclose <- function()
{
    ## trying to determine that file handle has been cleaned up
    checkIdentical(TRUE, dir.create(d <- tempfile()))
    fin <- file.path(d, "in")
    fout <- file.path(d, "out")
    writeLines("123", con=fin)
    bgzip(fin, fout)
    checkIdentical(TRUE, file.remove(fin))
    checkIdentical(TRUE, file.remove(fout))
    checkIdentical(0L, unlink(d, recursive=TRUE))
}

test_razip_small_files <- function()
{
    src <- system.file("extdata", "ce2dict1.fa", package="Rsamtools")
    file.copy(src, dest <- tempfile())
    checkIdentical(readLines(src), readLines(dest))
}

test_razip_gzcompressed <- function()
{
    file.copy(system.file("extdata", "ce2dict1.fa", package="Rsamtools"),
              src <- tempfile())
    con <- gzfile(gzdest <- tempfile(), "wb")
    writeLines(readLines(src), con, sep="\n")
    close(con)
    rzdest <- razip(gzdest)
    checkIdentical(src, indexFa(src))
    checkIdentical(gzdest, indexFa(gzdest))
    checkIdentical(rzdest, indexFa(rzdest))
    src <- scanFa(src, param=as(seqinfo(FaFile(rzdest)), "GRanges"))
    rz <- scanFa(rzdest, param=as(seqinfo(FaFile(rzdest)), "GRanges"))
    gz <- scanFa(rzdest, param=as(seqinfo(FaFile(rzdest)), "GRanges"))
    checkIdentical(as.character(src), as.character(rz))
    checkIdentical(as.character(src), as.character(gz))
}