Description Usage Arguments Value Examples
View source: R/prepareMatrix.R
given table of peptide protein assigments generate matrix
1 2 3 4 5 6 7 | prepareMatrix(
data,
proteinID = "proteinID",
peptideID = "strippedSequence",
weighting = NULL,
sep = "|"
)
|
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) |
sparse matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.