plotLayers: Simple plotting function to monitor positions of features on...

View source: R/plotLayers.R

plotLayersR Documentation

Simple plotting function to monitor positions of features on a layerSet

Description

Simple plotting function to monitor positions of features on a layerSet

Usage

plotLayers(layerSet, layerNames, chrom, xlim)

Arguments

layerSet

the "layerSet" target

layerNames

which layers to plot

chrom

which chromosome to plot

xlim

a vector with start and end coordinates for the plotting window

Examples

## Not run: 
library(BSgenome.Scerevisiae.UCSC.sacCer3) 

genome <- BSgenome.Scerevisiae.UCSC.sacCer3

sequences_to_keep <- setdiff(seqnames(genome), "chrM")  

genomeNuc <- keepBSgenomeSequences(genome, sequences_to_keep)
genomeNuc    # this should now still be a useable BSgenome object but with no mitochondrial chromosome.
# set up a LayerSet on the genome :  a list with link to genome and GRanges objects to store position information
# two  layers "H3K4me","H4K16ac" are specified here 
layerGenomeNuc <- createLayerSet.BSgenome(genome=genomeNuc, 
                                          layer.names=c( "H3K4me","H4K16ac"),
                                          n.layers=4)
# do something that creates data on the layers (e.g. run \code{"runLayerBinding"}                                          
layerGenomeNuc$layerSet[["H3K4me"]]    <- GRanges(seqnames="chrI", IRanges(start=c(400, 1000, 5000), end=c(600, 2000, 8000)))                    
                                                  
plotLayers(layerGenomeNuc, layerNames=c( "H3K4me","H4K16ac"), chrom="chrI", xlim=c(1,10000))    

## End(Not run)

davetgerrard/GenomicLayers documentation built on Jan. 12, 2025, 5:06 p.m.