I need a program to read each sequence from a fasta file (about 1000sequences) and use each as input to another application (RNAfold) for secondary structure prediciton. I am using python. is it possible? could someone give me a guideline code for a start?
@Lennart i have modified the code to the one below:
$
from Bio import SeqIO
import subprocess, re
PIPE = -1
handle = open ("D:\python\hsa.fa", "rU")
for record in SeqIO.parse(handle, "fasta"):
output = subprocess.Popen("D:\python\RNAfold.exe -p -d2 --noLP -P", shell=True, stdin = PIPE, stdout = PIPE)
print output
handle.close()
And am getting the following output that got nothing to do with RNAfold output:what is wrong with my code?
<subprocess.Popen object at 0x02CCEE90>
<subprocess.Popen object at 0x02CCEF30>
<subprocess.Popen object at 0x02CCEF70>
<subprocess.Popen object at 0x02CCEFB0>
<subprocess.Popen object at 0x02CCEB90>
<subprocess.Popen object at 0x02CCEE30>
<subprocess.Popen object at 0x02CCECD0>
<subprocess.Popen object at 0x02CCED90>
<subprocess.Popen object at 0x02CCEEB0>