Learn R Programming

EnvNJ (version 0.1.3)

ngram: Compute n-Gram Frequencies Vector

Description

Computes the n-gram frequencies vector for a given protein.

Usage

ngram(prot, k = 4)

Arguments

prot

a character string corresponding to the primary structure of the protein.

k

a positive integer, between 1 and 5, indicating the k-mer of the words to be counted.

Value

A dataframe with two columns, the first one given the peptides and the second one the corresponding absolute frequency.

Details

The one letter code for amino acids is used (capital).

References

Stuart et al. Bioinformatics 2002; 18:100-108.

See Also

ngraMatrix(), ffp(), svdgram()

Examples

Run this code
# NOT RUN {
ngram(bovids$Bos_taurus[1], k = 3)
# }

Run the code above in your browser using DataLab