Posted May 3rd, 2010 by Spicy
Science it stupid-fun. I mean, honestly, as a graduate student in informatics I get to sit in front of my computer all day, musing about problems, programming scripts, and testing hypotheses. It’s the greatest job in the world and every so often you hit on something really cool and get to publish a paper. Sometimes you figure out a new way to analyze the data or you apply an old technique to a new field. Either way, sharing your discovery is both fun and gratifying.
The papers you publish are the lifeblood of a scientist’s career and as a graduate student will form the basis of my PhD thesis. I’ve been lucky so far to have worked with some very talented people and publish a couple of papers in my first two years. However, recently I stumbled upon a discovery which could get me a paper in, by most metrics, the most prestigious journal in the world, The New England Journal of Medicine. Just typing this sentence blows my mind. Anyway, because I don’t think about much else, I’m going to blog about my experience submitting a paper to NEJM and will share all the ups and downs…. cross your fingers for ups!
Update: April 28, 2010
The goal was to submit the paper today. But right before my advisor and I were about to submit the final draft of the paper, and I realized that I left out a whole set of analyses! Doh, now I have to go back to the database to extract more patient records and analyze another set. Looks like, it won’t be today.
Update: April 29, 2010
Okay, made a whole bunch of new figures today, modified the text where needed and sat down with my advisor again. We made some final edits (some of which we should have caught in the previous 16 iterations of the manuscript), but alas we feel great about the paper. Personally, I think it’s a work of art and couldn’t imagine it getting rejected
. Don’t worry, I’m not allowing my hopes to get too high. My advisor let me submit the paper and click on all the “double-check-your-submission” links. In his words “you’re not going to be doing this that often, so you might as well click around.” It was fun and it’s amazing I even get to submit to the NEJM, really.
Paper status is now “Submitted” and we got a confirmation email that it will be forwarded to the editors. Time to order some flowers and wine for our collaborators!
Update: April 30, 2010
I have been neurotically checking the author website at NEJM and today our paper was “Assigned to an Editor”, I have no idea exactly what that means, but it’s movement!
Update: May 2nd, 2010
I went on the website today (yes, and yesterday too), not expecting any updates over the weekend, but much to my surprise the status of the paper has changed. It looks like it made passed the editor and they are now looking for peer reviewers. According to a close friend getting passed the editors is a big deal and a lot of papers don’t make it passed that point. Very exciting! — I just read on the NEJM website about the editorial process and it seems that it has been read by the Editor-in-chief and also another expert editor and has passed both of their filters. Here’s to the reviewers liking it! [crosses-fingers]
Paper status is now “Searching for Reviewers.”
Update: May 10th, 2010
It’s been one week and one day since the last update, and I was starting to think that maybe the next update would come when the reviews came back. That is not the case, however. Looks like they found some reviewers for the paper! Not sure how long they have to review the paper, probably a few weeks at least I imagine. I‘ll check with my PI and add that info in here. Looks like its 2 to 3 weeks.
Paper status is now “Out for Review.”
Update: May 20th, 2010
The reviews of the paper have been returned to the Journal, but a decision has not yet been made. The next step is for the editorial board to discuss the paper and make a decision. I’m not sure how long this process takes, but every other time the status included the word “editor” it only took a few days to get another update. Perhaps I will hear something by weeks end. YIKES! This is getting real.
Paper status is now “With the Editor.”
Update: May 25th, 2010
It’s been a serious roller-coaster ride and I have had quite the experience submitting to the world’s most prestigious journal. The reviews came back a few days ago and we just got a chance to read them today. As far as reviews for The Journal go, they are quite benevolent and really quite positive. They made some great suggestions on how to improve the paper and I have already made most of the changes they suggested (they were quite minor). Unfortunately, for us, the editors were not as favorable on us as the reviewers were and they rejected our paper today. Perhaps the paper is too bold for the New England Journal, perhaps it’s ahead of its time. Perhaps, they just don’t like me or my parentage — I simply can’t be sure. But, what I do know is that this is some of the best work I have ever done and there are many other Journals out there. I will get the good word out about this discovery one way or another.
Paper status is now “Rejected.”
Tags: nejm
Posted March 27th, 2010 by Spicy
I just found this blog post on kpumuk.info here (http://kpumuk.info/mac-os-x/customizing-iterm-creating-a-display-profile-with-pastel-colors/) and it has changed my iTerm life. I used to be a Terminal.app fanboy but between TextMate’s iTerm integration and this color theme, I am a fully iTerm man now. Because this has changed my life so much, I’m going to repost the script that sets the default iTerm color scheme to this beautiful pastel on dark style.
I’m only posting this for prosterity sake, you should really go to the original blog post (link above) for more detailed information.
Close down iTerm and run this bash script from Terminal. Open up iTerm and you’ll see the changes.
#!/bin/bash
PASTEL=’”Pastel” = {
“Ansi 0 Color” = {
“Blue Component” = 0.3097887;
“Green Component” = 0.3097887;
“Red Component” = 0.3097887;
};
“Ansi 1 Color” = {
“Blue Component” = 0.3764706;
“Green Component” = 0.4235294;
“Red Component” = 1;
};
“Ansi 10 Color” = {
“Blue Component” = 0.6727703;
“Green Component” = 1;
“Red Component” = 0.8094148;
};
“Ansi 11 Color” = {
“Blue Component” = 0.7996491;
“Green Component” = 1;
“Red Component” = 1;
};
“Ansi 12 Color” = {
“Blue Component” = 0.9982605;
“Green Component” = 0.8627756;
“Red Component” = 0.7116503;
};
“Ansi 13 Color” = {
“Blue Component” = 0.9965209;
“Green Component” = 0.6133059;
“Red Component” = 1;
};
“Ansi 14 Color” = {
“Blue Component” = 0.9970397;
“Green Component” = 0.8763103;
“Red Component” = 0.8759136;
};
“Ansi 15 Color” = {
“Blue Component” = 1;
“Green Component” = 1;
“Red Component” = 1;
};
“Ansi 2 Color” = {
“Blue Component” = 0.3764706;
“Green Component” = 1;
“Red Component” = 0.6588235;
};
“Ansi 3 Color” = {
“Blue Component” = 0.7137255;
“Green Component” = 1;
“Red Component” = 1;
};
“Ansi 4 Color” = {
“Blue Component” = 0.9960784;
“Green Component” = 0.7960784;
“Red Component” = 0.5882353;
};
“Ansi 5 Color” = {
“Blue Component” = 0.9921569;
“Green Component” = 0.4509804;
“Red Component” = 1;
};
“Ansi 6 Color” = {
“Blue Component” = 0.9960784;
“Green Component” = 0.772549;
“Red Component” = 0.7764706;
};
“Ansi 7 Color” = {
“Blue Component” = 0.9335317;
“Green Component” = 0.9335317;
“Red Component” = 0.9335317;
};
“Ansi 8 Color” = {
“Blue Component” = 0.4862745;
“Green Component” = 0.4862745;
“Red Component” = 0.4862745;
};
“Ansi 9 Color” = {
“Blue Component” = 0.6901961;
“Green Component” = 0.7137255;
“Red Component” = 1;
};
“Anti Alias” = 1;
“Background Color” = {
“Blue Component” = 0;
“Green Component” = 0;
“Red Component” = 0;
};
Blur = 1;
“Bold Color” = {
“Blue Component” = 0.5067359;
“Green Component” = 0.5067359;
“Red Component” = 0.9909502;
};
Columns = 120;
“Cursor Color” = {
“Blue Component” = 0.3764706;
“Green Component” = 0.6470588;
“Red Component” = 1;
};
“Cursor Text Color” = {
“Blue Component” = 1;
“Green Component” = 1;
“Red Component” = 1;
};
“Disable Bold” = 0;
Font = “Monaco 14″;
“Foreground Color” = {
“Blue Component” = 1;
“Green Component” = 1;
“Red Component” = 1;
};
“Horizontal Character Spacing” = 1;
NAFont = “Monaco 14″;
Rows = 24;
“Selected Text Color” = {
“Blue Component” = 0.9476005;
“Green Component” = 0.9476005;
“Red Component” = 0.9476005;
};
“Selection Color” = {
“Blue Component” = 0.5153061;
“Green Component” = 0.2224857;
“Red Component” = 0.2099074;
};
Transparency = 0.1;
“Vertical Character Spacing” = 1;
};’
DISPLAYS=`defaults read net.sourceforge.iTerm Displays | sed “s/}$//”`
DISPLAYS+=$PASTEL
DISPLAYS+=”}”
defaults write net.sourceforge.iTerm Displays “$DISPLAYS”
echo “Pastel display profile added”
BOOKMARKS=`defaults read net.sourceforge.iTerm Bookmarks | sed ’s/”Display Profile” = “[^"]*”;/”Display Profile” = “Pastel”;/’`
defaults write net.sourceforge.iTerm Bookmarks “$BOOKMARKS”
echo “Pastel display profile installed as default”
Tags: colors, iTerm, themes
Posted February 17th, 2010 by Spicy
Sigmoid functions are our friends and sometimes you have data which you would like to fit with a sigmoid function. We can use R to find such a fit. First let us look at a sigmoid function.
y = 1 / (1 + exp( -a*x + b) )
Now let’s say you are given a vector x and y, say:
x = c(0.00,0.02,0.04,0.06,0.08,0.10,0.12,0.14,0.16,0.18,0.20,0.24,0.26,
0.28,0.30,0.34,0.40,0.42,0.48,0.54,0.56,0.64,1.00)
y = c(0.409742,0.319277,0.530120,0.377778,0.357143,0.608696,0.315789,
0.692308,0.642857,0.636364,0.750000,0.000000,0.833333,1.000000,
0.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,
1.000000,1.000000)
In this case the y values here represent probabilities and one thing you’ll notice is that we have probs of 1 and 0. Both of which are bad. So we apply a little “laplace smoothing” to them:
y[y==0] = 0.001
y[y==1] = 0.999
Now let’s look at what the data looks like.
plot(x, y)

Well, it may be sigmoidal, maybe not. For now let’s assume we think it is. Which we do for the most part.
Okay, now let’s solve for a line in our sigmoid function:
y = 1 / (1 + exp( a*x + b) )
1 + exp( a*x + b) = 1/ y
a*x + b = log ( (1/ y) – 1 )
Now the left hand side of the equation is a line and the right hand side is some logarithm of the y data. We can plot x versus this right hand side:
new_y = log( 1 / y – 1 )
plot(x, new_y)

Looks pretty interesting and hopefully at this point it also looks kinda linear, which it kinda does.
Now let’s fit it with a line:
lm.res <- lm( new_y ~ x )
lm.res
Which produces this output:
Coefficients:
(Intercept) x
1.122 -11.647
We can also test the significance of the fit with an ANOVA.
anova(lm.res)
Which produces this output:
Analysis of Variance Table
Response: new_y
Df Sum Sq Mean Sq F value Pr(>F)
x 1 172.80 172.802 14.641 0.0009834 ***
And we can plot the resulting fit in linear space:

Now let’s see how our fit looks back in normal space using our formula with our derived a and b values.
a = -11.647
b = 1.122
plot(x, y)
sim_x = (1:101-1)/100
points(sim_x, 1/(1+exp(a*sim_x+b)), type=”l”)

Voila! We have fit a sigmoid function to our data.
Tags: math, R, sigmoid
Posted August 29th, 2009 by Spicy
Just got snow leopard in the mail and was so excited to install. Then got on Twitter to see what my friends were up to:
http://twitter.com/caddymob
I think I’m waiting now.
UPDATE:
Jason posted details describing his troubles and how he worked around it here:
http://corneveaux.com/blog/installing-snow-leopard-a-big-fail-and-a-work-around
Tags: fail, os x, snow leopard
Posted August 23rd, 2009 by Spicy
Just found a new data set that I couldn’t help running some stats on. OpenSecrets.org published this table which lists all of the members of the house, the number of earmarks they requested, and the total dollar amounts.
The columns of the data are:
- Representative Name
- State
- Number of Earmarks
- Total Cost
- Solo Earmarks
- Solo Cost
The solo columns are for earmarks where that representative was the only representative who requested the earmark.
Republicans vs. Democrats
The first obvious division is to split the data on party lines and see if their behavior is any different.
| Column |
Mean Democrats |
Mean Republicans |
P-value |
Histogram |
| Total Earmarks |
26.8 |
22.3 |
3.26E-4 |
 |
| Total Cost |
$37,402,953 |
$30,683,681 |
0.02873 |
 |
| Solo Earmarks |
10.3 |
9.2 |
0.0925 |
 |
| Solo Cost |
$7,606,210 |
$7,746,574 |
0.7782 |
 |
Red: Republicans, Blue: Democrats. Significant p-values are in bold.
Table 1. The above table shows that the average number of earmarks that are approved is significantly higher for democrats than for republicans and also that democrats get significantly more money for their earmarks than republicans do. Please note that when I say “significantly” I mean it in a statistical sense. The p-values (or the probability that the difference between democrats and republicans is purely by chance) for the first two rows of the table are signifiant ( less than 0.05). You can interpret this as having a less than 5% chance of this occurring completely by chance. However, when looking at solo earmarks there is not a significant difference in the number of earmarks granted or their cost.
For the Statisticians: To calculate the p-value I used the wilcoxon rank sum test as the distributions are not normally distributed.
However, I feel obligated to point out that because the house has a majority of democrats (237 to 163) it may be easier for democrats to get their earmarks passed, thus there are more for democrats. For comparison, data from when the GOP has control of the house is required.
Posted July 29th, 2009 by Spicy
A few friends of mine have started a new Science Jobs blog were they muse about what it’s like to look for and work in science related jobs in this economic climate. Check it out at SearchScienceJobs.com
Posted May 26th, 2009 by Spicy
A friend of mine, and neuroscience graduate student at Case Western Reserve University are conducting a study into the genetic basis of hearing the following sound:
http://tinyurl.com/2wjoxy
NPR recently did a story that teenagers have been using the above sound as a ring tone to evade the prying eyes ears of adults.
So we started a little investigation of our own, and we need your help! Just click on that sound file, play it, and respond in the comments with your age, gender, and if you can hear it or not.
SCIENCE!
Tags: hearing, mosquito, Science
Posted May 9th, 2009 by Savitri
(SPOILER ALERT, don’t read if you haven’t seen the new movie)
My Trekkie heart has melted! I am in love and I won’t deny it. I am ready to stand up on the roof tops and proclaim my love for the series that, up until last night, I believed was forever destined for re-run nostalgia. Too much?
Too bad! I am thrilled with the new movie. I am head over heals for the young, sexy, talented new cast and am delighted that the writers tackled the new/old story line with a splash of nostalgia and a heap of creativity.
It’s a whole new game now, we can again visualize a Star Trek story line that isn’t confined to the plot devices that were relevant 10, 20, 30, or even 40 years ago. I love that I don’t have to worry about how what happened in this story might affect my beloved Picard (le sigh Jean Luc). I don’t have to worry about plot lines that no longer make sense (with the major exception of Spock Prime living out his life in a parallel universe as opposed to the universe we all know and love). In all honesty, this is a huge relief.
Besides, this new cast brought the “sex” back to the series. Never had I thought to think of what a restrained yet sensual kiss from a Vulcan might be like. Thank you Zachary Quinto for making it abundantly clear that T’Pol was not the only sexy Vulcan in existence. I am doing my best not to sound like an obsessed fan-girl, but I don’t think I am succeeding. Forgive me men if you do not share my good opinion in the lusciousness of the Spock-Uhura kiss.
More to that point, as a woman, I always had a hard time relating to Kirk. In TOS he was the John Wayne of the Federation. No rules, lots of sex, and your mans-man! But after Chris Pine’s performance, I feel like I understand Kirk better. All of the above still holds true, but it just makes sense now. Don’t bash me for not “getting it” sooner, I am just a little late to arrive on the Captain Kirk bandwagon. Oh, I almost forgot to mention, the young Kirk is super sexy too.
I know that I am a minority in the Trek Universe (being young and female), so perhaps my male counter-parts won’t share the same passion that I do for this new/old series. I know there are things to complain about when a favorite story attempts to expand in a new direction (don’t get me started on the Harry Potter movie franchise), but I think that this deserves an “A” for effort! Keep ‘em comin’ boys.
Tags: Savitri, Star Trek
Posted April 17th, 2009 by Spicy
In the Biomedical Informatics department here at Stanford we do a lot of coding and scripting. Since our emphasis is on usefulness and implementation speed we rely heavily on high level programming languages.
The “old-school” informaticists have relied on Perl (yes, Perl) to develop these scripts. But in the modern ages where languages like Python and Ruby are available to us, we don’t need to be knee deep in archaic idioms and clunky syntax. I have been relying on Python for years now. My implementation speed has increased substationally, I have less headaches, and life is generally better.
It turns out, however, that many of my colleagues and peers have a great appreciation for Ruby, which seems to be gaining a lot of traction lately. As a self-named agile software developer I feel it would hypocratic if I didn’t pick up Ruby. Afterall I need to have as many tools in my box as possible and learning Ruby will only make me a better informaticist.
My first impressions for Ruby have been very positive. It is a truly object oriented language in ways that Python falls short. Also I just love the dual implementation of most of the methods for when you want to modify the instance or you would rather return it. For example, say we have a list:
list = [2,1,3]
newlist = list.sort
list.sort!
The method call with the exclamation point at the end mutates the instance ‘list’ while without it, it will return a new list. This is one of my biggest griefs with Python. It causes code that should only take one like, take three. (Not to mention just trying to remember which way the method works)
Python
a = [2,3,1,5]
a.sort()
a.reverse()
Ruby
a = [2,3,1,5].sort.reverse
You just can’t argue with that. Also I found this great resource for Ruby. If you are an experienced programmer (especially if you are familiar with high level languages) this page basically teaches you everything you need to know about Ruby to get started.
Posted April 5th, 2009 by Spicy
As you all may or may not know, I am plotting to take over the world. While up until now I have had about as much success as a cheese sandwich, I think this latest attempt is sure to succeed.
You see, what better way to take over the world than to make all peoples feel self-important and over-confident. My latest iPhone toy, LaughTrack, allows you to carry around a studio audience in your pocket. All your jokes will be laughted at. All your snide comments, joyfully giggled at. All your great accomplishments will be cheered and applauded. This makes you and everyone else feel like a star and as such you want others (namely me) to do your bidding. This will make all of you hand over enormous amounts of control over your lives to me. With this new control I will spread LaughTrack even deeper into all societies and …. I think you see where this is going.
You may think that it is foolish for me to divulge this fiendish plot to the very people from which I will extract their freedom, but I know it’s okay, because I’m getting loads of applause and cheering from the audience.
Check out more on LaughTrack or buy it from iTunes ($0.99).