srnas / barnaba

Analyse Nucleic Acids Structure and Simulations with baRNAba
GNU General Public License v3.0
38 stars 15 forks source link

Allow using barnaba command line from python #39

Closed GiovanniBussi closed 5 years ago

GiovanniBussi commented 5 years ago

This is an iteration of #28. I think I fixed the last issue so that it could be merged.

The goal of this change is to allow users to do the following

import barnaba.commandline
barnaba.commandline.main(["ENM","--pdb","test.pdb")

This would allow using from python the features that are implemented in the command line interface. It will thus allow to add nosetests for the command line interface. Most importantly, using command line tools from python allows to speedup the processing of multiple files (bin/barnaba is very slow at startup due to mdtraj import).

Changes are pretty small, and are better seen looking at the individual commits:

codecov-io commented 5 years ago

Codecov Report

Merging #39 into master will decrease coverage by 11.22%. The diff coverage is 24.75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #39       +/-   ##
=========================================
- Coverage   67.22%    56%   -11.23%     
=========================================
  Files          13     14        +1     
  Lines        1968   2675      +707     
=========================================
+ Hits         1323   1498      +175     
- Misses        645   1177      +532
Impacted Files Coverage Δ
barnaba/commandline.py 24.75% <24.75%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 66fbb82...fca8f40. Read the comment docs.