| DrawFdrEstList | R Documentation |
Return a plot describing the false discovery rate estimations by threshold on the parameter provided for each dataframe in the list provided.
DrawFdrEstList( listFdrEstByThr, cNameParamToTest, nFdrPropForFilt = 0.05, lAdjustFdr = TRUE )
listFdrEstByThr |
A list composed of x dataframes. In each dataframe:
|
cNameParamToTest |
The name of the column containing the parameter to be tested. |
nFdrPropForFilt |
A number indicating the false discovery rate to be used for filtering: this will allow to choose the closest threshold below this number and represent it on the plot. Defaults to 0.05 (so fdr of 5%). |
lAdjustFdr |
If TRUE, display fdr_cummin (adjusted false discovery rate) instead of fdr column. Defaults to TRUE. |
myGenome <- Biostrings::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")
)
DrawFdrEstList(
listFdrEstByThr = myFdr_score_per_motif_list,
cNameParamToTest = "score",
nFdrPropForFilt = 0.05
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.