GR2fasta-methods: A GRanges method to extract and write to the disk a fasta...

Description Methods Examples

Description

Given a GRanges and a reference genome returns the sequences for all the ranges as in fasta format.

Methods

To be used in this form:

GR2fasta(GR, org, fastaFile=NULL)

where:

For each range in the gr GRanges , the unmasked reference sequenced is retrieved. All the sequences are returned in fasta format, named by the genomic ranges in UCSC format, and optionally written on disk.

Examples

1
2
3
4
	require(BSgenome.Mmusculus.UCSC.mm9)
	gr <- GRanges(Rle(c('chr1','chr2')), 
		ranges=IRanges(start=c(1e7, 2e7), end=c(1e7+19, 2e7+19)))
	show(GR2fasta(GR=gr, org=Mmusculus, fastaFile=NULL))

kamalfartiyal84/compEpiTools documentation built on May 29, 2019, 5:40 a.m.