PlotSM: Wrapper for PlotSingleMoleculeStack function

View source: R/plot_single_molecule_examples.r

PlotSMR Documentation

Wrapper for PlotSingleMoleculeStack function

Description

adds the convenience of arranging reads before plotting

Usage

PlotSM(MethSM, range, SortedReads = NULL)

Arguments

MethSM

Single molecule methylation matrix

range

GRanges interval to plot

SortedReads

Defaults to NULL, in which case will plot unsorted reads. Sorted reads object as returned by SortReads function or "HC" to perform hierarchical clustering

Value

Single molecule stack plot

Examples

Qinput = paste0(tempdir(), "/NRF1Pair_Qinput.txt")
library(BSgenome.Mmusculus.UCSC.mm10)

if(file.exists(Qinput)){
    QuasRprj = GetQuasRprj(Qinput, BSgenome.Mmusculus.UCSC.mm10)

    MySample = readr::read_delim(Qinput, delim = "\t")$SampleName[1]
    Region_of_interest = GRanges(seqnames = "chr6", ranges = IRanges(start = 88106000, end = 88106500), strand = "*")

    Methylation = CallContextMethylation(sampleSheet = Qinput,
                                     sample = MySample,
                                     genome = BSgenome.Mmusculus.UCSC.mm10,
                                     range = Region_of_interest,
                                     coverage = 20,
                                     ConvRate.thr = 0.2)

    PlotSM(MethSM = Methylation[[2]], range = Region_of_interest)
}


Krebslabrep/SingleMoleculeFootprinting documentation built on Nov. 19, 2022, 3:56 a.m.