Skip to main content

Convert a greedy_parsimony() result to a table

Description

Convert a greedy_parsimony() result to a table

Usage

greedy_to_table(groups)

Arguments

groups A result of greedy_parsimony() whose names have the form peptide.charge, i.e. end in a dot and an integer charge; an error otherwise. The charge is taken after the last dot, so modified peptides such as “AC[+57.0]K.2” work.

Value

A data frame with the columns peptide, precursor_charge (integer) and protein_group, and the precursor IDs as row names.

See Also

Other protein inference: annotate_aho(), annotate_peptides(), greedy_parsimony(), pepprot, protpepmetashort

Examples

library("prozor")

data(protpepmetashort)
protpepmetashort$precursor <- paste(
  protpepmetashort$peptide_mod_seq,
  protpepmetashort$precursor_charge,
  sep = "."
)
head(greedy_to_table(greedy_parsimony(protpepmetashort, peptide = "precursor")))
                                              peptide precursor_charge
AADKDTC[+57.0]FSTEGPNLVTR.2 AADKDTC[+57.0]FSTEGPNLVTR                2
AADKDTC[+57.0]FSTEGPNLVTR.3 AADKDTC[+57.0]FSTEGPNLVTR                3
AADKDTC[+57.0]FSTEGPNLVTR.4 AADKDTC[+57.0]FSTEGPNLVTR                4
AETFTFHSDIC[+57.0]TLPEK.2     AETFTFHSDIC[+57.0]TLPEK                2
AETFTFHSDIC[+57.0]TLPEK.3     AETFTFHSDIC[+57.0]TLPEK                3
AETFTFHSDIC[+57.0]TLPEKEK.2 AETFTFHSDIC[+57.0]TLPEKEK                2
                                   protein_group
AADKDTC[+57.0]FSTEGPNLVTR.2 sp|P07724|ALBU_MOUSE
AADKDTC[+57.0]FSTEGPNLVTR.3 sp|P07724|ALBU_MOUSE
AADKDTC[+57.0]FSTEGPNLVTR.4 sp|P07724|ALBU_MOUSE
AETFTFHSDIC[+57.0]TLPEK.2   sp|P07724|ALBU_MOUSE
AETFTFHSDIC[+57.0]TLPEK.3   sp|P07724|ALBU_MOUSE
AETFTFHSDIC[+57.0]TLPEKEK.2 sp|P07724|ALBU_MOUSE