| read_bed {valr} | R Documentation |
Read BED and related files.
Description
read functions for BED and related formats. Filenames can be
local file or URLs. The read functions load data into tbls with consistent
chrom, start and end colnames.
Usage
read_bed(
filename,
col_types = bed12_coltypes,
sort = TRUE,
...,
n_fields = NULL
)
read_bed12(filename, ...)
read_bedgraph(filename, ...)
read_narrowpeak(filename, ...)
read_broadpeak(filename, ...)
Arguments
filename |
file or URL |
col_types |
column type spec for |
sort |
sort the tbl by chrom and start |
... |
options to pass to |
n_fields |
Details
https://genome.ucsc.edu/FAQ/FAQformat.html#format1
https://genome.ucsc.edu/FAQ/FAQformat.html#format1
https://genome.ucsc.edu/goldenPath/help/bedgraph.html
https://genome.ucsc.edu/FAQ/FAQformat.html#format12
https://genome.ucsc.edu/FAQ/FAQformat.html#format13
Value
See Also
Other read functions:
read_genome(),
read_vcf()
Examples
# read_bed assumes 3 field BED format.
read_bed(valr_example("3fields.bed.gz"))
# result is sorted by chrom and start unless `sort = FALSE`
read_bed(valr_example("3fields.bed.gz"), sort = FALSE)
read_bed12(valr_example("mm9.refGene.bed.gz"))
read_bedgraph(valr_example("test.bg.gz"))
read_narrowpeak(valr_example("sample.narrowPeak.gz"))
read_broadpeak(valr_example("sample.broadPeak.gz"))
[Package valr version 0.8.1 Index]