Month: March 2011

March 24th was world TB day

TB stands for tuberculosis. It’s an infectious bacterial disease caused by Mycobacterium tuberculosis, which most commonly affects the lungs. It is transmitted from person to person via droplets from the throat and lungs of people with the active respiratory disease.

Like all other World Days regarding infectious diseases, it is meant to raise awareness about its global epidemiological aspects and the efforts to eliminate it. For tuberculosis, March 24th was chosen because Robert Koch first described Mycobacterium tuberculosis on March 24th, 1882. He then received the Nobel Prize in Physiology or Medicine for this in 1905.

On the WHO website, there is a huge amount of data that can be easily parsed (here too).

I was first interested in the estimated TB incidence per 100 000 population in 2009 (per 100,000 population) in the BRIC countries (see table below). Clearly, there is Brazil with a low incidence (compared to others, it’s still around 10 times values found for “occidental” countries) then Russia and China around 100 cases/y and finally 168 cases/y for India. I added their respective Gross Domestic Product (GDP) in the table as it’s often considered as an indicator of a country’s standard of living (in 2009, numbers from Wikipedia/IMF). I also added the annual growth rate of GDP per capita (in 2006, numbers from EarthTrends/World Resources Institute). The only interesting thing I see is that if your annual growth of GDP per capita is low, your estimated TB incidence per 10,000 is also low.

Country Est. incidence GDP per capita Annual growth rate …
Brazil 45 11,289 2.4
China 96 7,518 10.1
India 168 3,290 7.7
Russian Federation 106 15,807 7.2

Now if we look at some occidental countries (table below, same sources), this seems right.

Country Est. incidence GDP per capita Annual growth rate …
Belgium 8.6 36,274 2.6
France 6.1 34,092 1.4
Germany 4.9 35,930 2.9
Japan 21 33,828 2.2
UK 12 35,053 2.2
USA 4.1 47,123 1.9

The treatment involves medications for long period and is usually accompanied by antibiotics. Regarding prevention, Bacille Calmette Guerin (BCG) is the only current vaccine for tuberculosis and contains a live attenuated (weakened) strain of Mycobacterium bovis. TB eradication is part of the UN Millenium Development Goals (Target 6c: Have halted by 2015 and begun to reverse the incidence of malaria and other major diseases). It is also part of the WHO Global Plan to Stop Tuberculosis.

Recently (because of this World TB Day?), two interesting research papers were recently published in the litterature:

R and the proxy server

R is a “a free software environment for statistical computing and graphics“. Being a desktop software, R is working out-of-the-box, even if you don’t have a network connection. However, if you want to install packages using a repository on the internet, you need a network connection (of course). If your computer happens to be behind a proxy server, you have to slightly modify your shortcut (in MS-Windows) to allow R to download packages. This can be done by modifying the “Target” field in the “Shortcut” tab of the shortcut properties (right-click on the shortcut to R, select tab “Shortcut”, edit field “Target”):

"C:\Program Files\R\R-2.12.2\bin\i386\Rgui.exe" http_proxy=http://proxyaddress:80 http_proxy_user=ask

Adapt the path to your R version, change the string “proxyaddress” by your proxy (see this previous post for a tip on this) and you’re done!

Because I never remember them, I’ll conclude this post with standard commands related to the installation of a packages:

Installing packages in R:
> install.packages("packageName", repos = "http://cran.ma.imperial.ac.uk/", dependencies = TRUE)

Notes:

  • You might get a window asking you for your firewall credentials and to choose a mirror server
  • CRAN repositories can be found here: http://cran.r-project.org/
  • This will download and install the package again, even if it is already installed

Updating packages in R:
> update.packages("deSolve") # for the deSolve package, for example

Know all packages installed in R on your computer:
> libraries()

Finally, here is a R reference card that can be useful too.

What is my proxy on Windows XP?

In computer networks, a proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients seeking resources from other servers.” From Wikipedia. This can be useful for a company to force its employees to use a proxy (to filter where they surf, to cache the web content for speed issues, to keep machines on the network anonymous, etc.). This post will look at 3 ways to get the proxy definition for a Windows XP machine in order to use that information in another program. It may work in other Windows-type operating systems.

The first one is to use the command line tool proxycfg but this is different from the one that may be used by Internet Explorer, see here. On my corporate PC, there is no proxy defined this way. But there is one defined in Internet Explorer.

So, in Internet Explorer, to see the proxy connection, you go in the “Tools” menu -> “Internet Options” -> “Connections” tab. And then click on the “LAN settings” button. But this can be blocked by your PC administrator (it’s my case) so let’s look at the other options.

Another option is to use the Firefox (if your company allows you to use it): in the “Tools” menu -> “Options” -> “Advanced” tab -> “Network” tab, in the box named “Connection”, click on the “Settings” button. Then:

  • You have no luck if the settings are auto-detected.
  • If the option “No proxy” is chosen, your company doesn’t use a proxy.
  • If the option “Use system proxy settings” is chosen, you should have seen the proxy with the command line tool proxycfg above.
  • If the option “Manual proxy configuration” is chosen, you can directly read the parameters.
  • If the option “Automatix proxy configuration URL” is chosen, you can copy-paste the link given in the text field in the address bar to see how Firefox will determine which proxy to use. This page is just a bit of code that tells Firefox in which conditions it should use what proxy. You can find some details here or elsewhere on the web. You have to use the value just after the string “PROXY“. For instance, your proxy is “LOCATIONPROXY01” if your proxy string is “PROXY LOCATIONPROXY01“. If there are many proxy definitions, you have to try to understand the logic behind the .pac file if you want to be sure to find the correct one. Or you can try all of them (brute-force) and you’ll find the one that works.