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)

Arguments

sequence

character/ Biostrings::AAString, complete protein/peptide sequence.

mass

double, mass of the fragments, same length as start/end/width.

type

character, type of the fragments, same length as start/end/width`.

z

integer, charge of the fragments, length one or same length as start/end/width`.

start

integer, start positions of the fragments. At least two of start/end/width` has to be given.

end

integer, end positions of the fragments. At least two of start/end/width` has to be given.

width

integer, width positions of the fragments. At least two of start/end/width` has to be given.

names

character, names of the fragments, same length as start/end/width`.

metadata

list, metadata like modifications.

object, x, y

FragmentViews

...

arguments passed to internal/other methods.

Value

An FragmentViews object.

Details

FragmentViews extends Biostrings::XStringViews. In short it combines an IRanges::IRanges object to store start/end location on a sequence, an Biostrings::AAString object.

Functions

  • FragmentViews: Constructor

    In general it is not necessary to call the constructor manually. See readTopDownFiles() instead.

Coercion

as(object, "data.frame"): Coerce an FragmentViews object into a data.frame.

See also

Author

Sebastian Gibb mail@sebastiangibb.de

Examples

# 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