Biocodenv Blog Bioinformatics, Code, Stuff


Building for Better Decisions (B4BD): Multi-Scale Integration of Human Health and Environmental Data

The Building for Better Decisions (B4BD) Meeting is coming: May 8-11, 2012 at the US EPA Campus in Research Triangle Park, NC.

We're looking to bring together IT experts and environmental and human health scientists to answer the big questions, like:

  • We've got all this data, now what do we do with it?
  • How can IT solutions help us integrate data?
  • Are there ways or products out there that can help us share data, and make better sense of what we have?



Zombie Apocalpyse? CDC Has You Covered!

My colleagues at the CDC think of everything! How to prevent colds, how to avoid the flu. And now they're even helping safeguard the American public against a possible Zombie Apocalypse!

And speaking of zombies. Here's a trailer for an upcoming game featuring zombies on an island!

Dead Island Announcement Trailer by ign

Filed under: Uncategorized No Comments

Happy Birthday Skynet!

Skynet goes online tonight! I for one welcome our new computer overlords.


Installing GEOquery on Ubuntu 10.10 (Maverick Meerkat)

Today I had to install the Bioconductor GEOquery package on my Ubuntu virtual machine. Unfortunately, Ubuntu doesn't have all of the necessary libraries pre-installed. So here's what you need to do:

1. Install libcurl3 -- you may already have this:

$ sudo apt-get install libcurl3

2. Install the dev package for libcurl3:

$sudo apt-get install libcurl3-dev)

3. Start up R

$ R

4. Install GEOquery

> source("")

And now you're ready to go.


Filed under: Uncategorized 2 Comments

Question of the Day: What is Systems Biology

This week the US EPA held its first public workshop on the NexGen Risk Assessment Program. And I could post a number of ideas that I came to me as I listened to the public comments. But today I'd prefer to focus on a very astute question that came from the audience: "What is Systems Biology?"

It just so happens that Bill Mattes posed that same exact question to me about 1 year ago. And that was seed for our Society of Toxicology Workshop: "The Spectrum of Systems Biology". The workshop will be Tuesday March 8 starting at 1:30PM at the SOT Meeting in Washington, D.C -- if you're going to be at the meeting, you should definitely attend! And please, stop by and say hi!

Join me and my co-Chair, Bill Mattes, as we moderate what is sure to be a lively discussion among our 5 speakers and the audience. Although we would like to find a consensus by the end of the workshop, I think it will be at least entertaining to hear the diversity of opinions on this very divisive topic. And maybe, just maybe, we'll finally have a concise answer to the question of "What is Systems Biology?"

So what do you think is the best definition of systems biology?


R + igraph: Removing nodes that lack edges

A problem that has been vexing me for awhile is:

How do I get rid of nodes that don't have edges before I send it to Cytoscape?!

Well, it turns out it's rather simple:

> new_g <- delete.vertices(g, which(degree(g) < 1)-1)

Here we're assuming the original graph is called g. The which function returns the elements where the degree of the vertex is less than 1.  igraph numbers its vertices starting at 0, while R numbers its vertex indices at 1, thus the index from the which function has to be subtracted by 1.

If you want proof that this works:

> g <-, 10/1000)

> g <- add.vertices(g, nv=1)

> V(g)

> degree(g)

> g2 <- delete.vertices(g, which(degree(g) < 1)-1)

> V(g2)

> degree(g)

Q.E.D. -- more or less.


Android: The Next Malware Frontier

Android Botnets and Android Espionage

As Android's mobile market share continues to increase, so will the cybersecurity risks associated with the mobile OS. After rootkits become standard, expect Android botnets, spyware, and GPS-enabled espionage.

Attack of the Android Rootkits

At DEF CON 18, Trustwave security researchers Nicholas Percoco and Christian Papathanasiou will talk about their Android rootkit. According to their meeting abstract, they will demonstrate how their rootkit can be installed over the air or alongside a rogue app.

At the current time, a rootkit may be overkill, as most Android devices do not scan for malware. However, if in the future security scanning for malware becomes a reality on Android, a rootkit may prevent security scanners from finding malware. This becomes especially problematic if a user does not properly lock down their applications, and inadvertantly grants the rogue app certain permissions (e.g., ability to read SMS messages, access to the GPS, ability to make network connections) then we have a problem.

Average Black Hat Hackers Not the Problem

The average hacker is not the problem. Sure, in the hands of the average hacker, a rootkit could be problematic. But the larger concern should be state actors and criminal enterprises looking to exploit businesses and interrupt critical services.

Consider if a belligerent state with cyber warfare capabilities were to design a rogue Android app coupled with a rootkit. If this app had access to the phone's GPS, the state's hackers can target specific geographic regions. With geographic targeting, the state's hackers can disrupt the mobile phone/internet access points by tying up all of the circuits (the telecom equivalent to a DDOS attack). State hackers can also redirect all emergency 911 calls from affected Android phones calls to random phone numbers.

Android Botnets > Regular Botnets?

The other day while thinking about the possibilities of using Android phones for grid computing, it also struck me that Android phones are the next possible forum for botnets. The examples above show some of the capabilities of an Android botnet, how much more destructive they could be than our standard botnet.

Consider the fact that Android phones have the ability to connect to the telephone system and the Internet. This means black hat hackers and cyber warriors have additional vectors for their activities. Thus, the risk exists that Android phones may have twice the security risk as a standard computer.

We need to add Android powered phones to our cyber infrastructure conversations. Don't get me wrong, I love Android and the flexibility it affords, but we need to have more frank discussions of our cyber infrastructure, and this includes Android.


R Recipe: Repeating Columns in a Matrix using R

Someone recently asked me how to repeat a column in a matrix or dataframe using R. It's actually amazingly simple:

> x <- c(1,2,3,4,5)
> mx <- as.matrix(x)  #this part is crucial
> y <- mx[,rep(1,10)]  #this will repeat column 1 ten times
> y
    [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    1    1    1    1    1    1    1    1     1
[2,]    2    2    2    2    2    2    2    2    2     2
[3,]    3    3    3    3    3    3    3    3    3     3
[4,]    4    4    4    4    4    4    4    4    4     4
[5,]    5    5    5    5    5    5    5    5    5     5

MD5 and SHA256 Digests in Ruby

Due to the nature of what I do at work, and also due to my getting burned by corrupted Linux iso downloads, I've been very interested in putting together a quick script to calculate MD5 and SHA256 digests/checksums. At work I use SHA256 checksums to ensure the files I send to collaborators are not corrupted during the process, and that the results we produce are true originals. That's basically the same thing with downloaded software -- you run MD5 or SHA256 on the file and check the checksums to ensure the files were not corrupted during the download process.

Thus, I created a short script in Ruby that prints out the MD5 and SHA256 digests/checksums on the command line. I wrapped this script in a windows batch file to make it even easier to use. And b/c I'm an uber-geek, I also set the path to the batch file in my windows PATH environment variable.

Being a good agile programmer I tested everything using Unit Testing. I zipped everything up and you can download it from my site here. The code I'm distributing in the zip file is licensed under GPL v3.

To run the batch file from the command line:

D:\>md5_sha256 .\ruby_code\security_hash\test.txt SHA256 Digest: b31be10c867258146b4b10409fa6ffd46e5e196b7a4f9d11c0c354903cafdaa1 MD5 Digest: 3e09efe7694c40db6ad990f9d7d8e786

And here's the ruby code:

require 'digest'
class SecurityHash
 attr_reader :md5_digest, :sha256_digest
 def initialize(file_name)
 #file_name = ARGV[0]
 @sha256_digest = Digest::SHA256.file(file_name).hexdigest
 @md5_digest = Digest::MD5.file(file_name).hexdigest
 puts "SHA256 Digest: #{@sha256_digest}"
 puts "MD5 Digest: #{@md5_digest}"
security_hash = ARGV[0]

The unit test is rather simple:

require "test/unit"
require 'security_hash'
class SecurityHashTest &lt; Test::Unit::TestCase
 def test_md5
 security_hash = "test.txt"
 assert_equal '3e09efe7694c40db6ad990f9d7d8e786', security_hash.md5_digest
 def test_sha256
 security_hash = "test.txt"
 assert_equal 'b31be10c867258146b4b10409fa6ffd46e5e196b7a4f9d11c0c354903cafdaa1', security_hash.sha256_digest

Installing LaRSS

The good news is that if you've already installed Apache HTTP server and PHP, then installing LaRSS is a breeze. Just download LaRSS, decompress the file into the Apache htdocs directory, and you're all set. Remember, if you did a default install for Apache, then you need administrative rights to decompress (or paste files for that matter) into the Apache htdocs directory! To use LaRSS just navigate your browser to:


If you downloaded the LaRSS XAMPP image, it's even easier. Just unzip the LaRSS XAMPP image zip file somewhere on your computer, or onto a USB thumb drive (I typically run LaRSS off a 4GB thumb drive, making it a portable lab notebook). To start XAMPP double click setup_xampp.bat. Follow the directions on screen to change the drive mappings, etc. If no changes are needed, it will state that. Next, you double click xampp_start.exe. Once that window disappears, your Apache web server is running, and you can load up LARSS by typing the following into your browser:


To login to LaRSS, you need to use the default administrator:

LaRSS username: larss
Password: larssX05#LDB

Remember to either change the password for the larss user (somewhat secure), or create a new administrator (make sure you put the new administrator in the admin and user groups, same as larss). If you create a new admin account, make sure you set group to admin, user. Also, make sure you log out of the larss account, log in to your new account, and then delete the larss account (this is the most secure route).

Filed under: Uncategorized 2 Comments