Description Usage Arguments Value Examples
View source: R/09_write_ranges.R
Write GRanges to file
1 2 3 | write_ranges(gr, file, verbose = TRUE)
read_ranges(file, bsgenome)
|
gr |
|
file |
file |
verbose |
TRUE (default) or FALSE |
bsgenome |
|
GRanges-class
for read_ranges
1 2 3 4 5 6 7 8 9 10 11 | # Find PE spacers for 4 clinically relevant loci (Anzalone et al, 2019)
bsgenome <- BSgenome.Hsapiens.UCSC.hg38::BSgenome.Hsapiens.UCSC.hg38
gr <- char_to_granges(c(
PRNP = 'chr20:4699600:+', # snp: prion disease
HBB = 'chr11:5227002:-', # snp: sickle cell anemia
HEXA = 'chr15:72346580-72346583:-', # del: tay sachs disease
CFTR = 'chr7:117559593-117559595:+'), # ins: cystic fibrosis
bsgenome)
file <- file.path(tempdir(), 'gr.txt')
write_ranges(gr, file)
read_ranges(file, bsgenome)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.