| GetFdrBasedThreshLimit | R Documentation |
Return a plot describing the false discovery rate (fdr) estimations by threshold on the parameter provided for each dataframe in the list provided.
GetFdrBasedThreshLimit( listFdrEstByThr, nFdrPropForFilt = 0.05, lUseBestThrIfNoFdrThr = TRUE )
listFdrEstByThr |
A list composed of x dataframes. In each dataframe:
|
nFdrPropForFilt |
A number indicating the false discovery rate to be used for filtering: this will allow to choose the closest threshold below this number. Defaults to 0.05 (so fdr of 5%). |
lUseBestThrIfNoFdrThr |
For fdr calculation by motif: if no fdr-associated threshold can be retrieved for one motif, return the strongest threshold identified for any other motif if lUseBestThrIfNoFdrThr is TRUE; if lUseBestThrIfNoFdrThr is FALSE, return the max value for the threshold (so every modification in that motif will be filtered out automatically). Defaults to TRUE. |
library(Biostrings)
myGenome <- readDNAStringSet(system.file(
package = "DNAModAnnot", "extdata",
"ptetraurelia_mac_51_sca171819.fa"
))
myGrangesGenome <- GetGenomeGRanges(myGenome)
# Preparing a gposPacBioCSV dataset with sequences
myGposPacBioCSV <-
ImportPacBioCSV(
cPacBioCSVPath = system.file(
package = "DNAModAnnot", "extdata",
"ptetraurelia.bases.sca171819.csv"
),
cSelectColumnsToExtract = c(
"refName", "tpl", "strand", "base",
"score", "ipdRatio", "coverage"
),
lKeepExtraColumnsInGPos = TRUE, lSortGPos = TRUE,
cContigToBeAnalyzed = names(myGenome)
)
myGrangesBaseCSV <- as(myGposPacBioCSV[myGposPacBioCSV$base == "A"], "GRanges")
myGrangesBaseCSVWithSeq <- GetGRangesWindowSeqandParam(
grangesData = myGrangesBaseCSV,
grangesGenome = myGrangesGenome,
dnastringsetGenome = myGenome,
nUpstreamBpToAdd = 0,
nDownstreamBpToAdd = 1
)
# FDR estimation by motif associated to modifications
myFdr_score_per_motif_list <-
GetFdrEstListByThresh(
grangesDataWithSeq = myGrangesBaseCSVWithSeq,
cNameParamToTest = "score",
nRoundDigits = 1,
cModMotifsAsForeground = c("AG", "AT")
)
GetFdrBasedThreshLimit(
listFdrEstByThr = myFdr_score_per_motif_list,
nFdrPropForFilt = 0.05,
lUseBestThrIfNoFdrThr = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.