merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
415 stars 142 forks source link

Using a basic order instead of a tree for inner organization #350

Closed tdelmont closed 7 years ago

tdelmont commented 8 years ago

Hi,

I am now working on a particular genome, and I would like to keep the order of genes (a gene is a leave) and display coverage values across environmental samples! Exciting.

Ozcan, I don't know if this is difficult to implement but it would be great if you can manage to make it work :)

tom

meren commented 8 years ago

We had talked about this before, Ozcan. We use a newick tree to organize everything, but what if we didn't have a tree?

It would have been great if anvi'o could order items in the view data alphabetically if no tree is provided :)

So instead of looking like this:

image

It will look like this:

image

meren commented 8 years ago

Maybe there should be a callback function for samples order? A one that would return (None, newick) when tree is present, and (simple_order, None) when there is no tree (and simple order would be the order of items). Open to more elegant ideas :)

ozcan commented 8 years ago

I have thought about this feature, It is tricky but possible and I have started to do some changes, but It needs some core changes since I have built everything top of tree data structure ( even the filename is treelib.js 😄 ), So It is better to keep everything in a new branch for now.

And at a beginning I am aiming to use the order in view data, but if I can finish that, We can extend the scenarios like alphabetical ordering, user provided list etc.

meren commented 8 years ago

Yay :)

Yes, this will be a fundamental change in many ways, but I think it is a fun challenge. Thank you very much for looking into this.

I also agree that starting with the order in the view data is very appropriate. We can expand from there once everything else is in place.

Please let me know if there is anything I can help!

meren commented 8 years ago

Where are we with this? :)

ozcan commented 8 years ago

Hey Meren, This feature is ready i forgot to link commits to this issue sorry :/ , So the only thing we need is /tree/xxxx endpoint that returns json array instead of newick string.