runPredator: Run Predator in R

View source: R/Structure.R

runPredatorR Documentation

Run Predator in R

Description

This function can run and capture the result of Predator in R by invoking the OS command. The results can be formatted and used as the features of tool "lncPro". Predator is required (https://bioweb.pasteur.fr/packages/pack@predator@2.1.2). NOTE: Predator does not support 64-bit MS Windows OS. Linux OS is recommended).

Usage

runPredator(
  seqs,
  args.Predator = NULL,
  path.Predator = "Predator/predator",
  path.stride = "Predator/stride.dat",
  workDir = getwd(),
  verbose = FALSE,
  parallel.cores = 2,
  cl = NULL
)

Arguments

seqs

RNA sequences loaded by function read.fasta from seqinr-package. Or a list of RNA/protein sequences. RNA sequences will be converted into lower case letters. Each sequence should be a vector of single characters. (Non-AA letters will be ignored.)

args.Predator

string specifying additional arguments (except "-a" and "-b") for Predator. This is used when you want to control the behaviour of Predator. Arguments for Predator please refer to its manual. Default: NULL.

path.Predator

string specifying the location of Predator program.

path.stride

string specifying the location of file "stride.dat" required by program Predator.

workDir

string specifying the directory for temporary files. The temp files will be deleted automatically when the calculation is completed. The directory does not exist will be created automatically.

verbose

logical. Should the relevant information be printed during the calculation? (Only available on Linux OS.)

parallel.cores

an integer that indicates the number of cores for parallel computation. Default: 2. Set parallel.cores = -1 to run with all the cores. parallel.cores should be == -1 or >= 1.

cl

parallel cores to be passed to this function.

Details

This function depends on the program Predator (https://bioweb.pasteur.fr/packages/pack@predator@2.1.2). Program Predator is only available on Linux and 32-bit Windows OS.

This function can print the related information when the OS is Linux, such as:

"25 of 100, length: 50 aa",

which means around 100 sequences are assigned to this node, and the program is computing the 25th sequence. The length of this sequence is 50 aa.

Value

This function returns a data frame of the raw outputs of Predator.

References

Frishman D, Argos P. Incorporation of non-local interactions in protein secondary structure prediction from the amino acid sequence. Protein Eng. 1996; 9:133-42

See Also

runRNAsubopt

Examples



data(demoPositiveSeq)
seqsPro <- demoPositiveSeq$Pro.positive

path.Predator <- "/mnt/external_drive_1/hansy/predator/predator"
path.stride <- "/mnt/external_drive_1/hansy/predator/stride.dat"

path.stride <- "/media/psf/AllFiles/Volumes/Work/Projects/ncPro/lnc-pro/predator/stride.dat"
path.Predator <- "/media/psf/AllFiles/Volumes/Work/Projects/ncPro/lnc-pro/predator/predator"

Predator.res <- runPredator(seqs = seqsPro, path.Predator = path.Predator,
                            path.stride = path.stride, workDir = "tmp",
                            verbose = TRUE, parallel.cores = 2)


HAN-Siyu/ncProR documentation built on Nov. 3, 2023, 12:08 a.m.