add_mod_symbol {MSnID} | R Documentation

## Annotates peptide sequences with modification symbols

### Description

Given the provided modification mass, annotates its position within the peptide sequence with provided symbol.

### Usage

        add_mod_symbol(object, mod_mass, symbol)

### Arguments

`object` | An instance of class "MSnID".
`mod_mass` | (string) modification mass. Must match exactly one of the masses in `report_mods`.
`symbol` | (string) character that annotates the position of the modification

### Value

Returns MSnID object with new or modified `peptide_mod` column. The column contains peptide sequence with amino acid modifications annotated with symbols.

### Note

In current implementation the method can not distinguish modifications with the same mass, but different amino acid specificity as different modifications.

### Author(s)

Vladislav A Petyuk vladislav.petyuk@pnnl.gov

### See Also

`report_mods` `map_mod_sites`

### Examples

    m <- MSnID(".")
    mzids <- system.file("extdata","phospho.mzid.gz",package="MSnID")
    m <- read_mzIDs(m, mzids)

    # to know the present mod masses
    report_mods(m)

    # TMT modification
    m <- add_mod_symbol(m, mod_mass="229.1629", symbol="#")
    # alkylation
    m <- add_mod_symbol(m, mod_mass="57.021463735", symbol="^")
    # phosphorylation
    m <- add_mod_symbol(m, mod_mass="79.966330925", symbol="*")

    # show the mapping
    head(unique(subset(psms(m), select=c("modification", "peptide_mod"))))

    # clean-up cache
    unlink(".Rcache", recursive=TRUE)

[Package MSnID version 1.26.0 Index]