[Biopython] BioPython wrapper for UNAFOLD and NUPACK

Chris Fields cjfields at illinois.edu
Thu Jun 18 15:30:04 UTC 2009


On Jun 18, 2009, at 4:30 AM, Peter wrote:

> On Thu, Jun 18, 2009 at 2:19 AM, Michiel de Hoon  
> <mjldehoon at yahoo.com> wrote:
>>
>> I'm a bit biased here, since I use UNAFold a lot for my own research.
>>
>> One thing to keep in mind is that UNAFold relies a lot on Perl  
>> scripts that
>> glue the actual executables together. A Biopython interface can  
>> either run
>> the Perl scripts (which would introduce a Perl dependency), or  
>> replicate
>> the Perl scripts in Python (which is more difficult to maintain,  
>> but may give
>> us a more Pythonic way to run UNAFold). You could also consider to
>> contact the UNAFold developers directly; they may be interested in a
>> Python wrapper in addition to the Perl wrapper to their software  
>> (so, the
>> Python wrapper would be part of UNAFold rather than of Biopython).
>
> If UNAFold is a collection of Perl scripts which call some compiled  
> code,
> then the natural thing would just be to wrap the Perl scripts just  
> like any
> other command line tool. I presume they see the Perl scripts as the
> public API.
>
> UNAFold isn't the only command line tool to use Perl internally, for
> example the main SignalP executable is also a Perl script. Many of
> these tools will be Unix/Linux only where Perl is normally installed
> anyway - I don't see this indirect Perl dependency as a problem.
> i.e. If you want to use UNAFold, you need Perl. If you want to call
> UNFold from Biopython, you need UNAFold, therefore you also need
> Perl. This would be an optional runtime dependency like any other
> command line tool we wrap. This doesn't mean Biopython needs Perl ;)
>
> If the underlying compiled code could be wrapped directly in Python
> that may be more elegant, but does really require input from UNAFold
> themselves. It would be worth investigating.
>
> Peter


On my local UNAFold installation all the UNAFold-related perl scripts  
are designated with '.pl' but are , but the executables they wrap are  
compiled binaries (here's my local bin with some of them):

pyrimidine1:unafold-3.6 cjfields$ ls -la ~/bin/hybrid*
-rwxr-xr-x  1 cjfields  cjfields  101268 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid
-rwxr-xr-x  1 cjfields  cjfields    4721 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-2s.pl
-rwxr-xr-x  1 cjfields  cjfields  112736 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-min
-rwxr-xr-x  1 cjfields  cjfields   40180 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-plot-ng
-rwxr-xr-x  1 cjfields  cjfields    5018 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-select.pl
-rwxr-xr-x  1 cjfields  cjfields  145132 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-ss
-rwxr-xr-x  1 cjfields  cjfields    4752 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-ss-2s.pl
-rwxr-xr-x  1 cjfields  cjfields  153516 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-ss-min
-rwxr-xr-x  1 cjfields  cjfields  114764 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-ss-noml
-rwxr-xr-x  1 cjfields  cjfields  110200 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid-ss-simple
lrwxr-xr-x  1 cjfields  cjfields      10 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid2-2s-x.pl -> hybrid2.pl
lrwxr-xr-x  1 cjfields  cjfields      10 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid2-2s.pl -> hybrid2.pl
lrwxr-xr-x  1 cjfields  cjfields      10 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid2-min-x.pl -> hybrid2.pl
lrwxr-xr-x  1 cjfields  cjfields      10 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid2-min.pl -> hybrid2.pl
lrwxr-xr-x  1 cjfields  cjfields      10 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid2-x.pl -> hybrid2.pl
-rwxr-xr-x  1 cjfields  cjfields   28059 Jun 18 10:15 /Users/cjfields/ 
bin/hybrid2.pl

One should be able to create python-based wrappers based on the perl  
wrappers.  In fact, at one point I was planning on writing up bioperl- 
based wrappers but realized that perfectly capable ones were available  
within the distribution itself, so I didn't waste the effort!

chris




More information about the Biopython mailing list