/usr/lib/R/site-library/Biostrings/doc/Biostrings2Classes.R is in r-bioc-biostrings 2.38.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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | ### R code from vignette source 'Biostrings2Classes.Rnw'
###################################################
### code chunk number 1: a1
###################################################
library(Biostrings)
b <- BString("I am a BString object")
b
length(b)
###################################################
### code chunk number 2: a2
###################################################
d <- DNAString("TTGAAAA-CTC-N")
d
length(d)
###################################################
### code chunk number 3: a3
###################################################
d[3]
d[7:12]
d[]
b[length(b):1]
###################################################
### code chunk number 4: a4
###################################################
bb <- subseq(b, 3, 6)
dd1 <- subseq(d, end=7)
dd2 <- subseq(d, start=8)
###################################################
### code chunk number 5: a5
###################################################
toString(dd2)
###################################################
### code chunk number 6: b1
###################################################
bb == "am a"
dd2 != DNAString("TG")
###################################################
### code chunk number 7: b2
###################################################
cat('> bb == ""')
cat('> d == bb')
###################################################
### code chunk number 8: b3
###################################################
r <- RNAString(d)
r
r == d
###################################################
### code chunk number 9: c1
###################################################
v4 <- Views(dd2, start=3:0, end=5:8)
v4
length(v4)
###################################################
### code chunk number 10: c3
###################################################
v4[4:2]
###################################################
### code chunk number 11: c4
###################################################
v4[[2]]
###################################################
### code chunk number 12: c6
###################################################
cat('> v4[[3]]')
cat(try(v4[[3]], silent=TRUE))
###################################################
### code chunk number 13: c7
###################################################
v4[-3]
v4[c(TRUE, FALSE)]
###################################################
### code chunk number 14: d1
###################################################
v12 <- Views(DNAString("TAATAATG"), start=-2:9, end=0:11)
###################################################
### code chunk number 15: d2
###################################################
as(d, "Views")
###################################################
### code chunk number 16: d3
###################################################
as(d, "Views")[[1]]
###################################################
### code chunk number 17: d4
###################################################
v12[0]
v12[FALSE]
Views(d)
###################################################
### code chunk number 18: e1
###################################################
v12 == DNAString("TAA")
###################################################
### code chunk number 19: e2
###################################################
v12[v12 == v12[4]]
v12[v12 == v12[1]]
###################################################
### code chunk number 20: e2
###################################################
v12[3] == Views(RNAString("AU"), start=0, end=2)
###################################################
### code chunk number 21: f1
###################################################
start(v4)
end(v4)
width(v4)
|