View source: R/genomicRegions.R
granges2bed | R Documentation |
Save a GRanges object to a bed file
granges2bed(
gr,
fn,
score = NULL,
addAnnotCols = FALSE,
colNames = FALSE,
doSort = TRUE,
bedgraph = FALSE,
bigBed = FALSE,
tabix = FALSE,
strandCharNA = ".",
coordOnly = FALSE
)
gr |
GRanges object |
fn |
filename to save bed file to |
addAnnotCols |
add the columns stored in elementMetadata of GRanges |
colNames |
add column names |
doSort |
sort the regions before writing the output |
bedgraph |
export to bedgraph instead of bed |
bigBed |
also save as bigbed file. Requires that the GRanges object has chromosome sizes stored. |
tabix |
compress and index by tabix |
strandCharNA |
character to be used if strand is NA, '*' or '.' |
coordOnly |
output only the coordinates and strand information (only taken into account if |
sc |
score vector or column in elementMetadata of GRanges |
(invisibly) the written results as a data.frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.