Learn R Programming

protr (version 1.7-4)

protseg: Protein Sequence Segmentation/Partition

Description

This function extracts the segmentations from the protein sequence.

Usage

protseg(
  x,
  aa = c("A", "R", "N", "D", "C", "E", "Q", "G", "H", "I", "L", "K", "M", "F", "P", "S",
    "T", "W", "Y", "V"),
  k = 7
)

Value

A named list, each component contains one of the segmentations (a character string), names of the list components are the positions of the specified amino acid in the sequence.

Arguments

x

A character vector, as the input protein sequence.

aa

A character, the amino acid type. One of 'A', 'R', 'N', 'D', 'C', 'E', 'Q', 'G', 'H', 'I', 'L', 'K', 'M', 'F', 'P', 'S', 'T', 'W', 'Y', 'V'.

k

A positive integer, specifys the window size (half of the window), default is 7.

Author

Nan Xiao <https://nanx.me>

Examples

Run this code
x <- readFASTA(system.file("protseq/P00750.fasta", package = "protr"))[[1]]
protseg(x, aa = "R", k = 5)

Run the code above in your browser using DataLab