Learn R Programming

protViz (version 0.1.98)

swath: swath library generator

Description

This function generates an ion library for SWATH analysis. It reads R data object which contains a peaklist. The R data object can be generated using the scripts exec/protViz_bibliospec2RData.py.

Usage

genSwathIonLib(data, 
        mascotIonScoreCutOFF = 20, 
        proteinIDPattern = '',
        file,
        max.mZ.Da.error = 0.1, 
        ignoreMascotIonScore = TRUE, 
        topN = 10, 
        fragmentIonMzRange = c(200, 2000),
        fragmentIonRange = c(2, 100),
        fragmentIonFUN,
        iRT=iRTpeptides,
        data.fit)

Arguments

data
data set containing mZ and peptide sequence.
mascotIonScoreCutOFF
a value for filtering the specs.
proteinIDPattern
a filter for protein.
file
the output file name.
max.mZ.Da.error
the mZ error in Dalton.
ignoreMascotIonScore
boolean if mascot score is considered or not.
topN
returns the most N intense fragment ion only.
fragmentIonMzRange
mZ range filter of framgent ion.
fragmentIonRange
range filter of the number of identified fragment ion set in fragmentIonTyp.
fragmentIonFUN
function (b, y) which derives all requested fragment ion out a given tuble of b and y ion. If the parameter is not specified the methode uses an internal function similar as the example below.
iRT
optional table which contains iRT peptides. If an iRT table is provided (default) a lm is applied to normalize the rt in data. See also ?iRT. A necessary condition is that data contains at least two iRT
data.fit
data set containing mZ and peptide sequence which is used for normalizing rt using a lineat model lm(formula = rt ~ aggregateInputRT * fileName, data). The rt aggregation for the model uses median.

Details

The parentIonMass function reqires one argument secuence. The function expects an input as it can be generated by the python script protViz/exec/protViz_bibliospec2RData.py.

Examples

Run this code
data(AA)
    my.data<-list()
    my.data[[1]] <- list( 
        mZ=c(209.104, 245.126, 251.1478, 262.1427, 280.1395, 288.14244, 288.64, 302.13624, 
        302.1522, 344.67844, 345.1868, 358.67869, 359.191, 367.1805, 375.2397, 379.70739, 
        395.1672, 401.22119, 415.21764, 415.2413, 432.2574, 432.2906, 434.9155, 446.920753, 
        454.7938, 458.2398, 458.76219, 466.2048, 471.76349, 472.2635, 508.2509, 528.3204, 
        532.2273, 537.28544, 545.3398, 547.82244, 575.2645, 583.33849, 603.2592, 621.3354, 
        640.4081, 642.4034, 645.3303, 658.4226, 658.4447, 658.4781, 668.3981, 688.3384, 
        716.3516, 734.42, 771.5067, 791.4254, 813.4178, 829.436, 830.419, 908.5577),
        intensity=c(797.0, 150.3, 94.01, 95.0, 206.3, 268.3, 52.27, 745.0, 169.0, 372.0, 
        96.9, 817.0, 169.0, 149.7, 133.0, 132.0, 300.0, 237.3, 939.0, 169.0, 1780.0, 
        168.0, 280.0, 398.1, 248.1, 137.1, 159.0, 245.0, 375.0, 100.5, 188.0, 170.0, 
        138.1, 224.7, 2151.0, 188.3, 168.0, 1447.0, 1318.0, 138.1, 132.0, 75.0, 90.06, 
        1671.0, 614.0, 76.0, 75.0, 76.0, 359.1, 113.0, 761.0, 95.34, 38.0, 112.0, 76.0, 136.1),
        peptideSequence='AHAGEHLLLGLSR',
        charge=3,
        pepmass=458.59358,
        peptideModSeq='AHAGEHLLLGLSR',
        varModification=c(0,0,0,0,0,0,0,0,0,0,0,0,0),
        mascotScore=83.1,
        proteinInformation='',
        fileName='frac1',
        rtinseconds=61.55
        ); 

    myFragmentIon <- function (b, y) {
        Hydrogen <- 1.007825
        Oxygen <- 15.994915
        Nitrogen <- 14.003074

        b1_ <- (b )
        y1_ <- (y ) 

        b2_ <- (b + Hydrogen) / 2
        y2_ <- (y + Hydrogen) / 2 

        b3_ <- (b + 2 * Hydrogen) / 3
        y3_ <- (y + 2 * Hydrogen) / 3

        return( cbind(b1_, y1_, b2_, y2_, b3_, y3_) )
    }

    genSwathIonLib(my.data, fragmentIonFUN=myFragmentIon)

Run the code above in your browser using DataLab