ZentUtils is a collection of functions designed to streamline analysis of genomic intervals.
Included with ZentUtils is a BED file of matches to motifs for the yeast Reb1 transcription factor.
First, a 6-column BED file is imported into ZentUtils and converted to a GRanges object that is
stored in the regions
slot of a new ZentUtils object.
zent <- zentutils(system.file("extdata", "homer_reb1_badis_motif_scan.bed", package = "ZentUtils"), genome = "sacCer3")
Next, we sort the regions. Regions can be sorted by coordinate with by = "coord"
or
by score (5th column of the BED file) with by = "score"
.
zent <- sort_regions(zent, by = "score", decreasing = TRUE)
We then optionally expand the regions of interest to a specified size. For expansion,
length
bases are added to both ends of each region. Expanded regions are stored
in the expanded_regions
slot of the ZentUtils object. Sequences that are out-of-bounds
following expansion are discarded.
zent <- expand_regions(zent, length = 10)
Sequences for the imported or expanded regions are then obtained from a BSgenome object
and stored in the seqs
slot of the ZentUtils object.
genome <- BSgenome.Scerevisiae.UCSC.sacCer3
zent <- get_seqs(zent, region_type = "expanded", genome = genome)
Lastly, we generate a tile plot, wherein each base is represented by a specific color. This allows efficient visual detection of specific sequences patterns around features of interest.
color_map(zent)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.