Sunday, June 26, 2016

The Up-And-Coming Bioinformatics Language: A First Look At Julia

Programming is a dynamic field that transitions from one language to another over the years. A classic example is the transition to Perl, which then transitioned into Python. The R language has also exploded in recent years, and all of these languages are used heavily in bioinformatics. Instead of focusing on the current state of bioinformatics, I want to focus this post on where we could be going in the future. More specifically, I want to discuss an up-and-coming programming language named Julia, which has potential for use in bioinformatics.


Julia is a new language that first appeared in 2012 and has been gaining attention ever since. The creators have focused on creating an efficient and fast language that is also relatively easy to use. Because people are talking more about it each day, and because I think it shows exceptional promise, I wanted to try it out for myself.

The Benchmarking

I was a little bummed when I saw their homepage benchmarking failed to include Perl, my goto language for a lot of the data munging associated with bioinformatics. Perl is also lightening fast for a scripting language, which makes it handy. I decided I would familiarize myself with the Julia language by setting up some basic benchmarking.

To get a feel for Julia's speed, I decided to recreate a Perl script that I use to calculate the median length of sequences in a fasta file. I downloaded Julia from the Julia website, installed it on my computer, and rewrote the Perl script in Julia. In total this took me about 1-1.5 hours, which highlights the ease of writing in Julia. It really took no time at all before I was writing a decent Julia script. I had never used the language before, but it is familiar to any Python or R user.

Once I had the two scripts, I ran them on the same example fasta file and compared the execution time required for both. I got the following results.

Comparison of Perl and Julia speeds for calculating the median sequence lengths in
an increasingly larger fasta file. Code is found here.

So the Perl script clearly ran faster than the Julia script, and both increased in time at about the same rate as I added sequences. So what can we say from these results? I would conclude that although Julia is fast, it still can't beat Perl for parsing data and making quick calculations. Of course this comes with the caveat that I have very little experience writing in Julia and could have written it poorly (I did try to make it efficient to give it a fair chance though). I also only tested the two on relatively small files, and the results may be different for very large files. Regardless, I still think this is informative.

Check out the associated data and code on the JuliaPerlBenchmark GitHub page.

Julia Pros


  • After spending some time with the Julia language, I really liked the familiarity of the syntax and data structures. Anybody with exposure to Python, R, or any similar high-level scripting/programming language will easily pickup Julia in about an hour or two. 
  • I like that Julia seems to be a bit of a hybrid between R and Python. It seems like it could be really good for bioinformatics by allowing easy data formatting, analysis, and presentation in one cohesive and fast language environment.
  • Although it was a little slower than Perl for parsing sequencing data files, Julia is still a fast language and I think this will draw more and more bioinformaticians to use it.
  • Finally, Julia allows for easy integration with C, which I think will help with future development.


Benchmarking results provided on the Julia homepage.

Julia Cons


  • Although I like Julia, there are certainly some problems that will prevent me from switching over right now. The biggest issue is that it simply does not have the support and infrastructure that a language like Python or R has. Julia is still up-and-comming and the community is not at the same level as the R, Python, or Perl communities. I expect it will pickup in the coming years, but for now it just makes sense (for me) to work in the more developed communities of R, Python, and Perl.
  • Although Julia is fast, it still can't beat my simple and fast Perl scripting. Until it beats Perl performance in data formatting and management, I honestly won't have a strong incentive to make the move over to Julia heavy scripting.


Final Thoughts

Julia is a promising and exciting new programming language that I think we will hear more about in the next few years. The community is small and there is less support compared to Python and R, but that could (and probably will) change over time. The general feeling I got for Julia was that it was a combination of Python and R that offered me the best of each in one language. That, in addition to the speed advantages over R and Python, could allow Julia to replace Python and R as major programming languages in the near future. I really do think it is reasonable to expect Julia to be the bioinformatics language-of-choice in the next ten to fifteen years. Ultimately though only time will tell.

Any thoughts, comments, or concerns? Any bugs in my code or errors in my interpretations? Let me know in the comments below. You are also always welcome to reach out on Twitter or by email. I always love to hear from Prophage readers.

Update

I have been getting incredible feedback on this blog post and I wanted to update the readers with what I have learned, and how the data has improved. Thanks to the readers in the comments below, as well as on the GitHub repository, we have addressed two issues with the benchmark.

  1. The script I wrote needed to be written more efficiently. Ismael rewrote the script to run more efficiently, and also provided a solid explanation of what they did.
  2. As you can see in the comments, the problem with this test is that Julia is taking time to start and compile the code. The time required to get started is considerably greater for Julia, which is the biggest reason for why Perl appears to perform better. Given this information, you might predict that Julia could outperform Perl on larger file sizes where the startup time become negligible. I quickly bolstered the size of my file to about 500MB (from 30MB) and reran the benchmark. Wouldn't you know it, Julia begins to outperform Perl at larger file sizes, which is awesome. The updated results are below.

Updated comparison of Perl and Julia speeds for calculating the median sequence lengths in
an increasingly larger fasta file. Larger file than figure above. Code is found here.


So what what can we take away from this? It turns out that while Julia startup takes longer, it is blazing fast and actually outperforms Perl when using larger but reasonable files. With this new and more correct knowledge, I am happy to say that I am even more excited about Julia and think that it has a place in bioinformatics. Speed for me is a big thing, so I can see incorporating this into my own work.

I finally want to thank all of the readers who contributed to this blog post. I love that people were able to help make this little piece of data accurate and fair, and I feel like we all benefitted from the improved results. Thank you so much and please feel free to continue commenting.


80 comments:

  1. Hi, I'm one of the maintainers and coders over at BioJulia, our main flagship package is called Bio.jl, and in that package a lot of effort has been invested in our consistent IO interface. For files like FASTA that are 'regular', we create Ragel specifications for file formats, and this results in automatically generated parsers that in our experience are very fast. We also have sequence types that are more efficient than strings. If you're interested we'd love to know how your benchmark does with what we have created, and how it compares to the string processing based julia script you created.

    ReplyDelete
  2. Hey Ben, thanks for the information! I definitely want to try this out. When I get a chance I'll try implementing it in my benchmarking repo on GitHub and followup with you on how it looks. :)

    https://github.com/Microbiology/JuliaPerlBenchmark

    ReplyDelete
  3. Hi, this is an interesting post, thanks. Thought I'd just mention something about your benchmarks. At the minute you use the bash `time` command to measure execution time. This makes sense for Perl, which has minimal start up time, hence the plots above going to 0 time with 0 sequences.

    However for Julia, what this benchmark really measures is the time for starting up Julia, and also compiling the code. This is why a similar linear trend is seen, plus a large constant factor of ~200 ms.

    If you wanted to measure the speed of the algorithm execution once everything is loaded and compiled, you might be better off using the internal commands in Julia, e.g. the `@time` macro.

    ReplyDelete
  4. Yeah this is a very good point! So I was originally thinking about the benchmark in terms of how long "everything" takes to run, which is why I was fine with `time`. But this is an important consideration for thinking about scaling the benchmark to larger files. I bet that once this is run on large enough files where the startup time become negligible, the story will be different.

    Thanks for the input! :)

    ReplyDelete
  5. I went back and reran the benchmark on larger files and Julia indeed outperforms Perl at larger file sizes. Thanks for the comment and helping the rest of us avoid making unfair conclusions on incomplete data! :) I also updated the blog content with this new information.

    ReplyDelete
  6. Perl does an amazing job when working with massive text files, especially in the domain of regular expressions. It spends less time backtracking in lines that don’t match a pattern than any other language you may think of, and has a lot of built-in tools to do basically anything that crosses your mind. It’s designed to do exactly that – text manipulation. However, Perl doesn’t support a lot of things you may be used to when coming from another language (I.e enumerated types). It’s not the best language to choose if you wish to perform something more demanding on your data at the preparation stage. I just wanted to share information about PERL Scripting Online Training.

    ReplyDelete
  7. Excellent information on your blog, thank you for taking the time to share with us.I’m really amazed with your posting skills as well as with the layout on your blog site.Very informative and well written post! Quite interesting and nice topic chosen for the post Nice Post keep it up.Excellent post.
    bioinformatics information

    ReplyDelete
  8. Thanks for posting this useful information. You have provided an Awesome article, Thank you very much for this one.

    PERL Scripting Online Training

    ReplyDelete
  9. As QuickBooks Premier has various industry versions such as retail, manufacturing & wholesale, general contractor, general business, Non-profit & Professional Services, there was clearly innumerous errors that may create your task quite troublesome. At QuickBooks Help & Support, you'll find solution each and every issue that bothers your projects and creates hindrance in running your organization smoothly. Our team is oftentimes willing to permit you to while using the best support services you could possibly ever experience.

    ReplyDelete
  10. You make a search in the
    Quickbooks Support Number you will likely confused when a so many number comes up into the search results ,because Intuit is dealing with so many products that why each product and each region they getting the different Tech Support official . However, if you're in hurry and business goes down because of the QB error it is possible to ask for Quickbooks Consultants or Quickbooks Proadvisors .

    ReplyDelete
  11. QuickBooks Customer Support Number make sure the solutions we give you would be best suited to your software, both for the present situation as well as for future.
    In spite of leveraging you with less time-consuming answers, we never compromise utilizing the quality of our services.

    ReplyDelete
  12. QuickBooks Customer Support Number, it is a user-friendly accounting software; an easy task to maintain; assisting the company in keeping the records of financial transactions, and a whole lot more features.

    ReplyDelete
  13. It Gives Necessary Features In Real Time For The Enterprises. Because The Software Runs On Desktop And Laptop Devices, It Truly Is Prone To Get Errors And Technical Glitches. However for Such Cases, QuickBooks Enterprise Tech Support Number Is Present Which Enables A Person To Acquire His Errors Fixed.

    ReplyDelete
  14. The web is full of faux numbers WHO decision themselves the QuickBooks Enterprise Support Phone Number Provider. you’ll value more highly to dial their variety however that might be terribly risky. you’ll lose your QuickBooks Company file or even the code itself. dig recommends dialing solely the authentic QuickBooks Support contact number.

    ReplyDelete
  15. QuickBooks Pro is some form of class accounting software that has benefited its customers with different accounting services. It includes brought ease for your requirements by enabling some extra ordinary features and also at QuickBooks Tech Support Number Usa it really is an easy task to seek optimal solutions if any error hinders your work.

    ReplyDelete
  16. If you are aa QuickBooks enterprise user, you can easily reach us out immediately at our QuickBooks Tech Support Number. QuickBooks technical help can be acquired at our QuickBooks tech support number dial this and gets your solution from our technical experts. QuickBooks enterprise users will get support at our QuickBooks Enterprise Support contact number if they are having trouble making use of their software copy.

    ReplyDelete
  17. Mistaken for your QuickBooks software or stuck in between making invoice ?You can reach us at QuickBooks Tech Support Number to attain us for instant help. You just have to dial Our QuickBooks Support phone number to reach our experts.

    ReplyDelete
  18. So now you have become well tuned directly into advantages of QuickBooks online payroll in your company accounting but because this premium software contains advanced functions that may help you along with your accounting task to complete, so you may face some technical errors while using the QuickBooks payroll solution. In that case, Quickbooks Support Number provides 24/7 make it possible to our customer.

    ReplyDelete
  19. QuickBooks Enterprise customer support cell phone number. We understand that your growing business needs your precious time which explains why we offer the most QucikBooks Enterprise Technical Support

    ReplyDelete
  20. Intuit has developed QuickBooks Payroll Support Phone Number application form form with almost evolution to carry out all checks and taxes issues. Since no one is well in this globalization. Most of the time when folks are protesting about incorrect calculation and defaults paychecks results.

    ReplyDelete
  21. Payroll management is actually an essential part these days. Every organization has its own employees. Employers want to manage their pay. The yearly medical benefit is vital. The employer needs to allocate. But, accomplishing this manually will require enough time. Aim for Support for QuickBooks Payroll. This can be an excellent software. You can actually manage your finances here. That is right after your accounts software. You'll be able to manage staffs with ease.

    ReplyDelete
  22. For doing this, you will need to go to the start button of your Windows after which you search Msc in the search bar after which you can enter in it which will open the QuickBooks Phone Number For Support DB24 and then you can right-click on it.

    ReplyDelete
  23. The QuickBooks Payroll Support Phone Number team at site name is held accountable for removing the errors that pop up in this desirable software. We look after not letting any issue can be found in between your work and trouble you in undergoing your tasks.

    ReplyDelete
  24. After this process, you will be able to add a number of employees to the software and make them pay easily. If you are a new user and don’t have an active payroll, then you can activate it by clicking on the QuickBooks Tech Support Phone Number payroll help option from where you can be able to run payroll manually.

    ReplyDelete
  25. Support once you go through the blink of a wrist watch. If you're experiencing any hiccups in running the Enterprise type of the QuickBooks software for your requirements, a good idea is not to ever waste another QuickBooks Support Number in trying to find an answer for the problems.

    ReplyDelete
  26. However, being an electric device, we can not deny that the HP Printer Support Number can also be home to various technical glitches. From time to time, HP Printer not printing anything properly bothers the users quite badly.

    ReplyDelete
  27. QuickBooks Customer Support Phone Number, QuickBooks PS series square measure several of the foremost common and therefore the most dangerous errors which our Users have to face. therein case, they ought to forthwith dial the fee QuickBooks Technical Support Service.

    ReplyDelete
  28. Such as for example simply fixing your damaged QuickBooks company file if you use QuickBooks file doctor tool. And easily fix QuickBooks Support Number installation errors or problems with the employment of wonderful QuickBooks install diagnostic tool.

    ReplyDelete
  29. Very often client faces some typically common issues like he/she isn’t willing to open QuickBooks package, it is playing terribly slow, struggling to install and re-install, a challenge in printing checks or client reports. We intend to supply you with the immediate support by our well- masterly technicians. A group of QuickBook Tech Support dedicated professionals is invariably accessible for you personally so as to arranged every one of your problems in an effort that you’ll be able to do your work while not hampering the productivity.

    ReplyDelete
  30. With the introduction of modern tools and approaches to QuickBooks, you can test new ways to carry out various business activities. Basically, it offers automated several tasks which were being carried out manually for a long time. There are numerous versions of QuickBooks Support Number and every one has its own features

    ReplyDelete

  31. Get prominent solutions for QuickBooks Support near! With no doubts, QuickBooks has revolutionized the process of doing accounting this is the core strength for large as well as small-sized businesses.

    ReplyDelete

  32. When you are facing virtually any errors or issues like unexpected QuickBooks Support Phone Number and many more, each day with your Quickbooks accounting software then don’t concern yourself with it. Primeaxle always provides you with the best and most amazing team to simply resolve or fix your errors or issues whenever you want.

    ReplyDelete
  33. Well! The QuickBooks Payoll Tech Support Phone Number world is very crucial and important as well. Truly the only that includes deficiencies in knowledge battle to test along with options. You may either perform payment processing in desktop or cloud, both ways are simply only a little different but provide you with the same results.

    ReplyDelete

  34. So, whether you are facing tax table update issues, payroll processing errors, or QuickBooks Payroll Tech Support Number update problems, be confident that QuickBooks Desktop Payroll Support contact number is simply a call away!

    ReplyDelete
  35. New Intuit's Data Shield service, at QuickBooks 2018 Automatically backs up your QuickBooks information (or all of your files, up to 100 gigabytes) every single day into some Web-based storage place. The info Shield service differs when you look at the elderly QuickBooks Support Phone Number in the backup process runs regardless of if your data file is present, and every daily backup is stored for 45 days.

    ReplyDelete
  36. What’s more important is to get the right help at the right time? Your time is valuable. You must invest it in an important business decision and planning. You can even contact our QuickBooks customer support team using QuickBooks Support Number. Anytime and anywhere you can solve your worries from our experts and Proadvisors via QuickBooks technical support number.

    ReplyDelete

  37. The retail businesses always consume a lot of time. Retail sellers have to sell their goods to achieve maximum profit. QuickBooks Enterprise Support Number can easily manage your retail business by availing its silent features. This software is helpful to manage your data, pricing, reports in the most efficient manner.With the help of advanced inventory feature, you can manage the inventory easily. You can easily handle the data with this software like vendor lists, items and customers. This software is helpful in adding thousands of price rules.

    ReplyDelete
  38. Several other bugs or errors like these worsen the performance of your accounting software. It is very important to take the support of a team that assists you from such issues without any loss of data. Our QuickBooks Support Phone Number +1-855-236-7529 team is one such astounding team that can take good care of any sorts of issues or bugs. Or contact at QuickBooks Phone Number Support
    Read more: https://tinyurl.com/y2rm4dnu

    ReplyDelete
  39. Hey! Incredible post. Thank you so much for writing this post. I'll go ahead and bookmark your website for future updates. Just curious to know if you have heard QuickBooks accounting software. It is a well-known accounting software. You can easily use this software. You can even get immediate help and support at Contact Number for QuickBooks Support 1-833-441-8848.

    ReplyDelete
  40. With an engaged mind and satisfied mindset, I just loved your content. Pure content and relevance with excellent presentation. Your blog will soon have number of visitors if you keep sharing more. Hey, I have been using QuickBooks for so long now. In case you need QuickBooks assistance, you can contact the best customer care executives at QuickBooks Support Phone Number +1 833-228-2822.

    Read More: QuickBooks Error 3371

    ReplyDelete
  41. Simply just clearing the “Cache” resolves many issues, this may work with QuickBooks Error Code 9999 as well. You can look at this solution for other bank feed or crashed feed issues. Try on this solution and find out if this is very effective. This itself might clear the issue without performing some other significant modifications to QuickBooks system. If you would like to learn How To Fix Quickbooks Error 9999 yourself, you can continue reading this blog.

    ReplyDelete
  42. It is common to face banking errors like QuickBooks Error code 9999. When such an error takes place, the system tends to freeze for a couple of seconds on repeat. This situation can obviously affect business awfully. If you would like to learn How To Resolve Quickbooks Error 9999 yourself, you can continue reading this blog.

    ReplyDelete
  43. Runtime errors are generally caused by incompatible programs running at the same time. It may also occur because of memory problem, a bad graphics driver or virus infection. If you would like to learn how to Troubleshoot Quickbooks Error 9999, you can continue reading this blog.

    ReplyDelete
  44. Nice & Informative Blog ! Get QuickBooks Payroll Update Error 15270 resolved immediately by dialling us at 1-855-6OO-4O6O. QuickBooks error 15270 occurs while updating the payroll into QuickBooks

    ReplyDelete
  45. This comment has been removed by the author.

    ReplyDelete
  46. Nice Blog!
    QuickBooks toll-free Number are available 24*7 for help the customer to get hassle less service.
    Dial QuickBooks Support Number +1-844-908-0801

    ReplyDelete
  47. Nice Blog !
    Well explained and informative blog.
    When you come across any query or issues, get it resolved directly from our Qb experts. Need to contact on QuickBooks Customer Support 1-855-974-6537.

    ReplyDelete
  48. This comment has been removed by the author.

    ReplyDelete
  49. Hey! Great Job and your blog is very valuable for us. QuickBooks Online Error Code 9999 is a runtime error which happens both because of corrupt program records data or some registry error. Don't worry; we have mentioned all the required details resolution in the blog; for expert guidance to Error , dial +1(855)-738-0359.

    ReplyDelete
  50. Thanks for sharing such a knowledgeable piece of QuickBooks Online Error 9999. In case you are struggling with QuickBooks Error call at quickbooks customer support phone number +1(855)-738-0359 and get instant assistance from experts.

    ReplyDelete
  51. Perl excels in handling vast text files, particularly in the realm of regular expressions. It minimizes backtrack time for lines that don't match a pattern more effectively than most other languages. Additionally, it provides a rich set of built-in tools capable of tackling a wide range of tasks. Its core focus is on text manipulation. However, it lacks support for certain features commonly found in other languages, such as enumerated types. Therefore, it might not be the optimal choice for more complex data preparation tasks. I wanted to share information about online training for your bright careers .




    ReplyDelete