Learn R Programming

prozor (version 0.3.1)

greedy: given matrix (columns protein rows peptides), compute minimal protein set using greedy algorithm

Description

given matrix (columns protein rows peptides), compute minimal protein set using greedy algorithm

Usage

greedy(pepprot)

Arguments

pepprot

matrix as returned by prepareMatrix

Value

list of peptide protein assignment

Examples

Run this code
# NOT RUN {
#library(prozor)

data(protpepmetashort)
colnames(protpepmetashort)
dim(unique(protpepmetashort[,4]))
xx = prepareMatrix(protpepmetashort, peptideID = "peptideModSeq")
dim(xx)
stopifnot(dim(xx)[1] == dim(unique(protpepmetashort[,4]))[1])
es = greedy(xx)
stopifnot(length(unique(names(es))) == dim(unique(protpepmetashort[,4]))[1])

# }

Run the code above in your browser using DataLab