getFasta {DNAshapeR} | R Documentation

## Extract fasta sequence given a set of genomic intervals and a reference genome.

### Description

DNAshapeR can predict DNA shape features from custom FASTA files or directly from genomic coordinates in the form of a GRanges object within BioConductor (see <https://bioconductor.org/packages/release/bioc/html/GenomicRanges.html> for more information).

### Usage

    getFasta(GR, BSgenome, width = 1e3, filename = 'tmp.fa')

### Arguments

`GR` | A GRanges object indicating genomic coordinates
`BSgenome` | A BSgenome object indicating the genome of interest
`width` | A number indicating a fixed width of sequences
`filename` | The Name of the input fasta format file, including full path to file if it is located outside the current working directory

### Value

writes a fasta file

### Author(s)

Federico Comoglio

### Examples

    gr <- GRanges(seqnames = c("chrI"),
    strand = c("+", "-", "+"),
    ranges = IRanges(start = c(100, 200, 300), width = 100))
    library(BSgenome.Scerevisiae.UCSC.sacCer3)
    getFasta(gr, BSgenome = Scerevisiae, width = 100, filename = "tmp.fa")
    fn <- "tmp.fa"
    pred <- getShape(fn)

[Package DNAshapeR version 1.8.0 Index]