Time and again, you need to write a paper in LaTeX with at lot of citations from PubMed. And we all know that PubMed does not support the BibTex format. Fortunately, you do not have to go through the pain of a manual conversion. If you are familiar with basic scripting, this can be done fairly easily with the following steps.
Write your TeX document with pubmed citation numbers. Each article on pubmed has a pmid which consists of numbers only, which is the key of the PubMed record of this article. For instance, when you cite the PubMed article 22999052 in your TeX document you would write
Extract the pmids from the tex document. For instance, if your TeX document is called
document.tex, at the Linux command line you can do this with
grep -o "pmid[0-9]*" document.tex | sort -u | sed 's/pmid//'
Use the eFetch API to get the PubMed records in XML format. Assuming that you now have a comma-separated list of pmids somewhere ready (in the example below, the pmids are
22999052,21813512), paste the following in your browser text box (or open this link in a new...
The culture of meetings varies a lot between research teams. Most labs have a team meeting and a journal club, with a wide variation in frequency, duration and topics between labs. As the principal investigator, you want good scientific discussion in the team, but this comes at a cost that we often underestimate (I found Jason Fried's TED talk why work does not happen at work very instructive about this).
Our lab itself is an ongoing experiment and through trial and error we have learned a few things about scientific discussions that are worth sharing. Our first attempt to promote communication were 5 minute micro-meetings between two people. During this time, they were supposed to explain they will do during the day, and why. The meetings were twice a week, with a rotation schedule. Even if everybody liked the idea, it turned out to be unsustainable because synchronization between the two people did not happen naturally. At the time one got a 5 minute break, the other would be in the middle of a technical experiment and so on. After skipping a few meetings, the momentum was lost and they quickly died out.
Our second attempt...
If you type the keyword “SWI/SNF chromatin remodeling” and “HIV-1” in PubMed, less than 20 research articles appear on your screen. Actually, the topic of nucleosome remodeling of HIV-1 provirus is less than 10 years old. The more we investigate HIV-1, the more we know that the connection between host chromatin and HIV-1 pathogenesis cannot be ignored.
The integration of HIV-1 provirus into the cellular genome is an essential mechanism for the establishment of stable infection. After this step, how the HIV-1 provirus further manipulates chromosomal features to continue its life cycle is therefore considered important. SWI/SNF is one of the main actors involved in the alteration of DNA accessibility within repressive nucleosomes. In fact, back in 1996, the SWI/SNF regulator has been found in the RNA polymerase II holoenzyme and has been reported to be involved in chromatin remodeling . Later, it was realized that the SWI/SNF complex found in both eukaryotes and prokaryotes is actually a group of proteins that associate to remodel the nucleosome state (active or repressive). SWI/SNF contains either Brahma (BRM) or the closely related BRG1 as its catalytic subunit and shares...
Every now and then I need to make a rotating animation of a 3D plot. The R package
rgl turns out to have everything you need, but the grip is a little difficult. Below is an example that will walk you through the steps to make this animation.
First things first, you must make sure that
rgl is installed. On Unbuntu, you may also have to install additional libraries. And by the end, you will need to use
imagemagick, so at the shell command line you can issue
sudo apt-get install libglu1-mesa-dev
sudo apt-get install imagemagick
You can now start R. Since the package is on the CRAN, you can install it as usual.
For the purposes of this example, we create a random 3D cloud that consist of two Gaussian spheres next to each other.
# Distribute 1000 points at random among two spheres.
x <- matrix(rnorm(3000, mean=rep(c(0,2), each=1500)),
cols <- rep(c("dodgerblue4", "dodgerblue2"), each=500)
Now we plot the cloud in 3D and save the frames to different .png files. After the call to
plot3d you can resize the window...
Since the outbreak of AIDS more than 30 years ago in the United States, HIV/AIDS is still one of the top ten causes of death worldwide . One of the difficulties to cure HIV/AIDS is due to the lack of an effective HIV vaccine, although numerous laboratories are searching for it.
In 1995, David Ho first promoted a “hit hard, hit early” approach to eliminate HIV-1 infection in the early phase of the infection . Yet, later on this approach was abandoned because of the high risk of side effects and the high cost of the treatment, this approach is still a milestone in the history of HIV/AIDS treatment. Nowadays, the standard approach for HIV/AIDS treatment is based on the standard antiretroviral therapy (ART) combining at least three antiretroviral (ARV) drugs to maximally suppress the HIV virus and stop the progression of HIV disease. Typical combinations include 2 nucleoside Reverse Transcriptase Inhibitors (NRTIs) + 1 Protease Inhibitor (PI) or 2 NRTIs + 1 non-nucleoside Reverse Transcriptase Inhibitor (NNRTI) . Clinical studies showed that ART is able to impressively decrease the mortality of AIDS patients.
It was gradually realized that one of the main reasons...
For a long time I wondered how R was able to recognize gzipped files and decompress them on the fly. This is neat because the large data files that we manipulate in bio-informatics are better kept compressed on the disk and decompressed upon loading them in memory.
Most binary file formats start with a magic number, indicating which file type it is. A properly gzipped file starts with
1F8B. You need to read the first two bytes, and once you figure out whether the file is compressed, you either read the file as usual, or read it with the functions of the
Here I wrote a small module called
gzopen.py. After importing the class
gzopen, you can use it to seamlessly open gzipped files.
# -*- coding:utf-8 -*-
"""Generic opener that decompresses gzipped files
if needed. Encapsulates an open file or a GzipFile.
Use the same way you would use 'open()'.
def __init__(self, fname):
f = open(fname)
# Read magic number (the first 2 bytes) and rewind.
magic_number = f.read(2)
# Encapsulated 'self.f' is a file or a GzipFile.
if magic_number == '\x1f\x8b':
self.f = gzip...
I have been inspired to study virology by the movie Outbreak directed by Wolfgang Petersen in 1995. Since that time, I have been wondering how this tiny monster is so powerful as to bring disasters in our daily life. With this question always in the back of my mind, I walked into the world of microbes trying to reveal its mystery.
My current work in the laboratory is on the Human Immunodeficiency Virus type 1 (HIV-1), which causes Acquired Immuno-Deficiency Syndrome (AIDS). The phenomenon that most caught my attention is that HIV-1 is able to keep itself silent during the infection, which is called latency. Latent viruses are like a dormant volcano; they can be reactivated any time in favourable conditions. Therefore HIV-1-infected patients need to receive Highly Active Antiretroviral Therapy (HAART) with no interruption. Plasma virus rises within two to three weeks after discontinuation of HAART (from 20 to 50 RNA copies per mL, see Davey et al., 1999 for detail).
In order to be silent and invisible, HIV-1 needs secret places to hide and to make the infection persistent. Such special environments are called reservoirs, where viruses persist for longer...
Perhaps some of you have read my first post on The Grand Locus. That was already two years ago. Back then I was a beginner group leader. Back then I was enthusiastic. Back then I believed in openness.
Well, guess what, nothing has changed. I am still a beginner, I am still enthusiastic, and I still believe in openness. There will be blog, but this time I am not alone. I’ve got the most amazing team with me. So let’s get started with the Lab Notes.