1
test_GAlignments_constructor <- function()
3
checkTrue(validObject(GAlignments()))
4
checkTrue(validObject(GAlignments(seqnames=factor("A"),
9
test_GAlignments_concat <- function()
11
galn <- GAlignments(seqnames=factor("A"),
14
galn_c <- GAlignments(seqnames=rep(factor("A"), 2),
15
pos=rep(1L, 2), cigar=rep("1M", 2),
16
strand=rep(strand("-"), 2))
17
checkIdentical(galn_c, c(galn, galn))
20
test_GAlignments_qnarrow <- function()
22
gal <- GAlignments(seqnames=rep(factor("A"), 8),
24
cigar=c("5M", "5X", "3M2I3M", "3M2D3M",
25
"3M2N3M", "3M2S3M", "3M2H3M", "3M2P3M"),
26
strand=Rle(strand(rep("+", 8))))
27
n1 <- narrow(gal, start=3)
28
q1 <- qnarrow(gal, start=3)
29
checkIdentical(qwidth(n1), qwidth(q1))
30
checkIdentical(width(n1), width(q1))
32
n2 <- narrow(gal, start=4)
33
q2 <- qnarrow(gal, start=4)
34
checkIdentical(width(n2), width(q2))
36
checkIdentical(qwidth(n2[1:2]), qwidth(q2[1:2]))
38
checkIdentical(qwidth(q2[3]), width(q2[3]) + 2L)
40
checkIdentical(qwidth(q2[c(4,5,8)]), width(q2[c(4,5,8)]))
42
checkIdentical(qwidth(q2[6]), width(q2[6]) + 2L)
43
checkIdentical(qwidth(q2[7]), width(q2[7]))