FilterByConversionRate {SingleMoleculeFootprinting} | R Documentation |
Calculate reads conversion rate
FilterByConversionRate(MethSM, chr, genome, thr = 0.2, verbose = TRUE)
MethSM |
as comes out of the func GetSingleMolMethMat |
chr |
Chromosome, MethSM doesn't carry this info |
genome |
BSgenome |
thr |
Double between 0 and 1. Threshold above which to filter reads. Defaults to 0.2 |
verbose |
TRUE/FALSE |
Filtered MethSM
Qinput = paste0(tempdir(), "/NRF1Pair_Qinput.txt") library(BSgenome.Mmusculus.UCSC.mm10) if(file.exists(Qinput)){ QuasRprj = GetQuasRprj(Qinput, BSgenome.Mmusculus.UCSC.mm10) sample = readr::read_delim(Qinput, delim = "\t")$SampleName range = GRanges(seqnames = "chr6", ranges = IRanges(start = 88106000, end = 88106500), strand = "*") MethSM = GetSingleMolMethMat(QuasRprj, range, sample) MethSM = FilterByConversionRate(MethSM, chr = "chr6", genome = BSgenome.Mmusculus.UCSC.mm10, thr = 0.8) }