Team:BU Wellesley Software/Notebook/JenhanNotebook

From 2011.igem.org

(Difference between revisions)
Line 194: Line 194:
I need to finish up the fabdash version of Clotho and enable the connection system.  It's only tuesday, and so I have high hopes for the week.
I need to finish up the fabdash version of Clotho and enable the connection system.  It's only tuesday, and so I have high hopes for the week.
 +
 +
<h5>'''(7/19)'''</h5>
 +
Curiosity got the better of me today.  While I can't say that I wrote all that much code for the team today, I read and learned a lot about: strand displacement, and a molecular automaton that played tic tac toe. All of this reminds me of why I pursue science =].
 +
 +
 +
<h5>'''(7/26)'''</h5>
 +
I started playing around with the [[http://jung.sourceforge.net/ | Jung]]
 +
 +
<h5>'''(8/11)'''</h5>
 +
 +
<h5>'''(8/20)'''</h5>
 +
 +
<h2>JHU Collaboration </h2>
<h2>JHU Collaboration </h2>

Revision as of 03:16, 29 September 2011

BU-Wellesley iGEM Team: Welcome


Jenhan's Notebook

Contents

Daily Updates

(6/3)
Today was the Clotho boot camp. Trying to build an application on the fly revealed how much I still had to learn about the infrastructure. Most of what I'm missing relates to the Clotho connection and how an object is persisted. I learned about the existence of a transient collection.

I also spent the better part of the boot camp tracking down an error that caused the Sequence View to crash. Turns out it was just an xml error. Xml errors and build file errors combined make up the vast majority of errors that I've encountered while building Clotho.

With the Sequence View stabilized in Clotho Biofab Edition, I can begin looking for quick conversions to a TopComponent. I think I should be able to grab the Content Pane of the JFrame and then use that to populate the TopComponent. Once I confirm this works, then I can begin completing the Sequence View. There is a lot remaining to be done and learned.

(6/7)
Still quite a bit confused about what everyone is doing. Chenkai gets back tomorrow and so will Swapnil; hopefully the comp team can have a meeting to coordinate a bit better. We need to agree on some things about Clotho architecture. I'm learning a lot about swing, and at the rate things are going, I can actually get the Sequence View done pretty soon. Next thing on my list is to work on the actual ide interface or maybe spreadedit features. Sequence View depends on spreadit features right now, but I might change that. I'm not quite sure about how encapsulated an app should be.
(6/10)
Presented my ideas for the new ClothoTool definition to the comp team today; they were generally receptive.

Main points:

  1. drag and drop
  2. size constraints
  3. jframe implementation
  4. windowing compatibility*

I will be drafting a formal proposal for Doug soon, and so more to follow next week.

(6/13)
Still felling like I'm still learning java swing fundamentals: highlighting, caret positioning, etc. A little bland, but the Sequence View should be in working order in a day or two.
(6/15)
Finished Sequence View today. Admittedly, there is more that could be added. However, the core of the challenge, highlighting features/orfs, has been implemented in full. The code has been rigorously tested and it is bullet proof. I want to present the app to the wetlab team but Traci is at sb 5.0 I think. I think I will consider following the instructions to deploy a clotho app. Also, need to make my wiki look nicer; Janoo has incited a wiki war.
(6/16)
I drafted my proposal for a new format for ClothoTools today: Media:New_Clothotool_Specifications.pdf. I will be polishing the contents and using this document to create a presentation. I hope to present this to the the Wellesley team. Maybe they can optimize the interface or something. I'm still unsure what Wellesley will contribute to the team, and so I am looking forward to the upcoming meeting on the 27th.

Asides from the working on the proposal today, I spent a decent chunk of time learning how to produce proper wiki pages. When this notebook is complete, I hope it is something that I can be reasonably proud of.

The team some time coming up with a new name for a tool current called the Plasmid Architecture Design Suite (or PADS...). I am a fan of Flipper, but I'm not sure that would be serious enough. I also suggested IDEAS (Invertase DEsign Alogrithm Suite). I have a sneaking suspicion that Swapnil's suggestion of Kirigami will win though. [http://en.wikipedia.org/wiki/Kirigami Kirigami] is a form of Japanese papercraft.

(6/17)
Rewrote the DocumentListener for Sequence View. For now, I think the sequence view is finished:

Sequenceview.JPG

I fixed a lot of highlighting issues, and I would argue that the highlighting behaves better than comparable features in ApE. I plan on writing documentation in the wiki over the weekend. I should probably also comment the code.

On a different note, I had a good conversation with Viktor today about the Clotho use case. I feel like I need to have more similar conversations to better understand where Clotho should go.

(6/20)
Doug came back to Boston today; just in time to deliver what he claims to be enough work to make all of us nervous about taking vacations. Luckily for me, Boston is my vacation in a sense.

I finished a number of upgrades to Sequence View today along with a number of bug fixes. I also finished the accompanying [http://wiki.bu.edu/ece-clotho/index.php/Sequence_View documentation]. The tool should be ready for testing by the wet lab team.

I still need to make a presentation and generate a timeline for tomorrow's meeting. I still need to decide what I would like to do next month. Most likely I'll work on cleaning up the ide dashboard or fabdash. I want the dry lab team to start using the fabdash exclusively. I hope to convince the rest of the team about my vision of Clotho. I should probably clean up the Tool App Browser a bit, so I can begin to convince Doug that the older dashboard is unnecessary.

For tomorrow, I'll be presenting this powerpoint. A pdf version is provided File:6-20JointMeeting.pdf

(6/21)
I will be covering the following points today at the joint meeting between the wetlab and the drylab team:

Current Work

  • Sequence View- a tool for visualizing DNA sequences: wiki
  • Planning new Clotho Interface
  • Learning Java Swing- graphic user interface design

How it Fits I am writing code for the following reasons:

  • iGEM software tools are Clotho apps
  • Wetware team will use Clotho tools to make work easier
  • No one will use a tool if its difficult to use

Timeline

  • 6/20-6/24: stabilize new IDE dashboard
    • Revise dashboard/clotho tool plans based on feedback
  • 6/27-7/1: begin implementing new ClothoTool format in Sequence View + drag/drop inventory tab
  • 7/4-7/15: functionalize/stabilize drag/drop, incorporate into Spectacles

What I Need from the Team

  • Feedback
  • Suggestions
  • Guidance

The last three bullet points summarizes my approach to iGEM. I am here to listen to and learn from others. Although I feel fortunate that my qualifications earned me a place on the team, I hope I can expand beyond my existing skill set; I hope I can grow to be an even greater asset to the team. On that note, I am somewhat curious about the wetlab work. Time permitting, I would like to visit the wetlab more often.

(6/22)

At the dry lab meeting today Doug mentioned that I should do the following:

  1. Finish the Sequence View- Doug wants the tool to be deployed to the wetlab and the anderson lab as oon as possible. Remaining things to do for the Sequence View:
    1. Fix dialog boxes
    2. Write documentation, emphasize why Sequence View is a superior tool
    3. Import ApE features
    4. waiting dialog
  2. Clotho data management
    1. remote vs local connection
    2. Draft proposal about deleting from database
  3. I need to design a primer design tool within a week. I should plan to talk to the wetlab either tomorrow or on Friday.
  4. Time permitting, I may work on a J5 client that interacts with Spectacles

I also need to find time to implement parts of my proposal for a better Clotho tool. I've drafted a rough proposal here: Media:New_Clothotool_Specifications.pdf

Swapnil mentioned an interesting invertase puzzle today. A way to design a sort of sorter. For a given sort of inputs, this sorter would produce one result. All other inputs would produce a different defined result. This is related to prior work done in this [http://www.sciencemag.org/content/324/5931/1199.abstract paper]. It looks fun.

(6/29)

It's been about a week since I've updated this. Since then, the Sequence View has grown in the following regards:

  • added ability to import genbank and ape features
  • added melting temperature and GC content calculations
  • tested deployment both as an exe install file and a .clo file
    • ORF highlighting doesn't work in the .clo file for some reason
  • cleaned the code and removed unnecessary classes and imports

I have been in touch with Prof Anderson at UC Berkeley and Noah Young from Johns Hopkins. Hopefully both parties will begin using the Sequence View. I will work to clean up the documentation and code.

I'll be moving onto a new project this week. I still need to wait to talk to Swapnil; I expect it to be an interesting conversation. Asides from this, I'll be working on straightening out the Clotho connection system.

(7/12)

In recent days I have been working on the Clotho interface and a primer design tool. I have been meeting with the wetlab regularly to get their feedback on the tool. So far, I have received positive feedback on my designs. I'm moving forward to doing blast analysis for dimers. Once this is completed, the tool will be fully functional.

I need to finish up the fabdash version of Clotho and enable the connection system. It's only tuesday, and so I have high hopes for the week.

(7/19)

Curiosity got the better of me today. While I can't say that I wrote all that much code for the team today, I read and learned a lot about: strand displacement, and a molecular automaton that played tic tac toe. All of this reminds me of why I pursue science =].


(7/26)

I started playing around with the Jung

(8/11)
(8/20)


JHU Collaboration

This summer, Boston University had the opportunity to reach out and collaborate with Johns Hopkins University. The iGEM team from Johns Hopkins University was interested in building a few Clotho applications this summer; these tools, which would have added a number of capabilities such as ssh compatibility with Clotho databases as well as superior MIT registry queries. Through direct correspondence in email, as well as face to face meetings via teleconferencing tools, we were able to provide them support setting up their code base as well as development advice. JHU has begun using the new Clotho interface developed this summer at Boston University. The interaction with HUH was favorable for both teams in that we have both developed useful, nontrivial tools that can be used by the synthetic biology community. Increased development and proliferation of the Clotho platform will encourage further development in Clotho. We have hopes that Clotho, will increasingly become the platform of choice for biologists in need of software tools.

Berkeley Collaboration

Boston University reached out to UC Berkeley's iGEM team this summer for a mutually beneficial collaboration. UC Berkeley's team hopes to convey their wet lab projects to a diverse panel of judges and audience members at iGEM with an animation of molecular events. The animated video is meant to help the visualize the key elements of the UCB project, this is especially helpful for the computationally oriented persons in the audience, many of which do not have a strong understanding of biochemistry. Boston University's computational iGEM team offered advice on how UCB could clarify their presentation; wet lab team members from BU also chimed in as well. In return, the wet lab team at UCB rigorously tested the software produced by Boston university, offering comments on usability and reporting bugs. Mutually beneficial interaction between UCB and BU no doubt helped both of our teams achieve a higher degree of excellence before the iGEM Jamboree.

Useful code snippets

Use the following to convert a jframe to a topComponent private void topComponentViewButtonActionPerformed(java.awt.event.ActionEvent evt) {

   guiContentPane = (JComponent) this.getContentPane();
   guiRootPane = this.getRootPane();
   SwingUtilities.invokeLater(new Runnable() {
       @Override
       public void run() {
           TopComponent tc = new TopComponent();
           tc.setLayout(new BorderLayout());
           JScrollPane sp = new JScrollPane(guiContentPane);
           tc.add(jMenuBar, BorderLayout.NORTH);
           tc.add(sp, BorderLayout.CENTER);
           tc.setName("Sequence View");
           tc.open();
           tc.requestActive();
       }
   });
   this.dispose();}

Use the following to add actions to buttons someButton.addActionListener(new java.awt.event.ActionListener() {

    public void actionPerformed(java.awt.event.ActionEvent evt) {
       someButtonActionPerformed(evt); //implement in same cass as someButton
    }
    });

Use this to run things in the background thread:

       new SwingWorker() {
           @Override
           protected Object doInBackground() throws Exception {
               //Insert todo code
               return null;
           }
       }.execute();

Found this online, useful for implementing copy/paste:

// If a string is on the system clipboard, this method returns it;
// otherwise it returns null.
public static String getClipboard() {
   Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
   try {
       if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
           String text = (String)t.getTransferData(DataFlavor.stringFlavor);
           return text;
       }
   } catch (UnsupportedFlavorException e) {
   } catch (IOException e) {
   }
   return null;
}
// This method writes a string to the system clipboard.
// otherwise it returns null.
public static void setClipboard(String str) {
   StringSelection ss = new StringSelection(str);
   Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
}

Good example of keybinding in JTextComponents

   JTextComponent.KeyBinding[] newBindings = {
       new JTextComponent.KeyBinding(
         KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),
         DefaultEditorKit.beepAction),
       new JTextComponent.KeyBinding(
         KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK),
         DefaultEditorKit.beepAction),
       new JTextComponent.KeyBinding(
           KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK),
           DefaultEditorKit.beepAction)
     };
           
   Keymap k = myTextField.getKeymap();
   JTextComponent.loadKeymap(k, newBindings, myTextField.getActions());

Use this to add a right click menu in clotho

_lister.addMouseListener(new MouseAdapter() {
           @Override
           public void mouseClicked(MouseEvent e) {
               if(e.getClickCount()==2) {
                   try {
                       ObjBase obj = (ObjBase) _lister.getSelectedValue();
                       obj.launchDefaultViewer();
                   } catch(Exception ex) {
                   }
               }
           }
       });

Use this to change topComponent view position

@Override
public void open() {
       Mode mode = WindowManager.getDefault().findMode("tools");
       if (mode != null) {
               mode.dockInto(this);
               super.open();
       }
}
explorer - the default position of the NetBeans IDE's Projects window (typically, left side)
properties - the default position of the NetBeans IDE's Properties window (typically, right side)
leftSlidingSide - the TopComponent window will be available as a button on the left sidebar
rightSlidingSide - the TopComponent window will be available as a button on the right sidebar
bottomSlidingSide - the TopComponent window will be available as a button on the bottom bar
editor - the default position of the NetBeans IDE's Source Editor window (typically, center)  - INTViewer uses this
window position so please refrain from selecting this for new top components.
output - the default position of the NetBeans IDE's Output window (typically, bottom)
tools - an INTViewer defined mode that will position the window at the lower left (typically where the Navigator window is located)

Use this to do keybindings

       jtf.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), "search");
       jtf.getActionMap().put("search",
               new AbstractAction("search") {
                   @Override
                   public void actionPerformed(ActionEvent evt) {
                       startSearch();
                   }
               });
   }