featureBinary {BioSeqClass} | R Documentation |
Sequences are coded by binary vectors.
featureBinary(seq,class=elements("aminoacid"))
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 |
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.
Hong Li
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")) }