featureFragmentComposition {BioSeqClass} | R Documentation

## Feature Coding by the composition of k-mer fragments

### Description

Sequences are coded based on the frequency of k-mer sequence fragments.

### Usage

      featureFragmentComposition(seq,k,class=elements("aminoacid"))

### Arguments

`seq` | a string vector for the protein, DNA, or RNA sequences.
`k` | an integer indicating the length of sequence fragment (k>=1).
`class` | a list for the class of biological properties. It can be produced by `elements` and `aaClass`.

### Details

`featureFragmentComposition` returns a matrix with M\^k columns. Each row represented features of one sequence coding by a M\^k dimension numeric vector. Each column is the frequency of k-mer sequence fragment.

### 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]

      FC2 = featureFragmentComposition(seq,2,aaClass("aaS"))
      FC3 = featureFragmentComposition(seq,3,aaClass("aaS"))
    }

[Package BioSeqClass version 1.45.0 Index]