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, n_fields = 3, col_types = bed12_coltypes, sort = TRUE, ...)
read_bed12(filename, ...)
read_bedgraph(filename, ...)
read_narrowpeak(filename, ...)
read_broadpeak(filename, ...)
Arguments
filename |
file or URL |
n_fields |
number fields in the BED file |
col_types |
column type spec for |
sort |
sort the tbl by chrom and start |
... |
options to pass to |
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'))
read_bed(valr_example('6fields.bed.gz'), n_fields = 6)
# 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.6.3 Index]