colomoto/colomoto-docker

New tool: BNS

Closed this issue · 6 comments

The format is already supported by bioLQM, source and some binaries available in https://people.kth.se/~dubrova/BNS/bns_v1.3.zip

I added a conda package for bns, but it still lacks a python wrapper for proper integration.

See https://anaconda.org/colomoto/bns

Python wrapper should be rather easy to do indeed, except that the output will need some work to be parsed (associate the values to the right components). Other than that we could use the same output as reachable_attractor for pint https://loicpauleve.name/pint/doc/api.html#pypint.model.Model.reachable_attractors as the type of information seems identical.
By the way, what is the name of the format for biolqm output?
Where do we put the bns python module: in a dedicated repository, in colomoto-jupyter, or elsewhere?
I can make a first proposal once we agree on the above questions.

Roadmap

  • conda package for binaries
  • Python API
  • Example notebook

BNS uses the CNET format: http://colomoto.org/biolqm/doc/format-cnet.html

We will also need a wrapper for boolsim, I would go for a separate repository with at least these two wrappers, and separate conda packages for each of them.

And yes, we also need a more integrated API for (lists of) states and patterns. It should make it easy to define them from python dict, panda series or raw numpy arrays (which is what I use when I need to deal with large sets of results coming from bioLQM: a raw java array can be turned into a numpy array pretty well.

Now that boolsim has its own python wrapper in a separate boolsim-python repository, I think we can do the same with a bns-python repository. Once we have this, I will add to_bns methods to ginsim and biolqm.

I think that the conda recipes for the wrapper should be part of the same repository, maybe the one for the binary as well if we have a clean way to automate building and uploading to anaconda of only the updated part.

A simple Python wrapper is now in https://github.com/colomoto/bns-python and the conda packaged is available.

For now, the result lacks components names. Based solely on a CNET file and the BNS output, I don't think we can reconstruct the node names, except by parsing CNET and guessing them from comments, which should work with files generated by bioLQM but may fail randomly otherwise :/

Maybe we can provide an ordered list of names as optional parameter when we come from bioLQM?