Giter Club home page Giter Club logo

sbtabeditor's Introduction

SBTabEditor

Version License (MIT) Build Status

Free, open-source application to help you read, write, manipulate and validate SBML files

The available information about biological systems increased strongly in the last decade and will increase further as more advanced methods are developed.
To store and distribute computer models of biological systems, it was necessary
to develop consistent data formats to store this information about an organism and the corresponding biochemical networks. One widely used format for this task is Systems Biology Markup Language (SBML). However, this data format is not suitable for editing large amounts of data. For this reason the table based data
format SBtab was developed, up until now there is no proper editor designed explicitly for SBtab, the aim of this project solves this problem by developing an extensible editor which can read, write and save SBtab and SBML data and display them in table form.

Authors

Franziska Daumueller, Granit Guri, Melina Maier, Anton Rabe, Julian Wanner, Mykola Zakharchuk

Supervisor: Dr. Andreas Draeger

How to start

In order to run JavaFX application, a valid JRE 8+ needed.

Packaging into an executable Jar file:

To create executable jar, call mvn jfx:jar. Target jar-file will be placed at: target/jfx/app.

To run: java -jar sbmltab-x.x.x-jfx.jar

Assembling into platform-specific bundle:

To create os-specific launcher/installer, call mvn jfx:native. Target folder: target/jfx/native

Running process is platform specific. Example ./sbmltab-x.x.x (running on Unix-like system)

Documentation

All relevant information you can find on GitHub Wiki.

Third-party libraries, which we are using

JSBML: Pure Java library for reading, writing, and manipulating SBML files and data streams.

JUnit: Test framework which uses annotations to identify methods that specify a test.

Log4j: Java-based logging utility.

sbtabeditor's People

Contributors

antonjuliusrabe avatar dependabot[bot] avatar draeger avatar franziskadaumueller avatar granitguri avatar juliwanner avatar melinamaier avatar zakharc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbtabeditor's Issues

If a directory's name matches the file filter criterion a FileNotFoundException is thrown

If folders cannot be opened, make sure your application does not allow users to do so.

bash-3.2$ java -jar target/jfx/app/sbtab-0.1.1-jfx.jar 
new
-- listing properties --
FilePath=/Users/draeger
objc[65610]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffb3eedc90) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x1351d0cd8). One of the two will be used. Which one is undefined.
java.io.FileNotFoundException: /Users/draeger/test/RECON1_squeezed.xml (Is a directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at org.sbml.jsbml.xml.stax.SBMLReader.readSBML(SBMLReader.java:295)
        at org.sbml.jsbml.SBMLReader.readSBML(SBMLReader.java:119)
        at org.sbml.jsbml.SBMLReader.read(SBMLReader.java:108)
        at org.sbml.jsbml.SBMLReader.read(SBMLReader.java:95)
        at de.sbtab.controller.SBTabController$2.call(SBTabController.java:103)
        at de.sbtab.controller.SBTabController$2.call(SBTabController.java:98)
        at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.lang.Thread.run(Thread.java:745)

add fxml file and basic window

create TabModView.fxml file and the belonging SBMLTabMainView.java Class which shows the window and also the TabModViewController.java Class for implementation of the functions of the components

Building the project fails (master branch)

When running mvn clean package on the master branch, building the application fails with the following error, probably related to the use of umlauts in 34244e5 and other commits:

[INFO] 4 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.920 s
[INFO] Finished at: 2018-06-17T21:48:27+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project sbmltab: Compilation failure: Compilation failure: 
[ERROR] /Users/draeger/Documents/workspace/SBTabEditor/src/main/java/de/sbmltab/view/MenuController.java:[25,15] unmappable character for encoding UTF-8
[ERROR] /Users/draeger/Documents/workspace/SBTabEditor/src/main/java/de/sbmltab/view/MenuController.java:[31,15] unmappable character for encoding UTF-8
[ERROR] /Users/draeger/Documents/workspace/SBTabEditor/src/main/java/de/sbmltab/view/MenuController.java:[57,28] unmappable character for encoding UTF-8
[ERROR] /Users/draeger/Documents/workspace/SBTabEditor/src/main/java/de/sbmltab/view/SBMLTabMainView.java:[27,43] incompatible types: java.lang.Object cannot be converted to javafx.scene.Node

The user interface should support loading compressed SBML files

It is often handy to pack SBML files with GZip to significantly reduce the size of the file (check, for instance the difference for Recon 3D). JSBML can directly read from GZip archives when passing a GZipInputStream to the SBMLReader. All that needs to be done is to add more flexible file extensions to the file chooser, and possibly also command-line options for direct opening of files.

Create a documentation folder for the online help

Clicking Help > Documentation opens a web browser with the root directory of the GitHub project. This is already nice, but it would be better to create a GitHub page as a real documentation and to open that page instead.

Assign GitHub accounts to commits

Every commit and push operation should be linked to the correct GitHub user account. This works only if the commit is associated with the identical e-mail address that is registered for that account. Otherwise, the name is there, but the link to the GitHub account does not work. Also, there is no e-mail notification about commits from persons who are incorrectly commiting, because it is impossible to follow such contributors. Make sure every commit links to the correct e-mail address.

No main class defined in manifest file within generated JAR

When building the application using mvn clean install and trying to run it,

bash-3.2$ java -jar target/sbtab-0.1.1.jar 

the application errors with the message

kein Hauptmanifestattribut, in target/sbtab-0.1.1.jar

Apparently, there is no main class defined in the manifest file.

RunTimeException when trying to open a file

When running

java -jar target/jfx/app/sbtab-0.1.4-jfx.jar

and clicking File > Open, the following error is printed to the command-line:

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774)
        at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
        at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1405)
        at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$343(ContextMenuContent.java:1358)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
        at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
        at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:381)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:417)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:416)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
        ... 40 more
Caused by: java.lang.IllegalArgumentException: Folder parameter must be a valid folder
        at com.sun.glass.ui.CommonDialogs.convertFolder(CommonDialogs.java:238)
        at com.sun.glass.ui.CommonDialogs.showFileChooser(CommonDialogs.java:190)
        at com.sun.javafx.tk.quantum.QuantumToolkit.showFileChooser(QuantumToolkit.java:1496)
        at javafx.stage.FileChooser.showDialog(FileChooser.java:416)
        at javafx.stage.FileChooser.showOpenDialog(FileChooser.java:350)
        at de.sbtab.view.SBTabMenuController.chooseFile(SBTabMenuController.java:487)
        at de.sbtab.view.SBTabMenuController.handleOpen(SBTabMenuController.java:365)
        at de.sbtab.view.SBTabMenuController.doOpen(SBTabMenuController.java:148)
        ... 50 more

Remove the bin folder from the repository

Just like configuration files, also the binary output folder should not be added to the Git repository. The reason is that these can cause many conflicts, because the files therein are automatically generated and the order of rows in the files is not guaranteed to be kept. Uploading this folder can even lead to a situation, in which some contributors are entirely blocked from committing. Hence, delete the bin folder and add it to .gitignore.

Replace Swing classes with JavaFX

Unless there is a specific reason for using the JFileChooser from the swing package, migrate everything to corresponding JavaFX classes.

Refactor the `Document` class

  • Make the class use a generic parameter, because this class can currently only deal with one kind of data types, namely SBMLDocument.
  • Is there a specific reason why the visibility of fields in classes is left to the default modifier rather than private?
  • This class lacks a constructor.
  • Solve the tight coupling between Document and SBMLTabController.
  • How does the class know when the document is modified? Hint: look at TreeNodeChangeListener.
  • There is a class called TidySBMLWriter that produces a much nicer output (compare the generated XML yourself to see).

Application crashes upon start

Building the application works fine using mvn clean package via command line (on the development branch). But when running the JAR, the program crashes right away:

bash-3.2$ java -jar target/sbmltab-0.1.0-jar-with-dependencies.jar 
Exception in Application start method
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: Location is required.
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
        at de.sbmltab.view.SBMLTabMainView.start(SBMLTabMainView.java:17)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Consistent Data Naming Conventions

It would be nice to develop some naming standards. By now we have some variability and inconsistency with data naming. For example Document, ReactionWrapper, SBMLTabController.

Set up continuous integration with TravisCI

  • Define a .travis.yml configuration file in the project's root folder.
  • Link the project to TravisCI for contineous integration.
  • Connect Travis to Slack for automated notification about build success upon git push operations.
  • Include the build status into the README.md file using a badge from Shields.io.

Edit options for file structure

We are now able to create a new SBML-file. I will get save as and save to work very soon.
Right now there are no options to change a new file (add new reactions etc.) It would be nice to equip the file generated in handleNew with basic but empty tree nodes and to have the to create new objects (reactions species etc.) in all of our tables.

Connect basic Controller functions to menu bar actions

methods handling menu bar actions are defined in MenuController and ready to be connected to basic methods like open, save and validate. Just for us to have something we can show It set handleOpen to call open from the imported controller package for now.

Remove configuration files from repository

Files specific to the local environment should not be pushed to the repository. This includes Eclipse configuration files .classpath, .project and the folder .settings with all of its content. These should be added to the .gitignore file.

These files can cause problems if different users have configured their environment differently. Befor removing them from the repository, make sure to create a local copy of the files so that you can restore them again.

This can also apply to files specific to certain oparating systems, such as .DS_Store (if any) or similar hidden files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.