nrnb / GoogleSummerOfCode

Main documentation site for NRNB GSoC project ideas and resources
114 stars 38 forks source link

Integrating CAD and CAM tools for automating a synthetic biology workflow #99

Closed eoberortner closed 6 years ago

eoberortner commented 6 years ago

Background

Automation in the field of synthetic biology depends, among others, on CAD tools for designing novel biological systems, and CAM tools for building the designed systems.

This project encompasses the following three software artifacts: (i) SBOLDesigner (http://www.async.ece.utah.edu/SBOLDesigner) is a CAD tool for creating and manipulating the sequences of genetic constructs using the Synthetic Biology Open Language (SBOL) 2.0 data model. (ii) SBOL is a community-driven data format for exchanging design-, and build-specific information among software tools in the synthetic biology domain. (iii) The Build-OptimizatiOn Software Tools (https://boost.jgi.doe.gov) is a repertoire of CAD/CAM tools for minimizing the cost and time for synthesizing DNA sequences with the maximal success rate of synthesis.

Goal

The goal of this project is to integrate both tools, SBOLDesigner and BOOST. A common synthetic biology design-build workflow drives the achievement of this project's objectives. Specifically: 1) The synthetic biologist designs a novel system using SBOLDesigner. Here, we will decide collaboratively on a cutting-edge biological system. 2) After the design is finished, the synthetic biologist can (optionally) click "Prepare for Synthesis" in SBOLDesigner and selects among various options, such as target host, or DNA synthesis vendor. 3) SBOLDesigner sends the designed sequences (encoded in SBOL) and the build-specific information to BOOST. 4) BOOST prepares the sequences for synthesis, including verification against synthesis specific criteria, modification of complex region according to the genetic code, fragmentation of large sequences depending on max. length of synthesis and desired assembly protocol. 5) BOOST returns the synthesis-ready sequences to SBOLDesigner including a log of the performed actions (again, encoded in SBOL). 6) SBOLDesigner displays the information to the user, who can then (i) accept the performed changes, (ii) re-submit the sequences to BOOST using alternative parameter values, or (iii) ignore BOOST's results

By achieving the objectives, the common synthetic biology workflow will be fully automated.

Difficulty Level 2

The difficulty level was calculated based on the following criteria: 1) Displaying "Build" parameters on the SBOLDesigner UI (Ideas can be gathered from the BOOST Web UI) 2) Encoding the "Build" parameters as well as the log of the BOOST actions using SBOL. 3) Displaying the BOOST results on the SBOLDesigner UI.

Skills

Java, JSON, RESTful APIs (essential) SBOL (nice to have)

Public Repository

SBOLDesigner: https://github.com/SynBioDex/SBOLDesigner BOOST is not an open source software project. The BOOST Web UI (incl. a documentation of the BOOST APIs) is available at https://boost.jgi.doe.gov

Potential Mentors

Ernst Oberortner Chris J. Myers Michael Zhang

Contact

Ernst Oberortner Chris J. Myers Michael Zhang

prem0862 commented 6 years ago

@eoberortner I went through documentation of Jersey and planning to invoke BOOST APIs in the following manner (for now): I will implement the BOOST APIs in a new project (not in the original SBOLDesigner project) and will try to pass all the parameter by hardcoding rather than creating GUIs. These are the temporary plan, once I will have a clear understanding then it would be easy for me to implement in the SBOL project. Please provide your views on it.

At the time of Nona talk, the Implementation guide for BOOST APIs was not available ( as much I am able to recollect it). Is it available for now? If yes, please provide me, It will help me a lot. Otherwise, I can also work on this (if time permits). Thanks

eoberortner commented 6 years ago

@Prem0707 please have a look at the code in https://github.com/eoberortner/BOOST-REST-Client It'd be great if you could re-use and extend the code as well as integrate it into SBOLDesigner.

Specifically have a look into the DemoClient https://github.com/eoberortner/BOOST-REST-Client/blob/master/src/test/java/gov/doe/jgi/boost/client/DemoClient.java. Please provide your own BOOST JWT for instantiating the BOOSTClient (line 34). You can find your BOOST JWT at https://boost.jgi.doe.gov (under "Account" after login).

Please let me know if you run into any issues on getting the DemoClient to run on your computer. Thanks!

prem0862 commented 6 years ago

@eoberortner Thanks for the resources. I will inform you if I will face any issue.

prem0862 commented 6 years ago

@eoberortner Is it possible ? Please verify this. Thanks For the login part, I am thinking that we can create a simple login UI in SBOLDesigner and from that we can invoke login API which results in status and boost-jwt so there will be no need to move on BOOST Login Page but for signup option we can redirect the user to the BOOST web page. Please provide your views at it

that sounds like a nice idea! please let me double-check though, since BOOST uses a single sign-on system (developed at JGI) for login. I need to make sure that this single sign-on system provides proper APIs.

eoberortner commented 6 years ago

Hi @Prem0707 We definitely need a BOOST authentication UI in SBOLDesigner. Everything that was said earlier is still true. It would be great, though, if the user can either authenticate by entering username/password or by entering the user's BOOST JWT.

Since @cjmyers and @michael13162 are the main developers and owners of SBOLDesigner, it would be great to hear their opinion about (i) the alternatives regarding BOOST authentication, (ii) how the UI should look like (I'd recommend keeping consistency w/ the SBOLDesigner UI), (iii) where the "Button" that opens the BOOST Authentication UI should be placed, and (iv) how the entered information (username/password or BOOST-JWT) should be stored in SBOLDesigner.

ad (iv) I'd recommend storing the information somehow since otherwise the user will have to enter the BOOST username/password or JWT every time when BOOST is needed.

Thanks!

cjmyers commented 6 years ago

I suggest we borrow from the code @michael13162 already wrote for SynBioHub login and try to use some of the same ideas.

The way it works with SynBioHub is that after login information is sent, the server sends back a key. This key is then stored locally in SBOLDesigner for subsequent queries to SynBioHub. On the server side, SynBioHub accepts this key as authentication. Currently, this key is valid until SynBioHub is restarted, but a better approach would be if the key expires after some amount of time has elapsed.

@eoberortner does BOOST have any sort of API key mechanism like this? If not, how difficult would this be to add? Would you see this as something you should do or should be part of the GSoC project?

On Apr 18, 2018, at 11:34 AM, eoberortner notifications@github.com wrote:

Hi @Prem0707 https://github.com/Prem0707 We definitely need a BOOST authentication UI in SBOLDesigner. Everything that was said earlier is still true. It would be great, though, if the user can either authenticate by entering username/password or by entering the user's BOOST JWT.

Since @cjmyers https://github.com/cjmyers and @michael13162 https://github.com/michael13162 are the main developers and owners of SBOLDesigner, it would be great to hear their opinion about (i) the alternatives regarding BOOST authentication, (ii) how the UI should look like (I'd recommend keeping consistency w/ the SBOLDesigner UI), (iii) where the "Button" that opens the BOOST Authentication UI should be placed, and (iv) how the entered information (username/password or BOOST-JWT) should be stored in SBOLDesigner.

ad (iv) I'd recommend storing the information somehow since otherwise the user will have to enter the BOOST username/password or JWT every time when BOOST is needed.

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nrnb/GoogleSummerOfCode/issues/99#issuecomment-382467705, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD97l6O9H0DYVy7R6me970B3lNS5Cjks5tp3kQgaJpZM4Q_wk6.

eoberortner commented 6 years ago

Code reuse is highly recommended! Please, could you provide @Prem0707 pointers to the code?

@cjmyers BOOST uses JSON Web-Token (JWT) as authentication mechanism. Sending a "login" request to BOOST (i.e., a request that contains username and password) returns the user's JWT. In addition, a registered BOOST user can see her/his JWT on the BOOST Web UI (after login at https://boost.jgi.doe.gov under "Account"). The user's JWT needs to be incorporated into the header of each request being sent to BOOST. Do you think this is sufficient? Or do we need something else?

cjmyers commented 6 years ago

This sounds perfect and very similar, if not better, then what we do with SynBioHub.

@michael13162 please point @prem0707 to the code for SBH in designer.

On Apr 18, 2018, at 11:45 AM, eoberortner notifications@github.com wrote:

Code reuse is highly recommended! Please, could you provide @Prem0707 https://github.com/Prem0707 pointers to the code?

@cjmyers https://github.com/cjmyers BOOST uses JSON Web-Token (JWT) as authentication mechanism. Sending a "login" request to BOOST (i.e., a request that contains username and password) returns the user's JWT. In addition, a registered BOOST user can see her/his JWT on the BOOST Web UI (after login at https://boost.jgi.doe.gov https://boost.jgi.doe.gov/ under "Account"). The user's JWT needs to be incorporated into the header of each request being sent to BOOST. Do you think this is sufficient? Or do we need something else?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nrnb/GoogleSummerOfCode/issues/99#issuecomment-382471073, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD9_YoxBdMgzGWw0_4fBdAlhQJFTNdks5tp3u1gaJpZM4Q_wk6.

michael13162 commented 6 years ago

Looks good to me!

Here is the UI code for the SynBioHub login dialog: https://github.com/SynBioDex/SBOLDesigner/blob/master/src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/RegistryLoginDialog.java

frontend.login(username.getText(), new String(password.getPassword())) is what does the actual logging in. You can looking inside the SynBioHubFrontend class to see the details of the login process.

prem0862 commented 6 years ago

@cjmyers @michael13162 Please provide your opinions on following points (suggested by @eoberortner ):

(i) the alternatives regarding BOOST authentication, (ii) how the UI should look like (I'd recommend keeping consistency w/ the SBOLDesigner UI), (iii) where the "Button" that opens the BOOST Authentication UI should be placed, and (iv) how the entered information (username/password or BOOST-JWT) should be stored in SBOLDesigner. and (iv) I'd recommend storing the information somehow since otherwise the user will have to enter the BOOST username/password or JWT every time when BOOST is needed.

I have also a doubt regarding to create GUI, are we using Swing to create GUI ? Thanks:)

michael13162 commented 6 years ago

You can run the login dialog code in SBOLDesigner to get a feel for what it looks like. For now, it's fine to just get functionality with the least amount of changes/UI effort.

The button can be placed to the right of the upload to SynBioHub button. We can change this in the future if needed.

The entered information could be stored in a PreferencesNode. You can look at this for inspiration: https://github.com/SynBioDex/SBOLDesigner/blob/master/src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/SBOLEditorPreferences.java You also don't need to worry about this until there is functionality though.

And yes, we're using Swing for the UI.

cjmyers commented 6 years ago

Also, please do not save the username/password but only the token that BOOST returns. This is all you need for future communications with BOOST.

On Apr 20, 2018, at 1:53 PM, Michael Zhang notifications@github.com wrote:

You can run the login dialog code in SBOLDesigner to get a feel for what it looks like. For now, it's fine to just get functionality with the least amount of changes/UI effort.

The button can be placed to the right of the upload to SynBioHub button. We can change this in the future if needed.

The entered information could be stored in a PreferencesNode. You can look at this for inspiration: https://github.com/SynBioDex/SBOLDesigner/blob/master/src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/SBOLEditorPreferences.java https://github.com/SynBioDex/SBOLDesigner/blob/master/src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/SBOLEditorPreferences.java You also don't need to worry about this until there is functionality though.

And yes, we're using Swing for the UI.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nrnb/GoogleSummerOfCode/issues/99#issuecomment-383204732, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD977Gu5cvWtEdUbqwdeim5Wzon8Xaks5tqjzTgaJpZM4Q_wk6.

prem0862 commented 6 years ago

@michael13162 I am not able to run the project due to BUILD FAILURE. The error message can be seen here. It also complains about build plugin version. If you have any clue, It would really help me. Thanks

cjmyers commented 6 years ago

Build is working for me. Are you running from command line or in eclipse? If from eclipse, see:

https://stackoverflow.com/questions/38930469/unknown-lifecycle-phase-mvn-you-must-specify-a-valid-lifecycle-phase-or-a-goa

This seems to indicate that you should drop the "mvn" from "mvn clean install" command when run from inside eclipse.

prem0862 commented 6 years ago

@cjmyers Thanks for the response. I have a doubt that we are already cleaning all the packages before build it by specifying the mvn run configuration goals then why we need to drop the "mvn" from "mvn clean install" command? PS: I am using eclipse

cjmyers commented 6 years ago

I think mvn is implied when run from eclipse

Chris

Sent from my iPhone

On Apr 21, 2018, at 10:18 AM, Prem Prakash notifications@github.com wrote:

@cjmyers Thanks for the response. I have a doubt that we are already cleaning all the packages before build it by specifying the mvn run configuration goals then why we need to drop the "mvn" from "mvn clean install" command? PS: I am using eclipse

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

prem0862 commented 6 years ago

@cjmyers @michael13162 I tried all the things suggested by @cjmyers but unable to resolve the error. Can you please share your screen so that I can see the exact problem? Or we can also create a gif for the correct installation guide, It will also help the future contributors. I am using JDK version 8, Is there any problem with java version? Thanks

cjmyers commented 6 years ago

There should be no problem with Java 8. Which OS are you using? Have you tried building using command line mvn commands?

On Apr 21, 2018, at 4:21 PM, Prem Prakash notifications@github.com wrote:

@cjmyers https://github.com/cjmyers @michael13162 https://github.com/michael13162 I tried all the things suggested by @cjmyers https://github.com/cjmyers but unable to resolve the error. Can you please share your screen so that I can see the exact problem? I am using JDK version 8, Is there any problem with java version? Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nrnb/GoogleSummerOfCode/issues/99#issuecomment-383336200, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD91_1uYdEljxfaV9O_8doGt5XkphXks5tq7DggaJpZM4Q_wk6.

prem0862 commented 6 years ago

There should be no problem with Java 8. Which OS are you using? Have you tried building using command line mvn commands?

I am using windows (8.1) OS. I tried with the terminal within the eclipse. Thanks

cjmyers commented 6 years ago

Have you tried creating a run configuration with Main class:

edu.utah.ece.async.sboldesigner.sbol.editor.SBOLDesignerStandalone

and simply running in eclipse?

BTW: I just confirmed I get the same error doing “Run As -> Maven Build” in eclipse. I don’t think our pom file is setup for this. You either need to do the maven commands in a terminal outside eclipse OR create a run configuration with that main class specified and run that way.

On Apr 22, 2018, at 2:27 PM, Prem Prakash notifications@github.com wrote:

There should be no problem with Java 8. Which OS are you using? Have you tried building using command line mvn commands?

I am using windows (8.1) OS. I tried with the terminal within the eclipse. Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nrnb/GoogleSummerOfCode/issues/99#issuecomment-383409829, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD9-yz6Xnkb2gGu9S9MOBDgKAKIpBVks5trOelgaJpZM4Q_wk6.

khanspers commented 6 years ago

GSoC 2018

prem0862 commented 6 years ago

Hi All Congratulations on getting selected as a part of Google Summer of Code' 18. It wasn't possible for me to make this possible without your support and guidance. Thank you all for your patience and cooperation.

Have you tried creating a run configuration with Main class: edu.utah.ece.async.sboldesigner.sbol.editor.SBOLDesignerStandalone and simply running in eclipse?

I haven't tried to run by setting with main class in eclipse (will try and notify you soon). I simply run by setting Eclipse Maven run configuration goals but it doesn't work.

I also tried with window command shell but unable to set up the project successfully. I think build system is also OS dependent. I will try to run it on Ubunto. If I wouldn't be able to resolve it tomorrow then Can we share our screen to acclerate this process? Thanks

cjmyers commented 6 years ago

Yes, let’s handle this in the first meeting.

On Apr 23, 2018, at 3:10 PM, Prem Prakash notifications@github.com wrote:

Hi All Congratulations on getting selected as a part of Google Summer of Code' 18. It wasn't possible for me to make this possible without your support and guidance. Thank you all for your patience and cooperation.

Have you tried creating a run configuration with Main class: edu.utah.ece.async.sboldesigner.sbol.editor.SBOLDesignerStandalone and simply running in eclipse?

I haven't tried to run by setting with main class in eclipse (will try and notify you soon). I simply run by setting Eclipse Maven run configuration goals but it doesn't work.

I also tried with window command shell but unable to set up the project successfully. I think build system is also OS dependent. I will try to run it on Ubunto. If I wouldn't be able to resolve it tomorrow then Can we share our screen to acclerate this process? Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nrnb/GoogleSummerOfCode/issues/99#issuecomment-383724311, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD96J4XCOYmE5lVVzSBkupM-OcFCsqks5trkNFgaJpZM4Q_wk6.