greedy_parsimony: given matrix (columns protein rows peptides), compute minimal...

View source: R/greedy.R

greedy_parsimonyR Documentation

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_parsimony(pepprot)

Arguments

pepprot

matrix as returned by prepareMatrix

Value

list of peptide protein assignment

Examples

#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)
debug(prozor:::.greedy2)
stopifnot(length(unique(names(es))) == dim(unique(protpepmetashort[,4]))[1])


protViz/prozor documentation built on Oct. 17, 2023, 6:39 p.m.