TorsionAngle: Torsion Angle (TorsionAngle)

Description Usage Arguments Value Note Examples

View source: R/TorsionAngle.R

Description

The inputs to this function are phi and psi angles of each amino acid in the sequence. We use the output of SPINE-X software to obtain the angles. Further, the TA function replaces each amino acid of the sequence with a vector. The vector contain two elements: The phi and psi angles.

Usage

1
TorsionAngle(dirPath, outFormat = "mat", outputFileDist = "")

Arguments

dirPath

Path of the directory which contains all output files of SPINE-X. Each file belongs to a sequence.

outFormat

It can take two values: 'mat' (which stands for matrix) and 'txt'. The default value is 'mat'.

outputFileDist

It shows the path and name of the 'txt' output file.

Value

The output is differnet depending on the outFormat parameter ('mat' or 'txt'). If the outFormat is set to 'mat', it returns a feature matrix for sequences with the same lengths. The number of rows is equal to the number of sequences and the number of columns is (length of the sequence)*2. If the outFormat is set to 'txt', all binary values will be writen in a 'txt' file. Each row belongs to a sequence.

Note

This function is provided for sequences with the same lengths. Users can use 'txt' option in outFormat parameter for sequences with different lengths. Warning: If the outFormat is set to 'mat' for sequences with different lengths, it returns an error. It is noteworthy that 'txt' format is not usable for machine learning purposes.

Examples

1
2
3
4
5
6
7
8
dir = tempdir()
ad<-paste0(dir,"/ta.txt")

PredTorsioNdir<-system.file("testForder",package="ftrCOOL")
PredTorsioNdir<-paste0(PredTorsioNdir,"/TorsioNdir/")
mat<-TorsionAngle(PredTorsioNdir,outFormat="txt",outputFileDist=ad)

unlink("dir", recursive = TRUE)

ftrCOOL documentation built on Nov. 30, 2021, 1:07 a.m.