featureGapPairComposition {BioSeqClass} | R Documentation

## Feature Coding by g-spaced aminoacids/bases pairs

### Description

Sequences are coded based on the frequency of g-spaced aminoacids/bases pairs.

### Usage

      featureGapPairComposition(seq,g,class=elements("aminoacid"))

### Arguments

`seq` | a string vector for the protein, DNA, or RNA sequences.
`g` | an integer indicating the distance between two aminoacids/bases (g>=0).
`class` | a list for the class of biological properties. It can be produced by `elements` and `aaClass`.

### Details

`featureGapPairComposition` returns a matrix with M\^2 columns. Each row represented features of one sequence coding by a M\^2 dimension numeric vector. Each column is the frequency of g-spaced aminoacids/bases pair. featureFragmentComposition(seq,2) is same with featureGapPairComposition(seq,0).

### Author(s)

Hong Li

### Examples

    if(interactive()){
      file = file.path(path.package("BioSeqClass"), "example", "acetylation_K.pos40.pep")
      seq = as.matrix(read.csv(file,header=F,sep="\t",row.names=1))[,1]

      GPC0 = featureGapPairComposition(seq,0,elements("aminoacid"))
      GPC2 = featureGapPairComposition(seq,2,elements("aminoacid"))
    }

[Package BioSeqClass version 1.40.0 Index]