View source: R/peptide2matrix.R
peptide_matrix_count | R Documentation |
This function takes a character vector of peptides, where each element represents a peptide of length 20, and converts it into a matrix where each row represents a peptide and each column represents an amino acid position within that peptide. Each element of the matrix is a single character representing the amino acid at that position. Additionally, the function counts the number of times a particular amino acid appears in a particular position and generates a new matrix, in which each column is an amino acid position, and each row represents an amino acid. The intersection represents the number of amino acids that showed up in that position.
peptide_matrix_count(peptides, p_number = 5)
peptides |
A character vector of peptides |
p_number |
An integer value. How many elements before and after the cleavage site to show. |
A list containing two elements: - peptide_matrix: a matrix where each row represents a peptide and each column represents an amino acid position within that peptide. Each element of the matrix is a single character representing the amino acid at that position. - amino_acid_count: a matrix where each row represents an amino acid and each column represents an amino acid position within the peptide. The intersection represents the number of times that amino acid showed up in that position.
peptides <- c("AKKGSKRHYVWALDMTFEH", "VAVFDELLKIVPNLGSYKR")
peptide_matrix_count(peptides)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.