Genomic Interval Manipulation

bedtools expand
Function: Replicate lines in a file based on columns of comma-separated values.
Usage: bedtools expand -i <bed> -c <cols>
Supported input format: BED, GFF, GTF, VCF
bedtools sort
Function: Sort a feature file in various and useful ways.
Usage: bedtools sort [OPTIONS] -i <bed/gff/vcf>
Supported input format: BED, GFF, GTF, VCF
bedtools tag
Function: Annotates alignments in a BAM file based on their overlaps with regions defined in BED/GFF/VCF files
Usage: bedtools tag [OPTIONS] -i <BAM> -files FILE1 .. FILEn -labels LAB1 .. LABn
Supported input format: BED, BAM, GFF, GTF, VCF
bedtools bedpetobam
Function: Converts feature records in BEDPE format to BAM format
Usage: bedtools bedpetobam [OPTIONS] -i <bed/gff/vcf> -g <genome>
Supported input format: BEDPE
bedtools getfasta
Function: Extract sequences from a FASTA file for each of the intervals defined in a BED/GFF/VCF file.
Usage: bedtools getfasta [OPTIONS] -fi <input FASTA> -bed <BED/GFF/VCF>
Supported input format: BED, FASTA
bedtools window
Function: Examines a "window" around each feature in A and reports all features in B that overlap the window. For each overlap the entire entry in A and B are reported.
Usage: bedtools window [OPTIONS] -a <bed/gff/vcf> -b <bed/gff/vcf>
Supported input format: BED, GFF, GTF, VCF
bedtools pairtopair
Function: Report overlaps between two paired-end BED files (BEDPE).
Usage: bedtools pairtopair [OPTIONS] -a <BEDPE> -b <BEDPE>
Supported input format: BEDPE
bedtools sample
Function: Sample random records from the input BED/GFF/VCF/BAM file(s) without replacement using the reservoir sampling algorithm
Usage: bedtools sample [OPTIONS] -i <bed/gff/vcf/bam>
Supported input format: BED, BAM, GFF, GTF, VCF
bedtools maskfasta
Function: Mask a fasta file based on feature coordinates
Usage: bedtools maskfasta [OPTIONS] -fi <fasta> -fo <fasta> -bed <bed/gff/vcf>
Supported input format: BED, FASTA
bedtools links
Function: Creates an HTML file with links to an instance of the UCSC Genome Browser for all features / intervals in a file. This is useful for cases when one wants to manually inspect through a large set of annotations or features.
Usage: bedtools links [OPTIONS] -i <bed/gff/vcf> > out.html
Supported input format: BED, GFF, GTF, VCF
bedtools pairtobed
Function: Report overlaps between a BEDPE file and a BED/GFF/VCF file.
Usage: bedtools pairtobed [OPTIONS] -a <bedpe> -b <bed/gff/vcf>
Supported input format: BED, BEDPE
bedtools multiinter
Function: Identifies common intervals among multiple BED/GFF/VCF files.
Usage: bedtools multiinter [OPTIONS] -i FILE1 FILE2 .. FILEn
Supported input format: BED, GFF, GTF
bedtools unionbedg
Function: Combines multiple BedGraph files into a single file, allowing coverage comparisons between them. It assumes that each BedGraph file is sorted by chrom/start and that the intervals in each are non-overlapping.
Usage: bedtools unionbedg [OPTIONS] -i FILE1 FILE2 .. FILEn
Supported input format: bedGraph
bedtools overlap
Function: Compute the amount of overlap or distance between feature coordinates occurring on the same input line and reports the result at the end of the same line.
Usage: bedtools overlap -i <in.bed|stdin> -cols <str>
Supported input format: BED