R/AllClasses.R
, R/functions-FragmentViews.R
, R/methods-FragmentViews.R
FragmentViews-class.Rd
The FragmentViews class is a basic container for storing a set of views (start/end locations) on the same peptides/protein sequence. Additionally it keeps information about mass, type and charge of the fragments.
FragmentViews(
sequence,
mass,
type,
z = 1L,
start = NULL,
end = NULL,
width = NULL,
names = NULL,
metadata = list()
)
# S4 method for FragmentViews,FragmentViews
combine(x, y)
# S4 method for FragmentViews
mz(object, ...)
# S4 method for FragmentViews
show(object)
sequence |
|
---|---|
mass |
|
type |
|
z |
|
start |
|
end |
|
width |
|
names |
|
metadata |
|
object, x, y | FragmentViews |
... | arguments passed to internal/other methods. |
An FragmentViews object.
FragmentViews extends Biostrings::XStringViews. In short it combines an IRanges::IRanges object to store start/end location on a sequence, an Biostrings::AAString object.
FragmentViews
: Constructor
In general it is not necessary to call the constructor manually. See
readTopDownFiles()
instead.
as(object, "data.frame")
: Coerce an
FragmentViews object into a data.frame
.
Sebastian Gibb mail@sebastiangibb.de
# Constructor
fv <- FragmentViews("ACE", start=1, width=1:3, names=paste0("b", 1:3),
mass=c(72.04439, 232.07504, 361.11763),
type="b", z=1)
fv
#> FragmentViews on a 3-letter sequence:
#> ACE
#> Views:
#> start end width mass name type z
#> [1] 1 1 1 72.04 b1 b 1 [A]
#> [2] 1 2 2 232.08 b2 b 1 [AC]
#> [3] 1 3 3 361.12 b3 b 1 [ACE]
# Coercion to data.frame
as(fv, "data.frame")
#> fragment start end width name type mass z
#> b1 A 1 1 1 b1 b 72.04439 1
#> b2 AC 1 2 2 b2 b 232.07504 1
#> b3 ACE 1 3 3 b3 b 361.11763 1
as(fv, "data.frame")
#> fragment start end width name type mass z
#> b1 A 1 1 1 b1 b 72.04439 1
#> b2 AC 1 2 2 b2 b 232.07504 1
#> b3 ACE 1 3 3 b3 b 361.11763 1