Description Usage Arguments Details Value See Also Examples
Construct GRanges objects from coordinate strings
1 | ranges_for_coords(coord_strings, meta_data_df = NULL, with_names = FALSE)
|
coord_strings |
A list of coordinate strings (in the form "chr1:500000-1000000") |
meta_data_df |
A data frame with any meta data columns you want included with the ranges. Must be in the same order as coord_strings. |
with_names |
logical - should meta data include coordinate string (field coord_string)? |
Coordinate strings consist of three pieces of information: chromosome, start, and stop. These pieces of information can be separated by the characters ":", "_", or "-". Commas will be removed, not used as separators (ex: "chr18:8,575,097-8,839,855" is ok).
GRanges object of the input strings
1 2 3 4 5 6 7 | ran1 <- ranges_for_coords("chr1:2039-30239", with_names = TRUE)
ran2 <- ranges_for_coords(c("chr1:2049-203902", "chrX:489249-1389389"),
meta_data_df = data.frame(dat = c("1", "X")))
ran3 <- ranges_for_coords(c("chr1:2049-203902", "chrX:489249-1389389"),
with_names = TRUE,
meta_data_df = data.frame(dat = c("1", "X"),
stringsAsFactors = FALSE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.