Biocodenv Blog Bioinformatics, Code, Stuff

2Mar/120

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?

 

19May/110

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
19Apr/110

Happy Birthday Skynet!

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

19Mar/112

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("http://www.bioconductor.org/biocLite.R")
>biocLite("GEOquery")

And now you're ready to go.

 

Filed under: Uncategorized 2 Comments
17Feb/112

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?

1Nov/092

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 LaRSS.zip 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:

http://localhost/doku.php

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:

http://localhost:3700/doku.php

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
3Sep/0913

Exception Handling in R using Try

I was working on a project yesterday that required me to do some exception handling in R. Anyone who has tried this knows it is more difficult than necessary. Specifically, for my project, I need to catch exceptions that are raised by an R function, and if an exception is caught I need the code to process the next element in a list.

I looked at the R documentation, read the forums, and even hit up a fairly decent site that attempted to explain exception handling in R, but I just wasn't getting it...and neither were tons of other people who had been posting on the forums.

So, this is what I finally figured out. In retrospect, I guess this was kind of obvious, but at the time, it didn't seem like it.

The purpose of my code is to generate 16 models using nls. All 16 datasets are contained in one larger data.frame. Thus, I use a for loop to go through the process. The easiest way to get try to work is to create a new function that holds the code that may throw the exception. In my example code, my new function is called nonlinear_modeling. FYI: nls was what was throwing the exceptions -- due to my choice of starting values for the parameters. The "if" statement within the "for" loop provides the error handling (i.e., catches the error), and if an exception occured, then it moves the for loop to the next item in the set.

Code


#######################################################################
# Oxygen.R
#
# Author: Lyle D. Burgoon, Ph.D.
# Visiting Assistant Professor
#
# Affiliation: Gene Expression in Development and Disease Initiative
# Quantitative Biology Initiative
# Department of Biochemistry & Molecular Biology
# Center for Integrative Toxicology
# National Food Safety & Toxicology Center
# Michigan State University
#
# Version: 1.0 September 2, 2009
#
# Purpose: This code performs a generalized linear mixed model on the
# PreSens dissolved oxygen data.
#
# Copyright: 2009 Michigan State University Board of Trustees
########################################################################

library(MASS)
setwd("path_to_dir")
x <- read.table("data.txt", sep="\t", row.names=1, header=TRUE)
model_params_lower <- NULL
model_params_higher <- NULL

# There are 16 groups
for(i in 1:16){
result <- try(nonlinear_modeling(i));
if(class(result) == "try-error") next;
}

nonlinear_modeling <- function(i){
subx <- subset(x, Grouping2 == i)
x.nls <- nls(measure ~ k * Min^a + c, data = subx, start = list(k = -0.65, a = 0.65, c = 80))

#################################################
#Diagnostic plots
#plot(subx$measure ~ predict(x.nls))
#x.m <- subx$measure - predict(x.nls)
#x.a <- sqrt(subx$measure * predict(x.nls))
#plot(x.m ~ x.a)
#################################################

x.conf <- confint(x.nls)
tx.conf <- t(x.conf)
v_params_lower <- c(i, tx.conf[1,])
v_params_higher <- c(i, tx.conf[2,])
model_params_lower <<- rbind(model_params_lower, v_params_lower)
model_params_higher <<- rbind(model_params_higher, v_params_higher)
return(TRUE)
}

23Aug/090

Biocodenv: Who, What and Why

I started Biocodenv as a place to host my open source projects, and a place for me to blog about various things. The tagline for the site is Bioinformatics, Code, Stuff. That's exactly how I view this site and the blog. Sometimes it'll be about bioinformatics. Sometimes it will be about code. And other times, well, it will be devoted to stuff: specifically stuff I find interesting.

Filed under: Uncategorized No Comments