Question: Drawing secondary structure using RNAplot from command line
0
gravatar for biousex
2.1 years ago by
biousex0
Italy
biousex0 wrote:

Hi all, i need to draw secondary structure using RNAplot from command line whit Php. I get dot-bracket notation using RNAcofold, with Php command exec (seq.txt contain my RNA sequence):

exec(RNAcofold < seq.txt", $output1, $return_var1);

Then i write another file (named notation.txt), structured as follow:

LINE1: -> RNA sequence

LINE2: -> Dot-bracket notation

Well, if i call "RNAplot -o svg < notation.txt" using Dos prompt, i get the svg file.

But if i call RNAplot whit Php:

exec(RNAplot < notation.txt", $output2, $return_var2);

i don't get the file. What's wrong? If i print $return_var2, i get 0, so in theory the command works fine.

Thanks in advance.

rnaplot • 781 views
ADD COMMENTlink modified 2.1 years ago by genomax55k • written 2.1 years ago by biousex0

Ok, the problem seems to be the path: Php save the svg file using the root of the project. I need a way to redirect output in "svgfiles" folder. If i use this sintax:

exec(RNAplot < notation.txt > svgfiles\image.svg", $output2, $return_var2);

i get a empty svg file. Any advice?

Thanks in advance.

ADD REPLYlink written 2.1 years ago by biousex0

From the documentation:

If the sequence was preceded by a line of the form

name

the output file will be named "name_ss.ps" otherwise "rna.ps" is used. Existing files of the same name will be overwritten.

IIRC the filename is hardcoded so you can either issue a system command to move/rename the file afterwards, or edit the code to either print to stdout or file.

ADD REPLYlink written 2.1 years ago by fanli.gcb650
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1448 users visited in the last hour