KarrLab / obj_tables

Tools for creating and reusing high-quality spreadsheets
https://objtables.org
MIT License
8 stars 2 forks source link

Retain order of tables in multi.csv or multi.tsv file #151

Closed liebermeister closed 4 years ago

liebermeister commented 4 years ago

Hi Jonathan,

I noticed that, when importing a multi-table tsv ObjTables file, the tables become reordered alphabetically. Can this be changed, to keep the original order? (I understand that alphabetical order is a good solution if the tables come from multiple tsv files).

Thank you!

Best, Wolf

jonrkarr commented 4 years ago

ObjTables doesn't keep track of this order. For XLSX files, the class order is intended to come from the schema so that datasets can printed out in a canonical order.

jonrkarr commented 4 years ago

I've changed ObjTables to retain the order in which models are defined in tabular-formatted schemas. This is the order that will be used to canonically-print datasets. Python developers can customize this order (as we have in WC-Lang and WC-KB).