intersectBed-2.26.0

The DE Quick Start tutorial provides an introduction to basic DE functionality and navigation.

Please work through the tutorial and add your comments on the bottom of this page. Or send comments per email to xwang@cshl.edu. Thank you!

Rationale and background:

BEDTools: a flexible suite of utilities for comparing genomic features

Aaron R. Quinlan and  Ira M. Hall

Bioinformatics. 2010 Mar 15; 26(6): 841–842. [PMID: 20110278 ]


BEDTools consists of a suite of sub-commands that are invoked a wide-range of genomics analysis tasks. bedtools intersect allows one to screen for overlaps between two sets of genomic features. By far, the most common interest in two sets of genomic features is whether or not any of the features in the two sets “overlap” with one another, which is known as feature intersection. Take ChIP-Seq as example, such an analysis to identify peaks that are observed in both two different experiments could be conducted with bedtools command – intersectBed.

 


 

Pre-Requisites

  1. A CyVerse account. (Register for an CyVerse account here - user.cyverse.org)
  2. Mandatory arguments 
    1. A bed/gff/vcf file for "B".
  3. Optional arguments:
    1. A bed/gff/vcf file or a bam file for "A" (Note: one of these has to be provided).
    2. -F: Minimum overlap required as a fraction of B.
    3. -f: Minimum overlap required as a fraction of A.
    4. Output format when using BAM as input.
    5. -wa: Write the original entry in A for each overlap.
    6. -wb: Write the original entry in B for each overlap. Useful for knowing what A overlaps. Restricted by -f and -r.
    7. -wo: Write the original A and B entries plus the number of base pairs of overlap between the two features. Only A features with overlap are reported. Restricted by -f and -r.
    8. -wao: Write the original A and B entries plus the number of base pairs of overlap between the two features. However, A features w/o overlap are also reported with a NULL B feature and overlap = 0. Restricted by -f and -r.
    9. -u: Write original A entry once if any overlaps found in B. In other words, just report the fact at least one overlap was found in B. Restricted by -f and -r.
    10. -c: For each entry in A, report the number of hits in B while restricting to -f. Reports 0 for A entries that have no overlap with B. Restricted by -f and -r.
    11. -v: Only report those entries in A that have no overlap in B. Restricted by -f and -r.
    12. -r: Require that the fraction of overlap be reciprocal for A and B. In other words, if -f is 0.90 and -r is used, this requires that B overlap at least 90% of A and that A also overlaps at least 90% of B.
    13. Strandedness: Force “strandedness”. That is, only report hits in B that overlap A on the same/opposite strand. By default, overlaps are reported without respect to strand.

 
Test with sample data

The following test data are provided for testing BWA-index-mem here /iplant/home/xiaofei_iplant/analyses/intersectBed/test_data:

  1. G3_P_K4me3_rep1_chr8_R_rmDup.bed

  2. G3_P_K4me3_rep2_chr8_R_rmDup.bed

Note: These are the output of HOMER_findPeaks 4.8.3 (using H3 as background control).

 

Results 

Successful execution of the "intersectBed" will create a directory holding the intersected features file.

Outputs

  1. commonPeaks/SmpName_interSect.bed (e.g. G1_P_K4me3_interSect.bed)

 

Unable to render {include} The included page could not be found.