Read a pGlyco3 GPSM result file and convert it into a long-format protein–peptide–glycan table with spectral counts per raw file. Each row corresponds to a unique combination of protein, peptide, glycan structure, and file.
read_pGlyco3_gpsm(gpsm_dir)A data frame with one row per
Protein–Peptide–GlycanStructure–File
combination and the following columns:
Protein — protein identifier(s)
Peptide — peptide sequence
GlycanStructure — glycan structural annotation from pGlyco3
File — raw file name
Count — spectral count (number of GPSMs) for this combination
This function takes a pGlyco3 GPSM file as input (typically named
pGlycoDB-GP-FDR-Pro-Quant-Site.txt). The following steps are performed:
Select relevant columns (RawName, Proteins,
Peptide, PlausibleStruct).
Rename them to a standardized schema:
File, Protein, Peptide, GlycanStructure.
Collapse multiple protein IDs per PSM into a single
pipe-separated string (e.g. "P00123|P00456").
Aggregate rows by Protein, Peptide,
GlycanStructure, and File as GPSM counts in each group.