smallestUniqueGroups: Smallest unique protein groups

View source: R/smallestUniqueGroups.R

smallestUniqueGroupsR Documentation

Smallest unique protein groups

Description

For a given vector of protein group names, outputs the names of those protein groups for which none of its member proteins is present in a smaller protein group.

Usage

smallestUniqueGroups(proteins, split = ";")

Arguments

proteins

A vector of characters or factors containing single proteins and/or protein groups (i.e. proteins separated by a separator symbol).

split

The character string that is used to separate the indivudual protein names in each protein group.

Value

A character vector containing the names of the protein groups for which none of its proteins is present in a smaller protein group.

Examples

#This example will give the names of the protein groups in the MSnSet object peptidesCPTAC for which none of its proteins is present in a smaller protein group.
library("MSnbase")
#Select the columns containing intensities
colInt <- grepEcols(system.file("extdata/CPTAC", "peptides.txt", package = "MSqRob"), pattern="Intensity.", split = "\t")
#Import MaxQuant's peptides.txt file and convert it to an MSnSet object
peptidesCPTAC <- readMSnSet2(system.file("extdata/CPTAC", "peptides.txt", package = "MSqRob"), ecol = colInt, sep = "\t")

#Our approach: a peptide can map to multiple proteins, as long as there is none of these proteins present in a smaller subgroup.
groups <- smallestUniqueGroups(fData(peptidesCPTAC)$Proteins)
groups

ludgergoeminne/MSqRob documentation built on Jan. 11, 2023, 1:32 p.m.