IClip



From Zhang Laboratory

Jump to: navigation, search

The most functional and thoughtfully crafted minimalist wallets. 100% made in Germany. I-CLIP holds up to 12 cards and your bills in one ultra-slim and lightweight design. CLIP is an antibody-based technique used to study RNA-protein interactions related to RNA immunoprecipitation (RIP) but differs from RIP in the use of UV radiation to cross-link RNA binding proteins to the RNA that they are bound to. This covalent bond is irreversible, allowing stringent purification conditions. The I-CLIP frames are made out of a specially developed high-performance plastic composite that is extremely durable and lightweight. Weighing just over half an ounce, I-CLIP is the lightest wallet on the market.

CTK home | Standard/BrdU-CLIP | iCLIP | eCLIP | PAR-CLIP | CTK usage | FAQ
  • 2Sample dataset
  • 3Read preprocessing
  • 4Read mapping & parsing
  • 5Collapse PCR duplicates
  • 6Annotating and visualizing CLIP tags
  • 7Peak calling
  • 8CIMS


This tutorial outlines how to analyze individual-nucleotide resolution CLIP (iCLIP) data. For more information on the biochemical iCLIP protocol, refer to the following references:


iCLIP reads typically has the following structure:

NNNSSSSNN[CLIP tag sequence]AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG

where N3 and N2 are bipartite random barcode (UMI) and S4 is the sample index.

Sample Rbfox2 iCLIP data from this study:

Raw FASTQ files

The raw sequence files from Illumina sequencing can be downloaded from SRA as outlined below. The four FASTQ files refer to four different runs.

These sequencing files can be given more meaningful names.

These FASTQ files are placed in the directory called fastq under the test folder in home directory (i.e., ~/test is our working directory)

The four runs have sample index GGTC, CCAC,GGTC, CCAC, respectively. In this tutorial, we assume these samples are from independent PCR, so PCR duplicates were collapse independently for each run.


Output files of major steps generated in this tutorial

  • Fully preprocessed FASTQ files (1.1 GB) : output files generated for use right before mapping.
  • Unique CLIP tag and mutation files (375 MB) : output files generated after mapping and collapsing PCR duplicates.
  • Peak calling files (36 MB) : output files after peak calling.
  • CIMS output files (2.8 MB) : output files after CIMS analysis.
  • CITS output files (595 KB) : output files after CITS analysis.

The number of reads in each file, after each step of processing, is summarized in Table 1 below.

Table 1: Summary of read numbers analyzed by CTK.
Protein Sample # of raw reads # of trimmed & filtered reads # of collapsed reads # of mapped reads # of reads after removal of repetitive RNAs # of unique tags
RBFOX2 rep1 21,874,724 20,688,477 2,596,206 1,714,320 1,678,897 646,705
RBFOX2 rep2 112,120,785 103,866,169 14,631,407 9,462,508 9,295,618 3,482,864
RBFOX2 rep3 22,648,473 21,185,357 2,231,051 1,105,998 1,083,783 553,372
RBFOX2 rep4 124,320,492 114,054,608 13,621,263 6,533,253 6,417,281 3,161,497
Total280,964,474259,794,61133,079,92718,816,07918,475,5797,844,438

Demultiplexing samples

The files downloaded from SRA have already be demultiplexed. Therefore this step has already been performed.

For the user who would like to start from a FASTQ file consisting of multiple libraries, check here.

Read quality filtering

For this particular dataset, we skipped the read quality filtering step, as this does not appear to make any major impact on the results.

For the user who would like to include this step, check here.

Trimming of 3' linker sequences

One can then trim the 3' adapter using the command below.

The parameters are as follows:

  • -f fastq : input is a FASTQ file
  • --times 1 : removes up to 1 adapters from each read; here we specify 2 as occasionally some tags have 2 copies of adapters
  • -e 0 : maximum allowed error rate is 0
  • -O 1 : the read is not modified if the overlap between the read and the adapter is shorter than 1nt
  • --quality-cutoff : refers to quality
  • -m 24 : minimum length of the read being 24nt (9 nt barcode + 15 nt tags)
  • -a : the 3' adapter

For more cutadapt usage information:


This is the same thing, but using a Sun Grid Engine to execute this UNIX job on a remote machine.


Note 1: It is good to check the number of reads by running the following command:

Collapse exact duplicates

If multiple reads have exactly the same sequence, only one is kept.

Note 1: It is good to check the number of reads by running the command:

Strip random barcode (UMI)

The following script removes the 5' degenerate barcode. The barcode is in the format: NNNCCACNN where CCAC (for an example) is fixed for a given library. Therefore, the barcode is 9 nucleotides long.


Note 1: We include sample index as part of the random barcode in this example.

Note 2: Get the distribution of tag lengths for diagnostic purposes using the following command.


Download fully preprocessed FASTQ files here (1.1 GB)

Read mapping

We assume the reference index has been prepared and is available under /genomes/hg19/bwa/.

Run bwa to align the reads to the reference genome.


The option -n 0.06 specifies slightly more stringent criteria than the default. The number of allowed mismatches (substitutions or indels) depending on read length is as follows:

The -q option is used to trim low quality reads (an average of 20 or below). However, this does not seem to do too much after the trimming steps above.

Parsing SAM file

This will keep only unique mappings (with MAPQ >=1) and a minimal mapping size of 18 nt.

Note 1: In the tag bed file, the 5th column records the number of mismatches (substitutions) in each read

Note 2: Other aligners might not use a positive MAPQ as an indication of unique mapping.

Another useful option is --indel-to-end, which specifies the number of nucleotides towards the end from which indels should not be called (default=5 nt).

Note 3: The parsing script relies on MD tags, which is an optional field without strict definition in SAM file format specification. Some aligners might have slightly different format how they report mismatches. If other aligners than bwa is used, one should run the following command:

This will ensure the sam file gets parsed properly.

Note 4: Keep track what proportion of reads can be mapped uniquely.

Remove tags from rRNA and other repetitive RNA (optional)

This is an optional step, and performed here following the original analysis of this dataset (see Van Nostrand et al. 2016 Nat Meth 13:508-514 for more detail). In some cases, CLIP data can have contaminants due to abundant repetitive RNAs (such as rRNAs).

As of now, the path to the BED file with a database of repetitive RNAs has to be specified directly, which is somewhat inconvenient. This will be improved in the future.

It is critical to collapse PCR duplicates, not only for the exact duplicates collapsed above, but also for those with slight differences due to sequencing errors. These sequencing errors can also occur in the random barcode, so a naive method to collapse the same barcode is frequently insufficient.


In the command above, tags mapped to the same genomic positions (i.e., the same start coordinates for the 5' end of RNA tag) will be collapsed together if they share the same or 'similar' barcodes. A model-based algorithm is used to identify 'sufficiently distinct' barcodes. This algorithm was described in detail in the following paper:

Darnell JC, et al. FMRP Stalls Ribosomal Translocation on mRNAs Linked to Synaptic Function and Autism. Cell. 2011; 146:247–261.

Compared to the original algorithm, the current implementation estimates sequencing error from aligned reads, which is then fixed during the iterative EM procedure.


Note 1: Sequencing errors in the degenerate barcodes are estimated from results of read alignment. The number of substitutions in each read must be provided in the 5th column.

Note 2: Note that the read ID in the input BED file (in the 4th column) must take the form READ#x#NNNNN, where x is the number of exact duplicates and NNNNN is the bar-code nucleotide sequence appended to read IDs in previous steps. Read IDs that are not in this format will generate an error.

Note 3: As a diagnostic step, get the length distribution of unique tags, which should be a more faithful representation of the library:


Get the mutations in unique tags.

This script is from galaxy, and included for your convenience. The parameters 4 4 indicate the columns in the two input file used to join the two, and N indicates that only paired rows should be printed.


Table 2 summarizes the number of unique mutations of different types in each sample.

Table 2: Summary of mutations in unique tags.
Protein Sample # of unique tagsTotal # of mutations in unique tags Deletions Insertions Substitutions
RBFOX2 rep1 646,705 94,090 14,712 2,942 76,436
RBFOX2 rep2 3,482,864 801,894 224,166 21,412 556,316
RBFOX2 rep3 553,372 67,486 6,901 2,962 57,623
RBFOX2 rep4 3,161,497 663,031 126,728 31,015 505,288
Total7,844,4381,626,501372,50758,3311,195,663
IClip


Merging biological replicates

After getting unique tags, one might want to concatenate these runs, which can be distinguished by different colors. As an example:


Then these can be concatenated.


Download unique tag and mutation files here (375 MB).

Get the genomic distribution of CLIP tags

Make sure the current genome (hg19) is specified.Check the summary file (RBFOX2.pool.tag.uniq.annot.summary.txt) for the percentage of tags mapped to CDS, 3'UTR, introns, etc.

Generate bedgraph for visualization in the genome browser

The output bedgraph file can be loaded into a genome browser for visualization of tag number at each genomic position.

Mode 1: Peak calling with no statistical significance

Note 1: To annotate peaks with overlapping genes and repeat masked sequences and get genomic breakdown:

The output file RBFOX2.pool.tag.uniq.peak.annot.txt has the detailed annotation for each peak, and RBFOX2.pool.tag.uniq.peak.annot.summary.txt has summary statistics.

Note 2: Another useful option --valley-depth specifies the depth of the valley relative to the peak (0.5-1, 0.9 by default). One also has the option to merge peaks close to each other by specifying the distance between the peaks (e.g., -gap 20).

Note 3: Besides the peak boundaries (RBFOX2.pool.tag.uniq.peak.bed), one can also output cluster boundaries (--out-boundary) and half peak boundaries (--out-half-PH ) associated with each peak.


In this mode, the script will not assess the statistical significance of the peak height. If one needs this, an alternative mode is as follows:

Mode 2: Peak calling with statistical significance

Note 1: To get the number of significant peaks:

Note 2: To search for a known binding motif, one first defines the center of each peak (based on width at peak).

This bed file can be used to extract sequences around peak (pay attention to the strand), and search for enrichment of specific motif (e.g., UGCAUG) relative to the peak.

Note 3: One might want to count the number of tags overlapping with each cluster/peak for each sample (e.g., to evaluate correlation between replicates).


Download output files for peak calling here (36 MB).

Get specific types of mutations

Get specific types of mutations, such as deletions, substitutions, and insertions in unique CLIP tags

It is always a good practice to look at the number of each type of mutation to see, e.g., compare the relative abundance of deletions to insertions. This information is provided in the summary statistics file when one specify the option --summary.

Get CIMS

Here, we use deletions as an example.

By default, CIMS.pl will output all sites including those that are not statistically significant. This is recommended because one can play with stringency later.

Extract sites that are statistically significant.

This will keep only those with FDR<0.001. Significant sites will also be sorted by FDR, then by the number of tags with mutations, and then by the total number of overlapping tags. One might try different thresholds to get a balance of sensitivity/specificity (e.g. as judged from motif enrichment).

Note 1: Another parameter that might be useful to improve signal to noise is m/k (i.g., $8/$7 in awk)

Note 2: By default, the command line above will analyze mutations of size 1. Sometimes deletion of multiple nucleotides occurs and those will be ignored here. One can analyze mutations of size 2 by specifying -w 2. Substitutions are always reported as a single nucleotide (even when consecutive nucleotides are substituted), and insertions occur technically in one position and are thus treated as size 1.

Iclipart

Note 3: The number of significant CIMS might be slightly different when unique tags are provided in different orders (this could occur easily when multiple replicates are concatenated together). This is because the FDR estimation is based on permutation, which can change slightly depending on the order of tags.

Note 4: To examine enrichment of motif around CIMS:

This BED file could be used to extract sequences around CIMS (pay attention to the strand), and search for enrichment of specific motif (e.g., UGCAUG for the case of RBFOX2) relative to the CIMS.


Download CIMS output files here (2.8 MB).


One can repeat these steps for the other types of mutations (i.e. substitutions and insertions). This is particularly relevant when one works with a new RBP, and it is unknown which type of mutations will be caused by cross linking.

In this script, we will look for reproducible CLIP tag start positions with more supporting tags than one would expect, which likely indicates crosslink induced truncation sites. For RBFOX2, since the vast majority of deletions are introduced because of cross linking, tags with deletions are treated as read-through tags and removed for CITS analysis.


Note 1: One can now perform motif enrichment analysis as described above in the CIMS section.

Note 2: In this particular example, we decided not to do Bonforroni correction, as we found this is too conservative. If necessary, this can be done by using option --multi-test.

Note 3: In the command line above, we opt to merge sites very close to each other and keep the most significant ones because CITS analysis tends to have more background when read through is frequent.

A few sites that span multiple nucleotides can be removed:

Iclipart For Schools

Note 4: To examine enrichment of motif around CIMS:

This BED file could be used to extract sequences around CITS (pay attention to the strand), and search for enrichment of specific motif (e.g., UGCAUG for the case of Rbfox1-3) relative to the CITS.


Download CITS output files here (595 KB).

Iclips


Iclip Protocol

The enrichment of motif sites (when the motif is known) around CIMS or CITS provides a quantitative measure of the signal to noise ratio. The plot below shows the proportion of sites with the RBFOX2 binding UGCAUG motif starting at each position relative to CIMS/CITS (using tools not included in CTK). This analysis identifies G2 and G5 as the major crosslink sites between RBFOX2 and RNA.

Iclipyousave


I Clip Wallet

Retrieved from 'https://zhanglab.c2b2.columbia.edu/index.php?title=ICLIP_data_analysis_using_CTK&oldid=1695'