plotLayers | R Documentation |
Simple plotting function to monitor positions of features on a layerSet
plotLayers(layerSet, layerNames, chrom, xlim)
layerSet |
the |
layerNames |
which layers to plot |
chrom |
which chromosome to plot |
xlim |
a vector with start and end coordinates for the plotting window |
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.