write_ranges: Write GRanges to file

Description Usage Arguments Value Examples

View source: R/09_write_ranges.R

Description

Write GRanges to file

Usage

1
2
3
write_ranges(gr, file, verbose = TRUE)

read_ranges(file, bsgenome)

Arguments

gr

GRanges-class

file

file

verbose

TRUE (default) or FALSE

bsgenome

BSgenome-class

Value

GRanges-class for read_ranges

Examples

 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)

multicrispr documentation built on Nov. 8, 2020, 5:10 p.m.