proteins: Class Representing a Protein Mixture or Sample

Description Usage Arguments S3 METHODS References See Also Examples

Description

Class slots:

masses

A numeric vector of protein masses in daltons.

counts

An integer vector of protein counts/abundance.

Usage

1
proteins(masses, counts)

Arguments

masses

A positive numeric vector of protein masses in daltons, whose elements should be unique.

counts

A positive integer vector of protein counts/abundance, which should have the same length as masses.

S3 METHODS

Arith

Arith group generic functions.

Usage: FUN(x, y) or x op y

FUN

a member of the Arith group generic functions, which include +, -, *,^, %%, %/%, and /.

x

a proteins object or a numeric vector.

y

a proteins object or an integer vector.

If both x and y are objects of proteins, only + and - apply as mixing two protein samples and taking part of a protein sample away, respectively. If x is a numeric and y is an objects of proteins, the masses of y will be modified according to the operation. If x is an objects of proteins and y is an integer, the counts of x will be modified according to the operation.

Compare

Compare group generic functions.

Usage: FUN(x, y)

FUN

a member of the Compare group generic functions, which include ==, >, <, !=, <=, >=, and compare.

x

a proteins object or a numeric vector.

y

a proteins object or a numeric vector.

If both x and y are objects of proteins, only == and != apply . If x is a numeric and y is an objects of proteins, the masses of y will be compared according to the operation. If x is an objects of proteins and y is a numeric, the counts of x will be compared according to the operation.

Math, Math2, Logic

Math, Math2, Logic group generic functions are not defined for class proteins.

Summary

Summary group generic functions.

Usage: FUN(x)

FUN

a member of the Summary group generic functions, which include max, min, range, prod, sum, any, and all.

x

a proteins object.

[

Extract parts of a proteins object.

Usage: x[i]

x

a proteins object.

i

a subscript expression identifying the proteins to extract.

[@mt<-

Replace the counts of parts of a proteins object.

Usage: x[i]<-value

x

a proteins object.

i

a subscript expression identifying the protein counts to replace.

value

a proteins object or an integer vector.

show

Display a proteins object.

Usage: show(object) or object

object

a proteins object.

xyCall

Make all functions that naturally relate to points in the plane work with objects of class proteins, including plot, lines, points, and etc. This generic function is not meant to be called directly.

Usage: xyCall(x, y, FUN, ..., xexpr, yexpr)

x

a proteins object.

y

missing.

FUN

a function to be called that have arguments x, y, ....

xexpr

the S object representing the x argument to FUN unevaluated.

yexpr

the S object representing the y argument to FUN unevaluated.

References

Coombes, K.R., Koomen, J.M., Baggerly, K.A., Morris, J.S., Kobayashi, R., “Understanding the characteristics of mass spectrometry data through the use of simulation," Cancer Informatics, 2005(1):41–52, 2005.

See Also

calibrants, spectrometer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## generate two protein samples 
sam1 <- proteins(masses=c(1, 95, 190), counts=as.integer(c(500, 3000, 10000)))
sam2 <- proteins(masses=10000+200*(0:3), counts=as.integer(c(12000, 4000, 2000, 1000)))

## print the synopsis of the protein samples 
sam1
sam2

## mix the protein samples 
sam <- sam1 + sam2

## visualize the protein mixture 
plot(sam, type="h")

zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.