biocore / biom-format

The Biological Observation Matrix (BIOM) Format Project
http://biom-format.org
Other
90 stars 95 forks source link

Upgrade to biom 2 #514

Closed george-weingart closed 10 years ago

george-weingart commented 10 years ago

Hello, We are in the process of implementing changes in some of our applications to support biom 2 and have a few questions about it.

  1. Where can I find upgrade instructions?
  2. Our code looks as follows: Is biom2 backlevel compatible or will we have to modify the code for the biom2 upgrade? BiomTable = table_factory(arrData, lSampNames, lObservationIds, lMetaData, constructor=SparseOTUTable)

Thanks! George Weingart, PhD

josenavas commented 10 years ago

Hey @george-weingart

There has been some API changes. In terms of parsing your tables, it shouldn't be any problem, as BIOM will detect the different versions and change them. In terms of the API changes, is more numpythonic and I'd recommend to check our new detailed documentation, which also includes some examples here

However, I'd recommend to use the latest development version. We are planning to do another release of BIOM soon, in which we slightly have changed the HDF5 metadata representation. The current state of the development version is pretty stable, and there are not going to be any API changes.

Hope this helps!

george-weingart commented 10 years ago

Hello Jose, First, Thanks so much for your prompt response! Could I you address the following specific questions, that will help us a lot! Thanks! George Weingart PhD

QUESTIONS:

  1. You recommend using the latest development version: Where exactly can I find it and what are the installation instructions (Please bear in mind we have biom 1.0 installed - does it need to be removed for the 2.0 install?)
  2. Our code looks as follows: Is biom2 backlevel compatible or will we have to modify the code for the biom2 upgrade? BiomTable = table_factory(arrData, lSampNames, lObservationIds, lMetaData, constructor=SparseOTUTable)

THANKS for your help.

george-weingart commented 10 years ago

Hello Jose, Can i trouble you to address the issue above? Thanks! George Weingart, PhD

josenavas commented 10 years ago

Hi @george-weingart

Ooops, sorry for the delay. You can follow the installation instructions here. It says that the hdf5 dependency is optional, but I'd suggest to have it in case of generating big tables.

I'd also suggest to remove biom 1.0 prior installing the dev version, so you don't get version conflicts.

The table_factory method have been removed. You should instantiate the Table directly. You can see the details here

george-weingart commented 10 years ago

Hi Jose,

Is there any way you might reinstate the table factory method so that we don't have to change our code? Because that means that when I distribute our application, I have to check in the background if I am running biom1 or 2 and according to that, invoke different code. Ugly!

Thanks!

On Mon, Jul 28, 2014 at 10:46 AM, josenavas notifications@github.com wrote:

Hi @george-weingart https://github.com/george-weingart

Ooops, sorry for the delay. You can follow the installation instructions here http://biom-format.org/#installing-the-biom-format-project. It says that the hdf5 dependency is optional, but I'd suggest to have it in case of generating big tables.

I'd also suggest to remove biom 1.0 prior installing the dev version, so you don't get version conflicts.

The table_factory method have been removed. You should instantiate the Table directly. You can see the details here http://biom-format.org/documentation/generated/biom.table.Table.html#biom.table.Table

— Reply to this email directly or view it on GitHub https://github.com/biocore/biom-format/issues/514#issuecomment-50372437.

josenavas commented 10 years ago

Hi @george-weingart

Although the tables generated by BIOM 1.0 are readable by BIOM 2.X, the code is NOT back-compatible. That means that you're going to change the code anyways, i.e. supporting BIOM 1.0 and 2.0 is going to be almost impossible.

adamrp commented 10 years ago

@george-weingart There are no plans to reinstate the table factory method, I'm sorry. Instead of checking which biom version is available and running different code, why not just make biom 2 a dependency of your application? Biom 1 tables can be converted to biom 2 tables, so it shouldn't pose too much of a problem for your users.

adamrp commented 10 years ago

Closing, as there have no further comments after the most recent suggestions.