run_RNAfold: Obtain the Secondary Structure Sequences Using RNAfold

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/LncFinder.R

Description

This function can compute secondary structure sequences. The tool "RNAfold" of software "ViennaRNA" is required for this function.

Usage

1
run_RNAfold(Sequences, RNAfold.path = "RNAfold", parallel.cores = 2)

Arguments

Sequences

A FASTA file loaded by function read.fasta of seqinr-package.

RNAfold.path

String. Indicate the path of the program "RNAfold". By default is "RNAfold" for UNIX/Linux system. (See details.)

parallel.cores

Integer. The number of cores for parallel computation. By default the number of cores is 2, users can set as -1 to run this function with all cores.

Details

This function is used to compute secondary structure. The output of this function can be used in function make_frequencies, extract_features, build_model and lnc_finder when parameter SS.features is set as TRUE.

This function depends on the program "RNAfold" of software "ViennaRNA". (http://www.tbi.univie.ac.at/RNA/index.html)

Parameter RNAfold.path can be simply defined as "RNAfold" as default when the OS is UNIX/Linux. However, for some OS, such as Windows, users need to specify the RNAfold.path if the path of "RNAfold" haven't been added in environment variables.

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

"25 of 100, length: 695 nt",

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

If users have their own SS data, users can use function read_SS to load them, instead of obtaining from RNAfold.

Value

Returns data.frame. The first row is RNA sequence; the second row is Dot-Bracket Notation of secondary structure sequences; the last row is minimum free energy (MFE).

Author(s)

HAN Siyu

See Also

read_SS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
### For a FASTA file contains several sequences,
### Use "read.fasta" function of package "seqinr" to read a FASTA file:
Seqs <- read.fasta(file =
"http://www.ncbi.nlm.nih.gov/WebSub/html/help/sample_files/nucleotide-sample.txt")

### Or just try to use our data "demo_DNA.seq"
data(demo_DNA.seq)
Seqs <- demo_DNA.seq

### Windows:
RNAfold.path <- '"E:/Program Files/ViennaRNA/RNAfold.exe"'
SS.seq_1 <- run_RNAfold(Seqs[1:2], RNAfold.path = RNAfold.path, parallel.cores = 2)

### For UNIX/Linux, "RNAfold.path" can be just defined as "RNAfold" as default:
SS.seq_2 <- run_RNAfold(Seqs, RNAfold.path = "RNAfold", parallel.cores = 2)

## End(Not run)

LncFinder documentation built on Dec. 11, 2021, 9:39 a.m.