R editor improvements for the next release of Bio7

20.04.2016

For the upcoming release of Bio7 I worked hard to improve the R editor features. So I added some new features and improvements to assist in the creation of R scripts in Bio7.
One of the highlights is the newly integrated dynamic code analysis when writing an R script.

Here a short overview of some new R editor features I integrated so far:

  • Detect and display unused variables and functions

missingFunc

  • Detect missing functions and variables
  • Added a new code assist list when triggered in function calls

codeComplParenth

  • Check of function arguments

missingPara

  • Check of wrong function argument

errorFuncCall

  • Available help for mistyped functions (% similarity)

similar

  • Improved Code Completion in general
  • Added a toolbar with two HTML help actions to the context help dialog (if you hover over a method)

codeComplTollbar

  • Improved Code Completion to list local scope self defined variables and functions

codeCompl

  • Added  an refactor action to extract variables
  • Added an refactor action to extract functions

refactorMeth

  • Added more Quickfixes
  • Quickfixes can now be opened by hovering over a problem or error marker
  • Added an automatic close action of parentheses, brackets, braces and strings in the editor
  • Improved the general parsing speed
  • Added new key shortcuts to faster perform R editor actions
  • New action and key shortcut to open the plot preferences faster
  • Added new on/off preferences for the new features
  • Improved the display of the Outline view for variables and functions

There is of course some room for improvements and there are some rough edges in the implementation of the dynamic code analysis since the R language is a highly dynamic language. However I hope that this features will be a help in the creation of correct R scripts in the R editor of the next Bio7 release.

Useful Eclipse Plugins for Bio7

21.02.2016

Here are some great Eclipse plugins useful in a scientific context which can be installed directly into Bio7 with the Eclipse Update-Manager of Bio7 (Help->Install New Software…).

Please note that you can also install the Eclipse Marketplace Client into Bio7 to install some of these plugins (a fancy interface to search for plugins):

EGit:
https://marketplace.eclipse.org/content/egit-git-team-provider
The powerful Git plugin to connect Bio7 with a Git repository.

TCF-Terminal:
http://marketplace.eclipse.org/content/tcf-terminals
A true native terminal with SSH,Telnet and Serial line support.

Eclipse CDT
https://marketplace.eclipse.org/content/eclipse-cdt-cc-development-tooling
C/C++ editor and development tooling.

Arduino C++ IDE:
https://marketplace.eclipse.org/content/arduino-c-ide
A great Arduino extension of the C++ editor of Eclipse.

PTP
https://eclipse.org/ptp/
An integrated development environment to support the development of parallel applications written in C, C++, and Fortran.

Photran
http://www.eclipse.org/photran/
An Integrated Development Environment and Refactoring Tool for Fortran

JSDT
https://eclipse.org/webtools/jsdt/
JavaScript editor and development tools

PyDev Editor:
https://marketplace.eclipse.org/content/pydev-python-ide-eclipse
A very powerful Python editor which can be used to execute Bio7 Jython and Python scripts instead of the Bio7 default editor. In addition Bio7 can use the PyDev editor to execute scripts running on the Bio7 Java classpath. If you open Jython/Python scripts with the PyDev editor the default Bio7 action will be visible to execute the scripts on the Bio7 classpath.

Groovy Editor:
https://marketplace.eclipse.org/content/groovy-eclipse-juno
A more powerful Groovy editor. Can also be used with the Bio7 classpath if scripts are opened with this editor instead of the default.

Jeeeyul’s Eclipse Themes
https://marketplace.eclipse.org/content/jeeeyuls-eclipse-themes
To install new styling themes into Bio7.

Eclipse Color Theme
https://marketplace.eclipse.org/content/eclipse-color-theme
If you need, e.g., a dark colored editor at night to rest your eyes.

Julia Editor
https://github.com/JuliaComputing/JuliaDT
A Julia editor in an early stage. But very promising.

Remote System Explorer
https://marketplace.eclipse.org/content/remote-system-explorer-ssh-telnet-ftp-and-dstore-protocols
A plugin to connect Bio7 with SSH, Telnet, FTP and DStore protocols.

This is a selection of a huge amount of available Eclipse plugins which can be installed into Bio7 to complement the default tools.

Supervised Image Classification With Bio7, R And ImageJ

27.11.2015

I created a new Bio7 example which demonstrates how to classify an image with Bio7, ImageJ and R.

classifyimage

For the classification I used the “randomForest” R package and an image example of ImageJ so you can reproduce the example quite easily. I made the example script as easy as possible and trained the classifier with 64 trees by default (see literature below). Not shown in the video is the procedure to control the prediction of the trained classifier with test data. You can find a simple script in the repository, too, which uses a method of the powerful ‘caret’ package.

Video:

If you have some recommendations of how to effectively use a decent classifier for image classification (e.g., which classifier is well suited for images, which tuning parameters are useful in this context, which additional signatures could be used, etc.) I would be happy to hear.

References:

Fernández-Delgado, M., Cernadas, E., Barro, S. & Amorim, D. Do we Need Hundreds of Classifiers to Solve Real World Classification Problems? Journal of Machine Learning Research 15, 3133–3181 (2014).

Oshiro, T. M., Perez, P. S. & Baranauskas, J. A. in Machine Learning and Data Mining in Pattern Recognition (ed. Perner, P.) 154–168 (Springer Berlin Heidelberg, 2012).

Latinne, P., Latinne, P., Debeir, O. & Decaestecker, C. Limiting the Number of Trees in Random Forests. IN PROCEEDINGS OF MCS 2001, LNCS 2096, 2001.

New R plot preferences and improvements for the R editor in Bio7

18.11.2015

In the current release of Bio7 2.3  two new plot preferences are available to automatically plot data with the size of the visible display (as an image) or with the size of available ImageSizeX and ImageSizeY R workspace variables.

The second option is handy if you transfer images from ImageJ to the R workspace (the variables ImageSizeX and ImageSizeY will be autmatically created, too). You can then create an R image plot (e.g. from a classification) in the same size as an overlay of the original image (in turn plotted and overlayed in ImageJ).

Video:

Improvements of the  R editor for the upcoming Bio7 2.4 release

For the upcoming release of Bio7 I also add new features to the Bio7 R editor.

Among other things until now I improved the code completion. If you now type a a left parenthesis you get a help tooltip if the function is known (if you load frequent used R packages with the Bio7 GUI interface the package function context will be added to the code completion, tooltip interface).

screenRTooltip

Screenshot 1: Improved tooltip when a left parenthesis is typed.

screenRCodeCompletion

Figure 2: Code completion (Keys: CTRL+Space) now preselects the right context (e.g. functions with ‘.’ char)

In addition I added a function to set right parentheses, braces, etc. automatically when left parentheses, etc.  are typed in the R editor.