Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
bed_intersect()
example
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
You can use read_bed()
and related functions to load genome annotations and signals.
snps <- read_bed(
valr_example("hg19.snps147.chr22.bed.gz"),
n_fields = 6
)
Warning: The `n_fields` argument of `read_bed()` is deprecated as of valr 0.6.9.
ℹ fields are now determined automatically from the file
genes <- read_bed(
valr_example("genes.hg19.chr22.bed.gz"),
n_fields = 6
)
snps
and genes
?Let’s find and characterize intergenic SNPs. We’ll use the tools bed_substract()
and bed_closest()
. Take a look and their examples in the documentation to see what they do.
. . .
Take a look at the intergenic
and nearby
objects in the console.
Now that you have overlaps and distances between SNPs and genes, you can go back to dplyr tools to generate reports.
bed_map()
exampleCopy / paste these into your console.
bed_map()
example continuedFirst examine the intersecting intervals.