HiC vignette for GenomicInteractions package

Introduction

This vignette shows you how GenomicInteractions can be used to investigate significant interactions in HiC data that has been analysed using HOMER software [1]. GenomicInteractions can take a HOMER interaction file as input.

HiC data comes from chromosome conformation capture followed by high-throughput sequencing. Unlike 3C, 4C or 5C, which target specific regions, it can provide genome-wide information about the spatial proximity of regions of the genome. The raw data takes the form of paired-end reads connecting restriction fragments. The resolution of a HiC experiment is limited by the number of paired-end sequencing reads produced and by the sizes of restriction fragments. To increase the power to distinguish real interactions from random noise, HiC data is commonly analysed in bins from 20kb - 1Mb. There are a variety of tools available for binning the data, controlling for noise (e.g. self-ligations of restriction fragments), and finding significant interactions.

The data we are using comes from this paper [2] and can be downloaded from GEO. It is HiC data from wild type mouse double positive thymocytes. The experiment was carried out using the HindIII restriction enzyme. The paired-end reads were aligned to the mm9 mouse genome assembly and HOMER software was used to filter reads and detect significant interactions at a resolution of 100kb. For the purposes of this vignette, we will consider only data from chromosomes 14 and 15.

Making a GenomicInteractions object

Load the data by specifying the file location and experiment type. You can also include an experiment name and description.

The GenomicInteractions class is an extension of the GInteractions class from the InteractionSet package. The object contains a set of regions involved in interactions, stored as a GRanges object, and two sets of indices giving the regions involved in each interaction (the anchors). Metadata for each interaction (e.g. p-value, FDR) is stored as a DataFrame accessed by mcols() or elementMetadata(), similar to the metadata of a simple GRanges. You can also access single metadata columns using $.

The set of all regions included in the object can be accessed using regions(), or the first and second anchors of the interactions can be accessed using anchors(). You can also choose to just return the indices of the ranges of regions() that correspond to the anchors.

We also provide convenience functions anchorOne and anchorTwo to return the first/second anchors as GRanges.

Some anchors are shorter than 100kb due to the bin being at the end of a chromosome. There are 23276 interactions in total, with a total of 447000 reads supporting them. To calculate the average number of reads per interaction, first use interactionCounts() to get the number of reads supporting each individual interaction.

head(interactionCounts(hic_data))

## [1] 344 373 258 397 213 441

mean(interactionCounts(hic_data))

## [1] 19.204

However, since we have FDRs and p-values, it is probably more informative to use these to find interactions of interest. Note that the FDR column in the dataset will be named differently depending on the number of interactions in your data. For simplicity in this document we will rename it!

Summary statistics

The package provides some functions to plot summary statistics of your data that may be of interest, such as the percentage of interactions that are between regions on the same chromosome (cis-interactions) or on different chromosomes (trans-interactions), or the number of reads supporting each interaction. These plots can be used to assess the level of noise in your dataset - the presence of many interactions with high FDRs or low read counts suggests that the data may be noisy and contain a lot of false positive interactions. You can subset the GenomicInteractions object by FDR or by number of reads.

sum(hic_data$fdr < 0.1)

## [1] 8171

hic_data_subset <- hic_data[hic_data$fdr < 0.1]

plotCisTrans(hic_data)

plotCisTrans(hic_data_subset)

plotCounts(hic_data, cut=30)

plotCounts(hic_data_subset, cut=30)

Subsetting by FDR will tend to remove interactions that are supported by fewer reads. Trans interactions tend to have lower read support than cis interactions, so the percentage of trans interactions decreases.

Annotation

One of the most powerful features of GenomicInteractions is that it allows you to annotate interactions by whether the anchors overlap genomic features of interest, such as promoters or enhancers.

Genome annotation data can be obtained from, for example, UCSC databases using the GenomicFeatures package. We will use promoters of Refseq genes extended to a width of 5kb. Downloading all the data can be a slow process, so the data for promoters for chromosomes 14 and 15 is provided with this package.

We will also use a set of putative enhancers defined in Shen et al 2012 using mouse ENCODE data.

annotateInteractions takes a list of features in GRanges or GRangesList format and annotates the interaction anchors based on overlap with these features. The list of annotation features should have descriptive names, as these names are stored in the annotated GenomicInteractions object and used to assign anchor (node) classes.

## Warning in annotateInteractions(hic_data_subset, annotation.features): Some
## features contain duplicate IDs which will result in duplicate annotations

## Annotating with promoter ...

## Annotating with enhancer ...

In addition, the features themselves should have names or IDs. These can be the names() of the feature object, or an “id” metadata column (note lowercase). These names or IDs for each feature are stored in the metadata columns of the regions of the GenomicInteractions object. Each anchor may overlap multiple features of each type, so the columns containing feature names or IDs are stored as lists.

Node classes

Node classes (or anchor classes) are assigned to each anchor based on overlap with annotation features and the order of those features within the list passed to the annotation function. If the list is list(promoter=..., transcript=...) then an anchor which overlaps both a promoter and a transcript will be given the node class “promoter”. The features earlier in the list take priority. Any anchors which are not annotated with any of the given features will be assigned the class “distal”. In this case anchors can be “promoter”, “enhancer”, or “distal”.

As the anchors are large, most of them overlap at least one promoter or enhancer.

table(regions(hic_data_subset)$node.class)

##
## distal enhancer promoter
## 989 275 890

Interaction types

Interaction types are determined by the classes of the interacting nodes. As we only have two node classes, we have three possible interaction classes, summarised in the plot below. Most of the interactions are between promoters. We can subset the data to look at interaction types that are of particular interest.

plotInteractionAnnotations(hic_data_subset, legend = TRUE)

Distal regions interacting with a promoter may contain regulatory elements such as enhancers or insulators. To get all promoter–distal interactions:

As this is a common type of interaction of interest, there is a function specifically for identifying these interactions (see the reference manual or help(isInteractionType) for additional built in interaction types). isInteractionType can be used with any pair of node classes. There are also functions for identifying cis or trans interactions.

length(hic_data_subset[is.pd(hic_data_subset)])

## [1] 492

sum(is.trans(hic_data_subset))

## [1] 6

However in this case we have annotated the anchors with known enhancer positions, so we can subset the data to get just enhancer–promoter interactions.

Visualising interactions of interest

The interaction with the highest number of counts in this dataset is between an anchor containing the promoter of a gene called Trib1, and an adjacent region containing more than ten putative enhancers.

GenomicInteractions provides methods to visualise interactions using the Gviz package in order to investigate regions of interest further. For example, we can view interactions in the region around the Trib1 promoter by creating an InteractionTrack.

Using functions from the Gviz package we can add more data to the plot to visualise features in this region and customise how this data is displayed. Here interactions within the region of interest are coloured red, and interactions with other regions of chr15 are shown in blue. The height of the arcs representing the interactions is scaled to the number of counts supporting them.