cpanse / protViz

Visualizing and Analyzing Mass Spectrometry Related Data in Proteomics
https://CRAN.R-project.org/package=protViz
GNU General Public License v3.0
11 stars 3 forks source link

fragmentIon() for modfied sequences #19

Closed HijaziHassan closed 1 year ago

HijaziHassan commented 1 year ago

Hello,

Is their a way to generate fragment ions of a modified sequence using the fragmentIon function.

like: K[28.02]SKRPK[14.01]SST

Thank you.

cpanse commented 1 year ago

lets have unimod ID 21 on STY on the peptide ELVIS[UNIMOD:21]K

R> ## no modification
R> w <- protViz::aa2mass("ELVISK")[[1]] 
R> w |> protViz::fragmentIon()
[[1]]
         b        y        c        z
1 130.0499 147.1128 147.0764 130.0863
2 243.1339 234.1448 260.1605 217.1183
3 342.2023 347.2289 359.2289 330.2023
4 455.2864 446.2973 472.3129 429.2708
5 542.3184 559.3814 559.3450 542.3548
6 670.4134 688.4240 687.4399 671.3974

attr(,"class")
[1] "fragmentIonSet" "list"         
R> ##  ELVIS[UNIMOD:21]K
R> w[5] <- w[5] + 80
R> w |> protViz::fragmentIon()
[[1]]
         b        y        c        z
1 130.0499 147.1128 147.0764 130.0863
2 243.1339 314.1448 260.1605 297.1183
3 342.2023 427.2289 359.2289 410.2023
4 455.2864 526.2973 472.3129 509.2708
5 622.3184 639.3814 639.3450 622.3548
6 750.4134 768.4240 767.4399 751.3974

attr(,"class")
[1] "fragmentIonSet" "list"          
R> 
HijaziHassan commented 1 year ago

faire enough. This will do it.