featureBinary: Feature Coding by Binary Vectors

Description Usage Arguments Details Author(s) Examples

View source: R/feature.R

Description

Sequences are coded by binary vectors.

Usage

1
2

Arguments

seq

a string vector for the protein, DNA, or RNA sequences.

class

a list for the class of biological properties. It can be produced by elements and aaClass.

Details

featureBinary returns a matrix with M*N columns. Each row represented features of one sequence coding by a M*N dimension 0-1 vector. Each base/amino acid is coded as a M dimension vetor. For example: amino acid "A" is coded by "00000000000000000001"; base "T" is coded by "0010". The input sequences must have equal length.

Author(s)

Hong Li

Examples

1
2
3
4
5
6
7
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]
  
  BIN1 = featureBinary(seq,elements("aminoacid"))
  BIN2 = featureBinary(seq,aaClass("aaE"))
}

BioSeqClass documentation built on April 28, 2020, 9:19 p.m.