write_ranges {multicrispr} | R Documentation

## Write GRanges to file

### Description

Write GRanges to file

### Usage

    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

    # 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)

[Package multicrispr version 1.2.0 Index]