Learn R Programming

DNAshapeR (version 1.0.2)

getFasta: 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 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

Examples

Run this code
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)

Run the code above in your browser using DataLab