Skip to contents

Data types

Load data

read_bed() read_bed12() read_bedgraph() read_narrowpeak() read_broadpeak()
Read BED and related files.
read_bigwig()
Import and convert a bigwig file into a valr compatible tbl
read_genome()
Read genome files.
read_gtf()
Import and convert a GTF/GFF file into a valr compatible bed tbl format
read_vcf()
Read a VCF file.
db_ucsc() db_ensembl()
Fetch data from remote databases.

Single set operations

bed_cluster()
Cluster neighboring intervals.
bed_complement()
Identify intervals in a genome not covered by a query.
bed_flank()
Create flanking intervals from input intervals.
bed_genomecov()
Calculate coverage across a genome
bed_merge()
Merge overlapping intervals.
bed_partition()
Partition intervals into elemental intervals
bed_slop()
Increase the size of input intervals.
bed_shift()
Adjust intervals by a fixed size.
bed_sort()
Sort a set of intervals.

Multiple set operations

bed_closest()
Identify closest intervals.
bed_coverage()
Compute coverage of intervals.
bed_intersect()
Identify intersecting intervals.
bed_map() concat() values_unique() values()
Calculate summaries from overlapping intervals.
bed_subtract()
Subtract two sets of intervals.
bed_window()
Identify intervals within a specified distance.

Randomizing intervals

bed_random()
Generate randomly placed intervals on a genome.
bed_shuffle()
Shuffle input intervals.

Interval statistics

bed_absdist()
Compute absolute distances between intervals.
bed_reldist()
Compute relative distances between intervals.
bed_fisher()
Fisher's test to measure overlap between two sets of intervals.
bed_jaccard()
Calculate the Jaccard statistic for two sets of intervals.
bed_projection()
Projection test for query interval overlap.

Utilities

create_introns()
Create intron features.
create_tss()
Create transcription start site features.
create_utrs3()
Create 3' UTR features.
create_utrs5()
Create 5' UTR features.
bed_makewindows()
Divide intervals into new sub-intervals ("windows").
bed12_to_exons()
Convert BED12 to individual exons in BED6.
bed_glyph()
Create example glyphs for valr functions.
bound_intervals()
Select intervals bounded by a genome.
flip_strands()
Flip strands in intervals.
gr_to_bed()
Convert Granges to bed tibble
interval_spacing()
Calculate interval spacing.
check_interval() check_genome()
Bed-like data.frame requirements for valr functions
valr-package valr
valr: genome interval arithmetic in R
valr_example()
Provide working directory for valr example files.