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)

Arguments

gpsm_dir

The path to the pGlyco3 GPSM output file (for example, "pGlycoDB-GP-FDR-Pro-Quant-Site.txt").

Value

A data frame with one row per ProteinPeptideGlycanStructureFile 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

Details

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.