biom-format/biom-format — pull request #161 by gregcaporaso (2013-08-14 18:16:45+00:00)
Title: Pyqi conversion

A working version of a pyqi-based BIOM command.

This PR includes:
* stubbing out of the directory structure that we'll want for storing biom commands and interfaces
* a ``SummarizeBiomTable`` object (derives from ``pyqi.core.command.Command``)
* a config file for a ``print_biom_table_summary`` optparse interface
* a ``load_biom_table`` input handler that will be generally useful for converting input biom filepaths to biom tables

To use the print_biom_table_summary optparse interface, you should do the following:

create a ``~/.pyqi/biom`` file with the following lines:

```
[driver]
cfg_base=biom.interfaces.optparse.config
```

then, if ``$BIOM`` points to your top-level biom-format directory, and ``$PYQI`` points to your top-level ``pyqi`` directory:
```
ln -s $PYQI/scripts/pyqi $BIOM/bin/
export PATH=$BIOM/bin/:$PATH
```

You should then be run:
```
biom print_biom_table_summary -h
```

Outstanding issues:
* ``--suppress_md5`` option is missing from the optparse interface
* ``--output_fp`` is required, where previously the default behavior was to write to stdout

Question: my class name ``SummarizeBiomTable`` doesn't map directly onto my interface name ``print_biom_table_summary``. I think this is OK (it allows more than one interface per command, in the case where we might want, say, a couple of simplified interfaces for a single command. Also, in this case it seems weird to call my class ``PrintBiomTableSummary``, because it's not printing something, but rather returning a string in the result dictionary. @wasade and @jrrideout, what do you guys think of this?