Bamdad Dashtban

Developer

HighCharts for Taverna Workflow Management System

I gave an introduction in my previous post about what Taverna and HighCharts are.

Lets begin…

How to Install Taverna Workbench?

You can download Taverna from the download page of their website. I recommend reading the quick start guide to get general information about it if you are not a Taverna workflow designer yet.

First Step

Now lets create a Beanshell which creates a HTML containing a chart information. I’m going to start with Basic Line chart.
html_data beanshell connected to the a workflow output

The Beanshell at this point doesn’t have any inputs and it has only 1 output which is HTML data and it is connected to a workflow output. I rename the Beanshell to html_data.


The HTML Script

I’m using JQuery 1.7 for this implementation so I’ve defined the HTML structure and converted that to the Java multiple line format. The source is available in pastebin.

Write to file and open in the browser

For writing the data to file a write_text_file local processor in Taverna is being used. I created a Beanshell which returns the temp directory and  a filename appended to it. This is the script for this Beanshell:

file_path= System.getProperty("java.io.tmpdir")+ System.getProperty("file.separator")+ "chart.html";

Now I need to create another Beanshell open the written file it in the default browser. The beanshell script is as below:

import java.awt.Desktop;
import java.io.File;
java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
File file= new File(file_path);
desktop.open(file);

My workflow now looks like this :

hard coded basic line chart workflowRefactoring Time!!

Everything is now hard coded. I should  parameterize them .

First, I parameterize the data by using a string constants and then change it to a list (maybe!).

The html_data beanshell now accepts data from its inputs.

The next step is to make workflow to accept data as a list and show it to the workflow.

[This blog post is being edited...]

Friday Hack Night: Adding HighCharts to Taverna Workbnech

Hi,

For this week Hack night I’m going to implement HighCharts for the Taverna Workbench.

Image

Taverna is a workflow management system which lets the users to drag and drop different service, connect them and compose workflows. It is being usually used in scientific areas for designing in silico scientific experiments.

I’ve seen the hardness of visualizing data in Taverna workflows because of the lack of tools or components which helps workflow designers to visualize the final data.

I selected HighCharts since it has a big set of charts and it supports Themes.

My aim is to create a component family so that designer can easily drag and drop the components to the workbench and visualize the data.

There may be a need to create few adopter services to change the data format into the appropriate format that my components will need to show a chart. I’m not sure about the details now. The component plugin is currently under development and it doesn’t support workflow annotations. So I may need to create workflows separately and create components around them not to loose the annotations.

Wish me luck and don’t forget the #FridayHackNights at Twitter

Friday Hack Nights

Hi,

I’m about to finish my masters course in the Manchester and fortunately I’ve got a nice nice job here.

My plan is to work on few side projects while I’m working and preferably they are going to be open source projects. So, finally my Github account is going to be active after all.

I have few ideas in my mind to work on and one of them will be pure experiment which might lead to publish a a scientific paper. This project is related to text mining and linguistics and I have no idea how the output might looks like and as far as I’ve checked there has not been any similar works before. I’d like to apply things I’ve learned in my masters course on this project.

However, beside this project I’d like to do some hacking and coding on different areas to keep myself on shape and satisfy my curiosity. I have three ideas to work on here.

  • A project around BitCoin. If you haven’t had time to check out BitCoin now go and check it, it is really cool way to transfer money.
  • The other project is about sending and receiving parcels in a new way.
  • The latest geeky project is around my Raspberry Pi that I’ve talked about before.

My plan is to work on these projects on Friday nights and that’s the reason I’ve called them “Friday Hack Nights”. Feel free to join me on twitter with #FridayHackNights .

I’d like to write about my findings frequently here, but as you might have already understood I’m too lazy for writing. So, lets hope and see what will happen.
Just a quick update about my RaspBerry Pi: I’ve used RaspBMC for converting my RP to a media centre and it works almost perfectly and nearly stable. I’m writing a plugin for that which I’ll publish soon.

I have an idea of making my RaspBMC to work with Siri then I can talk to my Raspberry Pi which is kind of cool and super geeky!

Wish me luck with my studies and my loads of ideas.

ps. If you are in Manchester don’t forget to check HackManchester

Raspberry Pi

Hi,
My Raspberry Pi has finnaly arrived.
I’m eager to play with it.I have two goals in ordering this attractive board. The first one is to learn basics of hardware and embeded systems since, I know nothing about it and the other one is to creat a “Linux From Scratch” as a media center.
This can help me to learn more advanced topics in linux and also create a media center for myself to play music,video and also download latest clips.

If everything goes well, I will create a github repo for it.
I’m waiting for the SD memory, HDMI cable , micro USB charger and USB hub which I ordered from Amazon.
As soon as I find time and my orders arrive I’ll start.

Google code jam 2012 Qualification Round

Today I was coding for Google code jam.

It was my first experience on this competition. And hopefully I’ve got qualified to participate for the next level.

In this level I had to solve 2 problems from 4 problems to get qualified.
I’ve solve 3 out of 4. the last one needed to think alot and I was really tired.It was about the mirrors and I wish that I could remember the mirror fomulas which I have learned while i was studying in the first year of high school.
Each question (except the first one) had 2 parts: first with small data set and second with large dataset.
To be able to solve the problems with large data set you should have to optimize your algorithm to find the answers quickly. some times you had to find a shortcut and not to solve the problems completely.

By the way, I was really enjoying the moments. it was more fun that I expected.
But they didn’t let us to post in the IRC channel so it decreased the fun.

Machin Learning

I’m learning machine learning these days.
I’ve starded understanding basic concepts through http://www.ml-class.org and University of Manchester machine learnign course. My goal is to mix it with some image processing and text mining techniques.
The outcome of this research might be an opensource project which helps detecting and understanding texts on images.
I have some ideas to mix it with semantic web to annotate the result too but not sure exactly how.
Just like previous project I’ll post the detials here and it will be available on my github account again.

See you soon

Hokm project details

Hi

In my last post I’ve mentioned that I’m going to develop a card-based game which is the most played Persian card-game called “Hokm”.

I’ve started it last week and I’m working on it these days.

This is the link which you can access to the project, feel free to fork it:

https://github.com/bamdadd/hokm

It is written in Ruby, and I’m not an expert in Ruby, but I’ll try to learn TDD in ruby in this project.

I’ll be happy to see comments about this project.

ClubProject !

Years ago me and my friend Ashkan started a project to develop a framework for online card-based game and we called it club project.

During that project both of us experienced and learned a lot of concepts such as pair-programming , test driven development , concurrency , some Java technologies ,pattern based development, game development , state machines and ….( I think the most important thing that we both learned was not to over design a system)

I really enjoyed that project and enjoyed developing and learning with and from Ashkan.

Today, for a project in the University of Manchester I’ve chosen to develop a card-based game and I’m going to re-implement some part of that project again in Ruby (last time it was in Java).And I hope to enjoy as much as the time that I was developing with him.

This time I’m going to develop in the open source way using GitHub.Therefore, I’m going to post the project link here soon.For 6 weeks I cannot let anyone to contribute because its University project and I have to develop it individually but after it I’ll be happy to see someone interested specially see Ashkan to contribute. During this period , anyone who finds this project interesting can  fork/clone the project.

SiriProxy

I’ve seen few videos on YouTube which demonstrates the SiriProxy project.
For those who doesn’t know what that is , it is a Ruby program which lets you control and change the results of Siri request in your local network (?) .
For example you want Siri to turn the heater or boiler in your house on or off , but you know that Apple doesn’t know any information about your heater so, whats the solution ?

Before telling you the solution I have to mention how does Siri works:

First , you speak and ask Siri a request , like “What is the status of my Boiler?”

There is a built in speech recognition software in the iPhone 4s device which process your question and change the voice to a text.

Then , your phone send that text to  Apple servers to process your request and return the results.

when the results come back to your device , Siri application shows it in a good way to you.

 

That is the general scenario , but what SiriProxy doing is bypassing the step that the phone sends data to Apple server (Bold step) . Program tries to read the request sent from your phone and instead of sending it to Apple server try to respond it with its own resources. You can use boilers or heaters which provide APIs to get their status and connect them to your proxy program as its resources.

Thats what this guy has done using SiriProxy.

Its interesting for me to implement a software which works with SiriProxy , but I don’t have any idea yet if you have one tell me maybe we can work it out.

Banging KDE on Ubuntu!

Finally , I switched to KDE desktop , I’ve downloaded KDE desktop manager for my Ubuntu and right now I’m using it. the whole process was extremely easy just a simple “sudo apt-get install kubuntu-desktop”
It seems more fun , since I didn’t get used to the ubuntu unity , the KDE seems more rational and nice to me .
Try it if you are not satisfied with Unity …

Follow

Get every new post delivered to your Inbox.