prepareMatrix: given table of peptide protein assigments generate matrix

View source: R/prepareMatrix.R

prepareMatrixR Documentation

given table of peptide protein assigments generate matrix

Description

given table of peptide protein assigments generate matrix

Usage

prepareMatrix(
  data,
  proteinID = "proteinID",
  peptideID = "strippedSequence",
  weighting = NULL,
  sep = "|",
  use.last.ij = TRUE
)

Arguments

data

generated by annotatePeptides

proteinID

protein ID column

peptideID

peptide / precursor ID column

weighting

weight type to use. Options are "one" , "AA" - amino acids, "coverage" - coverage , "inverse" - inverse peptide frequencies

sep

separator for precursor (rownames)

Value

sparse matrix

Examples

#library(prozor)
data(protpepmetashort)
library(Matrix)
colnames(protpepmetashort)
head(protpepmetashort)
dim(protpepmetashort)
count = prepareMatrix( protpepmetashort, peptideID = "peptideSeq" )
dim(count)
inverse = prepareMatrix( protpepmetashort, peptideID = "peptideSeq" , weight = "inverse")
#aa = prepareMatrix(protpepmetashort,  peptideID = "peptideSeq" , weight = "AA")
#xx = prepareMatrix(protpepmetashort,  peptideID = "peptideSeq" , weight = "coverage")
image( as.matrix(count) )

corProt = cor( as.matrix(count) )
par(mfrow =c(1,2))
image(corProt)

#penalise peptides matching many proteins
corProtn = cor( as.matrix(inverse) )
image(corProtn)


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