Learn R Programming

peptoolkit (version 0.0.1)

count_aa: Count Amino Acids

Description

This function counts the occurrence of each of the 20 amino acids at each of the first 'n' positions across a vector of peptide sequences.

Usage

count_aa(peptides, n = 4)

Value

A data frame with 'n' rows and 20 columns where each row represents a position in the peptide sequence and each column represents an amino acid. Each cell in the data frame contains the count of a particular amino acid at a particular position.

Arguments

peptides

A character vector of peptide sequences.

n

The number of initial positions to consider in each peptide sequence.

Examples

Run this code
count_aa(c("ACDF", "BCDE", "ABCD"), n = 2)

Run the code above in your browser using DataLab