dennisegen / MOST

MOST - Metabolic Optimization and Simulation Tool
3 stars 4 forks source link

Local and Remote File Access #15

Closed mentatpsi closed 10 years ago

mentatpsi commented 11 years ago

I was thinking, I had a conversation with Prof Egen quite awhile ago about the prospect of a communal repository of metabolic models. There was also a discussion as to how it would look.

When Xiaowei spoke of the prospect of file matching, I had thought further about it. I got to thinking today and realized it could be an interesting to have a section on MOST to the right where you would have a tree like structure. There would be a Local start node and a Server start Node (which could eventually be called community, or any other appropriate title). The local node would underneath be populated by several nodes based on either file types, or perhaps specific organism categories.

A LocalFiles class would be responsible for transversing the local directory of the MOST and creating an arraylist object which would contain the list of local files, such that: lFiles = new LocalFiles(current directory);

lFiles.SBML.getAll() would generate a list of all SBML files in the current directory. In this fashion such a code would be able to populate the local node. From there, accessing any file would simply involve clicking on a file listed there, and then hitting a "Load" button.

The server end could be gotten to later, but I've found some code for downloading files off of a remote server.

The LocalFiles class would also support entering other directories. I've done java code where I've transversed directories before and created tree like GUI's, so I could likely manage something like this, although I've usually created gui's using the NetBeans interface.

Next, with the settings class developed, it could likely keep track of any new directories added to local files, as well as any server addresses to be populated upon loading MOST.

I could attempt to work on this as well during the break and get a standalone GUI for such a task.

jimkell commented 11 years ago

I like your idea. We could put tabs on the current panel on the right and have one tab that says Optimize, and another tab for your tree. I don't know what you would label that tab. Or if there is too much to fit in the panel, we could tab the entire GUI and have a tab for the tree.   Jim

--- On Thu, 11/15/12, Shay Maor notifications@github.com wrote:

From: Shay Maor notifications@github.com Subject: [MOST] Local and Remote File Access (#15) To: "dennisegen/MOST" MOST@noreply.github.com Date: Thursday, November 15, 2012, 6:25 PM

I was thinking, I had a conversation with Prof Egen quite awhile ago about the prospect of a communal repository of metabolic models. There was also a discussion as to how it would look. When Xiaowei spoke of the prospect of file matching, I had thought further about it. I got to thinking today and realized it could be an interesting to have a section on MOST to the right where you would have a tree like structure. There would be a Local start node and a Server start Node (which could eventually be called community, or any other appropriate title). The local node would underneath be populated by several nodes based on either file types, or perhaps specific organism categories. A LocalFiles class would be responsible for transversing the local directory of the MOST and creating an arraylist object which would contain the list of local files, such that: lFiles = new LocalFiles(current directory); lFiles.SBML.getAll() would generate a list of all SBML files in the current directory. In this fashion such a code would be able to populate the local node. From there, accessing any file would simply involve clicking on a file listed there, and then hitting a "Load" button. The server end could be gotten to later, but I've found some code for downloading files off of a remote server. The LocalFiles class would also support entering other directories. I've done java code where I've transversed directories before and created tree like GUI's, so I could likely manage something like this, although I've usually created gui's using the NetBeans interface. Next, with the settings class developed, it could likely keep track of any new directories added to local files, as well as any server addresses to be populated upon loading MOST. I could attempt to work on this as well during the break and get a standalone GUI for such a task. — Reply to this email directly or view it on GitHub.

mentatpsi commented 11 years ago

Thanks.

My thought was that it would be a frame that would sit to the right of MOST although it would be attached. I wasn't sure whether the best route would be it being persistently to the right, or something whose presence is activated and deactivated by some button, but that seemed like it would be overly complicated given the necessity to have dynamic window sizing.

Apologies for the lack of knowledge on appropriate terminology, been awhile since i worked with Swing.

I was wondering if me setting up a standalone GUI would help to incorporate it into MOST. I've never designed any GUI from by coding from scratch and have relied on NetBeans mostly for constructing them. So I'm not sure if designing some frames and the tree builder would be of benefit or if i should only work on the back end.

mentatpsi commented 11 years ago

Basically it would be similar to a file hierarchy that would be just to the right of most. Here's some code I found which reflects it nicely,

http://www.java2s.com/Tutorial/Java/0240__Swing/JTreeDisplayingtheFileSystemHierarchyUsingtheCustomTreeModel.htm

jimkell commented 11 years ago

If you right click the bottom pane there is a PopOut menu item. Click on it and a window opens. Maybe something similar to this would work on the right panel.   Jim

--- On Thu, 11/15/12, Shay Maor notifications@github.com wrote:

From: Shay Maor notifications@github.com Subject: Re: [MOST] Local and Remote File Access (#15) To: "dennisegen/MOST" MOST@noreply.github.com Cc: "jimkell" kelljim0414@yahoo.com Date: Thursday, November 15, 2012, 8:55 PM

Thanks. My thought was that it would be a frame that would sit to the right of MOST although it would be attached. I wasn't sure whether the best route would be it being persistently to the right, or something whose presence is activated and deactivated by some button, but that seemed like it would be overly complicated given the necessity to have dynamic window sizing. Apologies for the lack of knowledge on appropriate terminology, been awhile since i worked with Swing. I was wondering if me setting up a standalone GUI would help to incorporate it into MOST. I've never designed any GUI from scratch and have relied on NetBeans mostly for constructing it. So I'm not sure if designing some frames and the tree builder would be of benefit. — Reply to this email directly or view it on GitHub.

mentatpsi commented 11 years ago

Actually, that got me thinking... the right most pane at current is the recent optimization and simulations. Perhaps it would be possible to do the following:

Recent __current session optimizations and simulations
Local __SBML
__CSV

Servers |__Server 1 | |SBML |__Server 2

mentatpsi commented 11 years ago

Of course, sbml and csv can be changed to particular organism categories -> organism -> file type -> file.

I would imagine this is possible by parsing using jsbml to find the metabolic model represented by the sbml document. However, examining some of the other source types, doesn't seem like such a task would be easy without some database for matching models to known ones. Not to mention, multiple sbmls can have the same base organism. So perhaps it's best to stick with file formats -> file name for the tree hierachy.

mentatpsi commented 11 years ago

I'll be doing most of the work for it under this model: https://github.com/mentatpsi/MOST/blob/e0cd8bb28d6c6543c8ef0e777b15192dc7e62bca/src/edu/rutgers/MOST/presentation/Tree.java

jimkell commented 10 years ago

Since this thread is old and we are not adding any new features before the first release of MOST, this issue will be temporarily closed.