Last active
February 25, 2020 11:01
-
-
Save ATpoint/8353a000aad57baa94aba255e38edd0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
library(rtracklayer) | |
## Use rtracklayer to import a subset of a bigwig file from disk into R. | |
## reference.gr is a GRanges object with the ranges that will be used for subsetting | |
## selected.gr is a GRanges object with the count data for each interval stored in elementMetadata(selected.gr) | |
selected.gr <- rtracklayer::import(Path.To.BigWig, format = "BigWig", selection = BigWigSelection(reference.gr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment