After careful consideration of the alternatives on different platforms, I’ve concluded the best software for generating publication-quality plots is Gnuplot. The R suite is much better suited for statistical analysis, but the plot generation capabilities aren’t as flexible and to my eye don’t look as good. (Full disclosure: I am mainly speaking of the base plotting library–I have not extensively used some of the other libraries such as lattice or ggplot2). One can generate publication-quality graphs with Excel, but it is a chore, and most importantly, one cannot easily set the exact sizes of diagrams or generate high resolution images of graphs.

Now in some ways, the Gnuplot language syntax seems somewhat old-fashioned, but once you learn it (or better yet, learn to write programs that generate it). While the PNG driver in Gnuplot doesn’t generate terribly good-looking output, both the Postscript and SVG drivers work very well. I find them most useful particularly for publication-quality scatter diagrams. Generally, you create a file called something.plt, with commands to be passed to ‘gnuplot’ (‘wgnuplot.exe’ on WinXP). To use the postscript terminal to generate an EPS file (best for images around 3″ square, use these commands:

To generate a Postscript file (best for images around 6″-6.5″ square):

set terminal postscript enhanced size 6in,6in
set output 'file.ps'

To generate an SVG file (best for images around 4″-6″ square):

set terminal svg enhanced size 500,500
set output 'file.svg'

The svg terminal doesn’t seem to accept the ‘in’ argument to the size option, but in SVG-land 100=1in. I like svg the most, because the resulting graph may be further annotated with the open-source SVG editor program Inkscape. Therefore subsequent instructions here are assuming the use of the svg driver.

The ‘enhanced’ option to the svg terminal is important. It allows more sophisticated titles to be set:

set encoding iso_8859_1
set title 'This is the title of the graph'
set xlabel 'Molecular weight (kDa)'
set ylabel 'Solvent-inaccessible surface area x 1000 ({\305}^2)'

‘^’ allows superscripting and ‘_’ subscripting as in LaTeX. Non-ASCII characters may be included as well:

{\305} Angstroms

Controlling the legend (key):

set nokey # turn off the legend
set key top left

Controlling the axis ranges:

set xrange [0:10]
set xtics 0,2,10 # set an increment of 2
set yrange [0:1000]

Adding a function to print, such as a regression curve:

f(x) = 0.039440 * x + 0.678467

Now that we have all of the parameters set, we use the plot function to actually generate the graph data:

There do not appear to be different linetypes other than solid for the SVG driver (though that can be corrected in Inkscape). If that is an issue, the postscript terminal does have many kinds of dashed lines. An easy way to see the capabilities of a terminal is to issue the ‘test’ command.

The images can then be exported with Inkscape at arbitrary resolution to a lossless PNG file. This can also be done at the command line:

I am exhausted by fluffy, navel-gazing “news” stories that purport to explain and encapsulate an entire generation of Americans. These mostly focus on “Generation Y” or “The Millennials” these days, but comparisons also abound to “Baby Boomers” and “the Greatest Generation.” Almost always they either hyperbolically praise or criticize , and do so with either minimal or no evidence. The critical pieces in particular are frequently written by people not of those generations, which adds a fun extra layer of “you damn kids need to be told what’s wrong with you.”

Let me paraphrase: a significant portion of Generation Y is arrogant, lazy, entitled and delusional; and thus are unhappy because they are arrogant, lazy, entitled and delusional, so stop it. Also, apparently all Generation Y-ers (or only the ones that count, I guess) are college-educated, middle or upper class, and (presumably) white.

Here’s the thing. People are complicated. Even just in the US, we live in widely varying social, economic and physical environments. We belong to different races and come from different cultures, often more than one of each. But even if you had two people who grew up in the same environment and came from the same cultural groups, that is no guarantee that they will behave identically, because people are complicated! To think one can take a group of diverse Americans who only share one attribute–they were born between two arbitrary dates– and somehow make meaningful inferences about that whole group, or a large portion of it, is ludicrous.

Let me put it another way. Many Generation Y-ers may be arrogant, or lazy, or entitled, or delusional. Or all four. But so are many Generation X-ers. And Baby Boomers. And Greatest Generation-ers. Furthermore, there are members of all generations– Generation Y included– who are humble, hard-working, realistic and grounded. I’ve met them!

So can we stop with these pointless, stupid journalistic exercises please? All you are doing is manufacturing stereotypes.

It has been a stressful week, and as I went down to the hospital cafeteria for lunch today, I was feeling sorry and frustrated with how things in my life have been going lately. How there’s too much stuff to do in too little time. You know the feeling.

Then I walked past a woman pushing one of those wheeled stands full of electronic monitoring devices, bags of IV fluids, tubes with dripping liquids, etc. She was looking down at the base of the stand and there was a tiny little girl in pajamas, no more than 3 years old, wrapped around the pole at the base of the stand, sitting on a colorful pillow and looking up at her mom. I didn’t need to follow the tubes and wires from the monitors to realize she was the one connected to them, because she was completely, unnaturally bald.

And she wanted pancakes.

God, it’s so easy to get trapped in the echo chamber of our own lives, isn’t it? Sometimes it feels like we’re the only ones suffering, when in reality there are people in this world putting up with challenges that are literally unimaginable. How about a little bit of perspective?

Little girl, I don’t know you, but I hope and pray that you and your family find the strength to get through this, and that you live a long and happy life.

And even though it was lunchtime, I hope that you got all the pancakes your little tummy could hold. With whipped cream and strawberries!

First things first: the preacher is an idiot. To protest the actions of radical, fundamentalist Muslims, he did something considered to be blasphemous to all Muslims. That’s like protesting the KKK by burning Bibles. He and his congregation are world-class twits for having done what they did.

But how can anybody be considering taking legal action against him? Seriously? How does this not fall squarely into the First Amendment? Freedom of speech extends to people who say things that we–perhaps vehemently–disagree with. Frankly that’s the very point of it.

Some have compared it to shouting “Fire!” in a crowded movie theater. I don’t see the comparison. The panic induced in a theater would result in harm even though the people involved would act (more or less) rationally: trying to get away from the perceived fire. In this case, 16 innocent people were killed because somebody burned a book thousands of miles away. I don’t care how blasphemous it is; that is not rational. To somehow suggest that Mr. Jones should be prosecuted because of what he said, no matter how stupid, is completely contrary to the principles this nation was founded on.

I have never been more enraged by punditry than all of the criticism that has been leveled at the President about our intervention in Libya. It feels like pundits have produced thousands of column inches and countless hours of television and radio coverage has been devoted to criticizing the President’s plan (in many cases by the people who pressured the White House to set up a no fly zone in the first place!). And yet none of the criticisms I have read or watched have provided a single practical, workable alternative.

Guess what? Every possible plan can be criticized one way or another. We do nothing– an abdication of our moral responsibility to prevent the slaughter of innocent civilians. We do a full-scale invasion to depose Gaddafi– a slap in the face to our overtaxed armed forces already fighting two foreign wars. We wait for UN approval– we’re subservient to the whims of the United Nations. We act unilaterally– we’re an out-of-control superpower wanting to impose our colonial ambitions on the world.

So rather than having the courage to advocate and defend an unpleasant plan of action, the pundit-verse is cowardly sniping at the adminstration’s plan. So to all the pundits out there– do us a favor, would you? Tell us YOUR plan, or else shut the &@#$ up!!

One thing has been bothering me about the debate over the new health care bill is that every discussion between lawmakers I’ve heard in the media goes something like this:

Opponent: “Forcing people to buy health insurance is unprecedented and violates the commerce clause of the Constitution.”

Supporter: “It will cover 30 million new people and make health care cheaper and all of my constituents want it.”

Am I missing something? I am really hopeful that the healthcare bill they’ve will result in better and cheaper access to health care, but shouldn’t somebody, y’know, make some sort of cogent argument that it is constitutional? And then tell me what it is?

Here’s the thing: 18 state attorneys general are filing a federal lawsuit challenging the bill. Somebody please tell me the defense in the case has a better argument than “Hooray Obamacare.”

The word compose is often used in place of comprise, though like constitute, the parts compose the whole, not visa versa. But by using the “is composed of” construction, the roles of the subject and object are reversed:

“The system is composed of 12 different enzymes.” RIGHT

In my experience, this idiom is more common, especially in spoken English; probably due to the confusion about the proper use of comprise.

[Edit: due to broken CSS, wrong sentences were not properly marked wrong. Fixed.]

Here’s a little levity for a Monday morning: the authors of “Learn Your Damn Homophones” are a little angry about the misuse of homophones (words that are pronounced identically but spelled differently). Okay, incredibly angry. But the advice they give is good, and it’s a good and funny read, provided you don’t mind abundant cuss words and barely controlled rage:

An abbreviation is any shortened form of a word or phrase: “HEPES,” “Ph.D.,” “etc.,” etc.

Initialisms comprise a subset of abbreviations where the first letter of each word (more or less) of a phrase are combined. Some examples include the “Food and Drug Administration” = “FDA,” “adenosine di-phosphate” = “ADP”, and “4-(2-hydroxyethyl)-1-piperazineethanesulfonic acid” = “HEPES.”

In physical science manuscripts, nearly all initialisms should be written in all capital letters without spaces or periods. (There are some exceptions, such as “a.m.,” “r.m.s.d.,” etc.) This is certainly the case if you introduce new initialisms for brevity or clarity. When introducing an initialism, write it out first, followed by the abbrevation in parentheses: e.g. “structural genomics (SG).” Don’t underline or otherwise highlight the letters used in the initialism.* Don’t introduce new or uncommon initialisms unless you will be using the term several times.

Technically, not all initialisms are acronyms, even though in common spoken English the terms are largely used interchangeably. Acronyms comprise the subset of initialisms that are pronounced as a word rather than a spelled list of letters. For example, “AIDS” and “laser” are acronyms, while “ADP” and “NIH” are initialisms.

* Yes, I know I did that in the prior paragraph. Hey! What’s that over there! <runs away>

The field of bioinformatics, namely the use of computing to collect and analyze biological and biochemical information, is exploding in popularity. The word itself, however, is new. The noun “bioinformatics” was coined by researchers Paulien Hogeweg and Ben Hesper in 1978. According to the Merriam Webster dictionary, it is a special kind of collective noun that is plural but singular in construction. This means that it refers to a group of computational techniques, the group itself is treated as a singular subject:

“Bioinformatics are the study of…” WRONG

“Bioinformatics is the study of…” RIGHT

There is some debate as to how “bioinformatics” should be used as an adjective. In English, some nouns may be used to modify other nouns in the same way as an adjective:

“I studied biology in school.” (noun)

“I used a biology textbook in my classes.” (noun modifier)

However, many nouns also have adjective forms, which are preferred in most contexts. For example, the adjective form of “biology” is “biological":

“I did a biology analysis.” (noun modifier)

“I did a biological analysis.” (adjective)

While the former is grammatically correct, to my ear the latter sounds more natural and idiomatic. For the noun “bioinformatics,” the Merriam Webster dictionary identifies “bioinformatic” as the adjective form:

“I did a bioinformatics analysis.” (noun modifier)

“I did a bioinformatic analysis.” (adjective)

Like the previous example, while I can’t definitively say that the former (noun modifier) form is grammatically incorrect, I prefer the adjective form “bioinformatic” when an adjective is called for.