Description Usage Arguments Value Author(s) References Examples
Export ranges in BED format, compatible with UCSC genome browser, IGB, and others.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | export.bed(
ranges,
score = NULL,
chrom,
name,
desc = name,
filepath = name,
splitByChrom = TRUE
)
## S4 method for signature 'IRanges'
export.bed(ranges, score = NULL, chrom, name, desc = name, filepath = name)
## S4 method for signature 'CompressedIRangesList'
export.bed(
ranges,
score = NULL,
name,
desc = name,
filepath = name,
splitByChrom = TRUE
)
## S4 method for signature 'GRanges'
export.bed(
ranges,
score = NULL,
name,
desc = name,
filepath = name,
splitByChrom = TRUE
)
|
ranges |
Ranges to export, in IRanges::IRanges, IRanges::IRangesList or GenomicRanges::GRanges format |
score |
Score data if not included in |
chrom |
For single |
name |
Name of the track |
desc |
Description of the track |
filepath |
Path and prefix of the file(s) to write. Chromosome number and "bed" extension will be automatically added. |
splitByChrom |
If multiple chromosomes are given, should they be splitted into one file per chromosome or shall them be saved all together? |
(none)
Oscar Flores oflores@mmb.pcb.ub.es
BED format specification: http://genome.ucsc.edu/FAQ/FAQformat#format1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Generate some ranges with scores
library(GenomicRanges)
ran <- GRanges(
seqnames="chrX", ranges=IRanges(start=1:100, end=101:200),
score=(1:100)/100
)
# Export as bed file
export.bed(ran, name="test_track", desc="Just a test track")
# If executed, this would create a file named "test_track.chrX.bed" with:
# track name="test_track" description="Just a test track" useScore=0
# chrX 1 101 nucl1 0.01
# chrX 2 102 nucl2 0.02
# chrX 3 103 nucl3 0.03
# ...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.