View source: R/single_molecule_manipulation_functions.r
| SortReads | R Documentation |
Sort reads by single TF
SortReads(MethSM, TFBS, BinsCoord, SortByCluster)
MethSM |
Single molecule matrix |
TFBS |
Transcription factor binding site to use for sorting |
BinsCoord |
list of 3 bin coordinates relative to the center of the TFBS. |
SortByCluster |
T/F |
list of sorted reads
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)
TFBSs = GenomicRanges::GRanges("chr6", IRanges(c(88106253), c(88106263)), strand = "-")
elementMetadata(TFBSs)$name = c("NRF1")
names(TFBSs) = c(paste0("TFBS_", c(4305216)))
BinsCoord = list(c(-35,-25), c(-15,15), c(25,35))
SortedReads = SortReads(Methylation[[2]], TFBSs, BinsCoord, SortByCluster = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.