Tutorials

Make a table with ligands and receptors in R with OmnipathR

2020-11-24

Curated lists of genes help computational biologists to focus analyses on a subset of genes that might be important for a research question. For example, we might be interested to focus on the genes encoding the signals and receptors for cell-to-cell communication. OmnipathR is a new R package that provides access to a vast database of genes called OmniPath, organized and curated by the Saez-Rodriguez Lab. Let's try to use OmnipathR to create a simple table with ligands and receptors.

Make a table with your most recent coauthors in R

2020-08-13

Some grant agencies might require a table that lists all of your coauthors, departments, and dates for publications from the last few years. Making such a table can be a laborious task for academics who publish papers with a lot of coauthors. Here, we'll download our publication records from NCBI and use R to automatically make a table of coauthors.

Working with a sparse matrix in R

2020-03-11

Sparse matrices are necessary for dealing with large single-cell RNA-seq datasets. They require less memory than dense matrices, and they allow some computations to be more efficient. In this note, we'll discuss the internals of the dgCMatrix class with examples.

Harmony in motion: visualize an iterative algorithm for aligning multiple datasets

2019-08-25

Harmony is a an algorithm for aligning multiple high-dimensional datasets, described by Ilya Korsunsky et al. in this paper. When analyzing multiple single-cell RNA-seq datasets, we often encounter the problem that each dataset is separated from the others in low dimensional space – even when we know that all of the datasets have similar cell types. To address this problem, the Harmony algorithm iteratively clusters and adjusts high dimensional datasets to integrate them on a single manifold. In this note, we will create animated visualizations to see how the algorithm works and develop an intuitive understanding.

Extract data from a PDF file with Tabula

Kirkham et al. 2006 is a prospective 2-year study of 60 patients with rheumatoid arthritis (RA). It shows that “synovial membrane cytokine mRNA expression is predictive of joint damage progression in RA”. The PDF includes a few tables with data on cytokine measurements and correlations with joint damage. Here, we'll use Tabula to extract data from tables in the PDF file. Then we'll make figures with R.

Make heatmaps in R with pheatmap

2017-02-16

Here are a few tips for making heatmaps with the pheatmap R package by Raivo Kolde. We'll use quantile color breaks, so each color represents an equal proportion of the data. We'll also cluster the data with neatly sorted dendrograms, so it's easy to see which samples are closely or distantly related.

Build bioinformatics pipelines with Snakemake

2015-11-23

Snakemake is a Pythonic variant of GNU Make. Recently, I learned how to use it to build and launch bioinformatics pipelines on an LSF cluster. However, I had trouble understanding the documentation for Snakemake. I like to learn by trying simple examples, so this post will walk you through a very simple pipeline step by step. If you already know how to use Snakemake, then you might be interested to copy my Snakefiles for RNA-seq data analysis here.

How to ssh to a remote server without typing your password

2014-02-04

Here are a few tips to use ssh more effectively. Login to your server using public key encryption instead of typing a password. Use the ~/.ssh/config file to create short and memorable aliases for your servers. Also, use aliases to connect through a login server into a work server.