Interpol: Interpolation of encoded amino acid sequences

Description Usage Arguments Value Author(s) References Examples

View source: R/Interpol.R

Description

Interpolation of encoded protein sequences to a specific length. Interpol can be used to transform protein sequences to uniform length for subsequent classification.

Usage

1
Interpol(data, dims, method = "linear")

Arguments

data

list of encoded protein sequences (as numerical vectors)

dims

interpolation value (desired dimensionality)

method

"linear": linear interpolation

"spline": cubic spline interpolation

"natural": fulfills natural boundary conditions

"periodic": fulfills periodic boundary conditions

"fmm": interpolation of Forsythe

"average": interval based averaging

Value

returns the interpolated encoded amino acid sequences with desired dimensionality.

Author(s)

Dominik Heider, PhD, University of Duisburg-Essen, Germany

References

Heider D., Verheyen J., Hoffmann D.: Machine learning on normalized protein sequences, BMC Research Notes 2011, 4:94.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
	#### V3 data
	data(V3)
	sequence = V3[1]

	#### encoding of sequence a with descriptor 151 and with normalization [0,1]
	b = AAdescriptor(sequence, 151, 2)
	b

	#### interpolation to length 27 with linear interpolation
	c = Interpol(b, 27, "linear")
	c

	#### plotting
	plot(unlist(b), type="l", col="darkgreen", ylim=c(-3,3), ylab="descriptor value", xlab="sequence position", lwd=2)
	lines(seq(1,length(unlist(b)),(length(unlist(b))/length(as.vector(c)))),as.vector(c), col="red", lwd=2)
	axis(3, at=seq(1,35, 35/27), labels=1:27)

Interpol documentation built on May 29, 2017, 7:54 p.m.