Category

Genomic Interval Manipulation


Usage

bedtools pairtopair [OPTIONS] -a <BEDPE> -b <BEDPE>


Manual

This tool is part of the bedtools suite and it's also known as pairToPair.

pairToPair compares two BEDPE files in search of overlaps where each end of a BEDPE feature in A overlaps with the ends of a feature in B. For example, using pairToPair, one could screen for the exact same discordant paired-end alignment in two files. This could suggest (among other things) that the discordant pair suggests the same structural variation in each file/sample. If you want to get the overlaps between a BEDPE and a bed file, consider using pairToBed.

Required arguments

  • -a BEDPE: The first paired-end BED file.
  • -b BEDPE: The second paired-end BED file.

Options

  • -f float: Minimum overlap required as a fraction of A (e.g., 0.05). Default is 1E-9 (effectively 1bp).
  • -type string: Approach to reporting overlaps between A and B.
    • both: Report overlaps if both ends of A overlap B. (Default)
      Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      BEDPE/BAM A         *****.................................*****
      BEDPE B          ^^^^^^^^.................................^^^^^^
      Result              =====.................................=====
    • neither: Report overlaps if neither end of A overlaps B.
      Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      BEDPE/BAM A         *****.................................*****
      BEDPE B         ^^^^^^^^......................................^^^^^^
      Result
      
      BEDPE/BAM A         *****.................................*****
      BEDPE B       ^^^^................................................^^^^^^
      Result              =====.................................=====
    • either: Report overlaps if either ends of A overlap B.
    • notboth: Report overlaps if one or neither of A's overlap B.
  • -slop int: The amount of slop (in b.p.) to be added to each footprint of A. Note: Slop is subtracted from $\text{start}_1$ and $\text{start}_2$ and added to $\text{end}_1$ and $\text{end}_2$. Default: $0$.
  • -ss: Add slop based on strand to each BEDPE footprint.
    • If strand is "+", slop is only added to the end coordinates.
    • If strand is "-", slop is only added to the start coordinates.
    • By default, -slop is added in both directions.
  • -is: Ignore strands when searching for overlaps. (By default, strands are enforced.)
  • -rdn: Require the hits to have different names (i.e., avoid self-hits). (By default, same names are allowed.)

Examples

Find all SVs (in BEDPE format) in sample 1 that are also in sample 2
$ pairToPair -a 1.sv.bedpe -b 2.sv.bedpe | cut -f 1-10 > 1.sv.in2.bedpe
Find all SVs (in BEDPE format) in sample 1 that are not in sample 2
$ pairToPair -a 1.sv.bedpe -b 2.sv.bedpe -type neither | cut -f 1-10 >

File formats this tool works with
BEDPE

Share your experience or ask a question