This repository includes scripts for processing and analysing ChIP-Seq data.
Script to compute the Fraction of Reads-in-Peaks (FRiP) of a given peak profile in bed format. For adittional information about this quality index, see:
ChIP-seq guidelines and practices of the ENCODE and modENCODE consortia. Genome Research (2012). PubMed: 22955991
This scripts requires both:
- the peaks file in bed format
- the original BED file with aligned reads
The FRiP can be calculated in batch for all experiments from a given directory.
The script will output, for each pair of BED-bed files, the name of the sample and the FRiP.
Script to map a set of peaks files to the genomic coordinates of an enzyme's restriction fragments. Later, it computes a binary matrix with all the genomic regions in rows, indicating with one whether a peak profile (in columns) has a binding event within any of the genomic coordinates or zero otherwise.
Script to process long-range interaction data and display it on WashU epigenome browser under the long-range interaction data type.
An input file with the long-range interactions in bedpe format.
The script outputs a pair of bed.gz and bed.gz.tbi files. Both files have to be available by URL in a webserver and the link to the bed.gz file should be provided
bedSort
from the UCSC toolsbgzip
andtabidx
from samtools.
Check out the NG2B to find how to visualise the resulting files.
Script to generate a histogram from a given bigwig file around specifig genomic regions.
Next files are require to perform this analysis:
-
A bigWig file (that will be transform into bedGraph format). This script can perform the analysis in batch for all bigWig files from a given directory.
-
A bed file with the genomic coordinates in HOMER's peak file format where to compute the histogram.
Additionally, the script requires to set up the region and bin sizes as a standard parameter of the histogram and the genome build.
The script will generate, for each bigWig file, a matrix with the histograms around each genomic coordinates. The output file names will match with the input ones and the matrix suffix.
bigWigToWig
from UCSC tools.annotatePeaks.pl
from Homer.
You might consider the use of any of the MATLAB's scripts in HistoneMap/ to plot the results as a HeatMap.
Suite of MATLAB scripts for plotting heatmaps from histones (or any other ChIP-Seq) experiments around a set of genomic regions.
-
All the scripts work in batch for a given set of input experiments. Once run, the script will ask you to select multiple matrix files. The input format of these matrix files should match with the output format of
bw2histogram.sh
, that uses Homer'sannotatePeaks.pl
to create a histogram around a given set of genomic regions. -
peaksfile, a peak file with the genomic regions that was considered to generate the matrix input files. This file is important to reshape the histograms profiles with different number of rows. The peaksfile should be in bed format including an extra fourth column with the number of reads falling on each peak (this information can be taken from the original bigwig file by using
bigWigToWig
). -
Additional inputs files may be required depending of the desired normalization, sorting, etc...
This script do not requires any additional file. It will simply resort all the histograms according to the number of counts falling in any genomic regions (peaks).
This script will resort all the histograms according to the fold change at each genomic regions (peaks). It will requires two additional input files in matrix format, it will compute the cumulative fold change for each of the genomic regions and it will sort all the histograms in descending order according to these fold changes.
The script will generate and save as a high-resolution PDF a heatmap for each matrix input file and an extra figure with the peaks profile. Each heatmap will include a density profile on top.
All the heatmaps are normalised to make them directly comparable. Use the parameters saturation_peak_cutoff and saturation_histones_cutoff to control the saturation thresholds. The plots will use the colormaps defined on the top of the script, from black to color1 and black to color2.
You might consider the use of the next command to stack all the PDFs together in a single one (it requires to install imagemagick
):
montage -tile 7x1 -geometry 1000 -density 500 *counts.pdf *heatmap.pdf *sorted*.pdf montage.pdf