Using LaTeX with WordPress

I've been meaning to learn LaTeX for a while now (among all the other things I want to learn). Here I just illustrate examples of using LaTeX with WordPress, with respect to displaying vectors and matrices.

To display LaTeX, I just need to surround the code with two starting dollar signs (\$\$) and two closing dollar signs (\$\$), without the escapes. Here I just recreate some of the mathematical notation from this tutorial on SVD, as an exercise to learn LaTeX notation and to remember the useful concepts on vectors and matrices explained in the tutorial.

Continue reading

Using tabix

Updated 2013 November 20th

Tabix as described in the abstract of the paper:

Tabix is the first generic tool that indexes position sorted files in TAB-delimited formats such as GFF, BED, PSL, SAM and SQL export, and quickly retrieves features overlapping specified regions. Tabix features include few seek function calls per query, data compression with gzip compatibility and direct FTP/HTTP access. Tabix is implemented as a free command-line tool as well as a library in C, Java, Perl and Python. It is particularly useful for manually examining local genomic features on the command line and enables genome viewers to support huge data files and remote custom tracks over networks.

When I came across tabix a couple of years ago, I looked at the paper and also the man page and while I felt it could be extremely useful, I didn't really appreciate the role it served. Now that I've seen what a colleague has achieved with it, I can see the light. Here I demonstrate with two simple examples some of the advantages of using tabix, namely speed and compression.

Continue reading

Epigenetics

For the past week I've been attending the:

Karolinska Institutet - RIKEN Joint International Doctoral Course on "Epigenomics: Methods and Applications to Disease and Development"

Today is the last day of the course and the course participants have to come up with a proposal that combines epigenetics and its application to a particular disease (our group chose cancer). I've written notes about epigenetics previously here and also about H3K27ac. Here, I'd just like to share some things I've learned in the past week.

Each time I'm introduced to epigenetics I'm shown this image:

epigenetic_landscapeThe epigenetic landscape

and I'm told that epigenetics refers to the heritable modifications that are not directly related to the DNA sequence. Perhaps I'm thicker than most people but the first time I read "not directly related to the DNA sequence", I got confused. Here's how I would have preferred it to be explained:

DNA is a physical entity inside a cell and as such is subjected to biochemical and mechanical forces that act upon it. Depending on the type of force, DNA will be altered such as from DNA methylation, a biochemical reaction. This alteration has downstream consequences on whether the DNA can be accessed and processed into RNA. Note that the DNA sequence is not directly manipulated but only the physical properties of DNA. These manipulations are referred to as epigenetics and are heritable and regulated.

I'm not sure how accurate my definition is but if epigenetics was explained like that to me, I would have appreciated the term more. In relation to the epigenetic landscape image, I would relate back to my description and explain how these different types of forces can push the ball down into different paths that ultimately determine the fate of the ball/cell.

So what are these "forces" that I referred to? In our course we were first introduced to DNA methylation and histone modification, and they would be two types of forces that act upon DNA. DNA methylation is the covalent addition of a methyl group to the C5 position of cytosine within CpG dinucleotides, which are often clustered as CpG islands in the promoter regions of genes. The speaker also introduced a paper that described CpG shores, which are further away from CpG islands, and have a lower density of CG nucleotides, which are sometimes are much more methylated/demethylated that CpG islands. DNA methylation is an important regulator of gene transcription and usually, high levels of methylation in the promoter region of genes results in gene silencing. However, yesterday's presentation showed an example where DNA methylation resulted in the inability of CTCF to bind to its target, resulting in a downstream enhancer being able to active its target. So there are always exceptions to the rules.

When I was first reading about histones, it wasn't clear to me what role histones play in gene regulation. So I randomly chose a histone modification and wrote about it anyway. I am quite surprised to see that when I Google H3K27ac, my post came up on the front page of results because surely there are much better references out there on the internet. Anyway, histones are proteins that have these tails that are normally positively charged due to amine groups present on their lysine and arginine amino acids. DNA is negatively charged so they normally stick to histones i.e. a mechanical force that packages DNA. The charge of the tails can be altered via histone modifications and DNA can be accessible or inaccessible depending on the charge of the histone tail. It turns out that different types of chemical modifications on the histones tails govern the role of that particular DNA sequence. You may have seen in papers talking about different histone modifications, such as H3K4me3 or H3K9ac. See my tweet for a nice table that summarises different histone marks and their associated functions.

During the week we were introduced to different types of technologies that could check the methylation status of DNA, the types of histone modifications and chromatin conformation. I learned of the Illumina methylation arrays and relearned ChIP-Seq. We were also introduced to MeDIP, bisulfite sequencing, DNase I hypersensitive assays, FAIRE-Seq, MNase-Seq and ChIA-PET. I won't write about these technologies.

So how does DNA methylation and histone modifications relate to cancer? It has been known that hypomethylation of oncogenes and hypermethylation of tumour suppressor genes have been known to cause cancer. So genes that should be methylated are not i.e. are activated, and genes that suppress tumours are turned off i.e. deactivated. Since histone modifications have a large role in governing the role of DNA sequence, aberrant modifications that result in turning on oncogenes and turning off tumour suppressor genes can also result in cancer formation. There is also another indirect level in that the genes important for carrying out DNA methylation (DMNT), or histone acetylation (histone acetyltransferase) and deacetylation (histone deacetylase) can be mutated thus resulting in cancer.