[Biopython] RNA secondary structure with RNAfold

Peter Cock p.j.a.cock at googlemail.com
Sun Nov 30 22:27:14 UTC 2014


Hi Jakub,

You should probably email the biomanycores authors about
this specific error.

Python itself has various ways to call command line tools,
e.g. os.system(...), but the subprocess module is probably
worth learning in particular.

Biopython's applications wrappers use subprocess internally.

Peter


On Sat, Nov 29, 2014 at 12:41 AM, Jakub Stanislaw Nowak
<jakub.nowak at ed.ac.uk> wrote:
> Hello everyone,
>
> I am trying to model secondary structures of some RNA.
>
> As I am not an expert in programming it is quite a challenge for me so far I
> found a way to access RNAfold from biopython via biomanycores.
>
> I downloaded and installed both biomanycores and RNAfold tools in
> /usr/local/bin/
>
> and wrote a simple test script in python before loading my dataset
>
> from Biomanycores import RNAFold
>
> RNA = 'CUGCAUUGGCCAAAUUGGCCCUACUACGUAUGCUAGCAUGAGAUGUGACAGUACAGUGUACUUAC'
>
> structure = RNAFold.execute(RNA)
>
> print(structure)
>
>
>
> Unfortunately it hasn’t work and generated this error message:
>
> Traceback (most recent call last):
>
>   File "/Users/user/Google Drive/Bioinformatics/smallRNAseq/Python secondary
> structure/RNAFoldtest", line 9, in <module>
>
>     structure = RNAFold.execute(RNA)
>
>   File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Biomanycores-1.1210-py2.7.egg/Biomanycores/RNAFold.py",
> line 221, in execute
>
>     handle, delta = rnafold_cmd.run(verbose=verbose)
>
>   File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Biomanycores-1.1210-py2.7.egg/Biomanycores/AbstractCommandline.py",
> line 141, in run
>
>     stderr=stderr_str)
>
> ApplicationError: Non-zero return code 1 from '/usr/local/bin/RNAfold -f',
> message '/usr/local/bin/RNAfold: invalid option -- f'
>
>
>>>>
>
>
> Do you know any solution for my problem? Alternatively maybe you know of
> some different approach to analyse secondary structure with biopython?
>
> All best,
>
> Jakub
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython



More information about the Biopython mailing list