Contributions icon indicating copy to clipboard operation
Contributions copied to clipboard

betAS

Open marianaferreira opened this issue 2 years ago • 6 comments

Update the following URL to point to the GitHub repository of the package you wish to submit to Bioconductor

  • Repository: https://github.com/marianaferreira/betAS

Confirm the following by editing each check box to '[x]'

  • [x] I understand that by submitting my package to Bioconductor, the package source and all review commentary are visible to the general public.

  • [x] I have read the Bioconductor Package Submission instructions. My package is consistent with the Bioconductor Package Guidelines.

  • [x] I understand Bioconductor Package Naming Policy and acknowledge Bioconductor may retain use of package name.

  • [x] I understand that a minimum requirement for package acceptance is to pass R CMD check and R CMD BiocCheck with no ERROR or WARNINGS. Passing these checks does not result in automatic acceptance. The package will then undergo a formal review and recommendations for acceptance regarding other Bioconductor standards will be addressed.

  • [x] My package addresses statistical or bioinformatic issues related to the analysis and comprehension of high throughput genomic data.

  • [x] I am committed to the long-term maintenance of my package. This includes monitoring the support site for issues that users may have, subscribing to the bioc-devel mailing list to stay aware of developments in the Bioconductor community, responding promptly to requests for updates from the Core team in response to changes in R or underlying software.

  • [x] I am familiar with the Bioconductor code of conduct and agree to abide by it.

I am familiar with the essential aspects of Bioconductor software management, including:

  • [x] The 'devel' branch for new packages and features.
  • [x] The stable 'release' branch, made available every six months, for bug fixes.
  • [x] Bioconductor version control using Git (optionally via GitHub).

For questions/help about the submission process, including questions about the output of the automatic reports generated by the SPB (Single Package Builder), please use the #package-submission channel of our Community Slack. Follow the link on the home page of the Bioconductor website to sign up.

marianaferreira avatar Oct 07 '22 02:10 marianaferreira

Hi @marianaferreira

Thanks for submitting your package. We are taking a quick look at it and you will hear back from us soon.

The DESCRIPTION file for this package is:

Package: betAS
Type: Package
Title: Intuitive differential alternative splicing analyses using beta distributions 
Version: 0.99.0
Authors@R: c(
        person("Mariana", "Ascensão-Ferreira",
     email="[email protected]", role=c("aut", "cre"),
     comment=c(ORCID="0000-0002-5247-246X")),
        person("Nuno", "Saraiva-Agostinho",
     email="[email protected]", role=c("aut"),
     comment=c(ORCID="0000-0002-5549-105X")),
        person(c("Nuno", "Luís"), "Barbosa-Morais",
      email="[email protected]", role=c("aut", "led", "ths"),
     comment=c(ORCID="0000-0002-1215-0538")))
Description: betAS is a user-friendly R package that allows intuitive visualisation of differential alternative splicing analyses based on beta distributions.
    Next generation sequencing allows alternative splicing (AS) quantification with unprecedented precision, with exon inclusion being commonly quantified as the proportion of RNA sequencing (RNA-seq) reads supporting the inclusion of that exon.
    However, percent-spliced-in (PSI) values do not incorporate the number of reads supporting inclusion of a given AS event, even though this number of reads is the readout of RNA quantity in cells. The beta distribution, widely used to model proportions, is suitable to quantify inclusion levels using reads supporting exon inclusion/exclusion as surrogates for the distribution shape parameters. The distribution has as mean value the PSI ratio and is more narrowed when the number of reads is higher. By expanding previously developed work by others we introduce a computational pipeline based on individual-sample beta distributions and fitted-group beta distributions to accurately model inclusion levels and accommodate the respective magnitude of inclusion evidence to compare AS across different conditions. Also, our methodology allowed the definition of a significance metric associated to a given differential inclusion across conditions.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.2.1
VignetteBuilder: knitr
biocViews: Sequencing, AlternativeSplicing, DifferentialSplicing
Imports:
    bslib,
    colourpicker,
    DT,
    ggplot2,
    ggrepel,
    ggridges,
    graphics,
    grDevices,
    highcharter,
    reshape2,
    shiny,
    shinycssloaders,
    stats,
    thematic,
    utils
Depends: 
    R (>= 4.1.0)
Suggests: 
    testthat (>= 3.0.0),
    knitr,
    rmarkdown
Config/testthat/edition: 3

bioc-issue-bot avatar Oct 07 '22 02:10 bioc-issue-bot

Thanks for this submission! It needs work. The vignette does not explain the purpose of the package. See the contributor guidelines. The package does not use any Bioconductor packages or data structures. Please explain its role in the Bioconductor software/analysis ecosystem. Can any data structures used in alternative splicing analyses in other Bioconductor packages be used in your package? Thank you.

vjcitn avatar Oct 07 '22 12:10 vjcitn

Let us know if you are going to work on this package. @vjcitn

vjcitn avatar Oct 11 '22 11:10 vjcitn

Yes, @vjcitn, sorry for the delay. I am actually now replying to the points you raised and will be submitting a reply very soon. I intend to work on the package as you provide recommendations. Thank you!

marianaferreira avatar Oct 11 '22 12:10 marianaferreira

Hi again, @vjcitn.

I have updated the vignette to address your questions, namely including a more complete description of the package.

Regarding its role in the Bioconductor ecosystem, betAS allows Bioconductor users to analyse differences in alternative splicing between sample groups by loading alternative splicing quantification data from RNA-seq experiments obtained with other tools, such as vast-tools (https://github.com/vastgroup/vast-tools). Based on the properties of beta distributions, betAS applies statistical concepts into contributing to the intuitive interpretability of biological differences in alternative splicing.

Indeed, betAS does not use any of Bioconductor’s packages or data structures. As far as I can tell there are no other alternative splicing analysis packages that could be used, but let me know if you have any suggestions.

Thank you!

marianaferreira avatar Oct 11 '22 15:10 marianaferreira

Hi @vjcitn, Just wondering if you can review the package so that it's considered for the coming release. I would appreciate if it gets to this release. Thank you in advance!

marianaferreira avatar Oct 24 '22 12:10 marianaferreira

Thanks. Please have a look at https://www.bioconductor.org/packages/release/BiocViews.html#___AlternativeSplicing and consider how some of these packages use standard data structures in Bioconductor to accomplish their aims.

vjcitn avatar Nov 12 '22 13:11 vjcitn

Will you be proceeding with this package?

vjcitn avatar Dec 06 '22 09:12 vjcitn

Hi, @vjcitn,

Yes, I want to proceed with the package. Thank you for the suggestion. I have looked into these "alternative splicing"-related packages and how they use other Bioconductor's packages or data structures, but since betAS was originally designed to apply simple and intuitive statistical concepts on pre-processed data coming from other/external tools, I could not yet identify other packages/data structures that could be used.

In any case, I want to proceed with the package evaluation. I will thus revisit Bioconductor's data structure library to see if betAS' current version can be adjusted to benefit from these. I think SummarizedExperiment in particular can be quite useful.

Thank you!

marianaferreira avatar Dec 06 '22 10:12 marianaferreira

A reviewer has been assigned to your package. Learn what to expect during the review process.

IMPORTANT: Please read this documentation for setting up remotes to push to git.bioconductor.org. It is required to push a version bump to git.bioconductor.org to trigger a new build.

Bioconductor utilized your github ssh-keys for git.bioconductor.org access. To manage keys and future access you may want to active your Bioconductor Git Credentials Account

bioc-issue-bot avatar Jan 03 '23 19:01 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on Linux, Mac, and Windows.

On one or more platforms, the build results were: "ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details. This link will be active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/betAS to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jan 03 '23 19:01 bioc-issue-bot

Package 'betAS' Review

Thank you for submition your package to Bioconductor. The package passed check and build. However there are several things need to be fixed. Please try to answer the comments line by line when you are ready for a second review. Code: Note: please condsider; Important: must be addressed.

The DESCRIPTION file

  • [ ] R version should be no less than 4.3

The NAMESPACE file

  • [ ] Selective imports using importFrom instead of import all with import.
    • in line 11 import(ggplot2)
    • in line 12 import(highcharter)
    • in line 13 import(shiny)
    • in line 14 import(shinycssloaders)

unacceptable files

  • [ ] unacceptable files present (see .gitignore for a listing).
    • ./betAS.Rproj

R code

  • [ ] Important: vapply instead of sapply.
    • In file R/checkLowerEquals.R:
      • at line 23 found ' r <- sapply(test_vec, lweq, value)'
      • at line 52 found ' r <- sapply(test_vec, grteq, value)'
  • [ ] NOTE: :: is not suggested in source code unless you can make sure all the packages are imported. Some people think it is better to keep ::. However please note that you need to manully double check the import items when you make any change in the DESCRIPTION file during development. My recommendation is to remove one or two repeats to force the dependency check.
    • In file R/betASapp.R:
      • at line 87 found ' shinycssloaders::withSpinner(plotOutput("plot", height = "1200px"), type = 8, color = "#FF9AA2", size = 2),'
      • at line 149 found ' shinycssloaders::withSpinner(plotOutput("densities", height = "1200px"), type = 8, color = "#FF9AA2", size = 2)'
      • at line 189 found ' shinycssloaders::withSpinner(plotOutput("volcano",'
  • [ ] Important: 1:n is not suggested in source code. Use seq_along or seq.int instead. eg:
    • In file R/betASapp.R:
      • at line 791 found ' for(i in 1:length(values$groups)){'
      • and more ...
  • [ ] NOTE: Vectorize: for loops present, try to replace them by *apply funcitons.
    • In file R/betASapp.R:
      • at line 751 found ' for(g in groups){'
      • at line 791 found ' for(i in 1:length(values$groups)){'
    • In file R/individualBetas_nofitting_incr.R:
      • at line 43 found ' for(i in 1:n){'
      • at line 62 found ' for(i in 1:length(inc)) {'
    • In file R/jointBetas_nofitting.R:
      • at line 56 found ' for(l in seq3){'
      • at line 180 found ' for(combA in 1:ncol(within_combs_A)){'
      • at line 192 found ' for(combB in 1:ncol(within_combs_B)){'
      • at line 278 found 'for(sample in unique(artiflabelsA)){'
      • at line 287 found 'for(sample in unique(artiflabelsB)){'
    • In file R/plots.R:
      • at line 109 found ' for(a in 1:length(colsA)){'
      • at line 122 found ' for(b in 1:length(colsB)){'
      • at line 150 found ' for(i in 1:length(colsA)){'
      • at line 164 found ' for(j in 1:length(colsB)){'
      • at line 251 found ' for(g in 1:length(groupList)){'
      • at line 267 found ' for(samp in 1:length(samples)){'
      • at line 869 found ' for(l in seq3){'
      • at line 899 found ' for(combA in 1:ncol(within_combs_A)){'
      • at line 911 found ' for(combB in 1:ncol(within_combs_B)){'
      • at line 962 found ' for(sample in unique(artiflabelsA)){'
      • at line 971 found ' for(sample in unique(artiflabelsB)){'
  • [ ] Important: Remove unused code.
    • In file R/betASapp.R:
      • at line 9 found ' # tools <- c("vast-tools", "MISO", "SUPPA", "Other")'
      • at line 17 found ' # dark <- bs_theme(bootswatch = "darkly")'
      • at line 18 found ' # light <- bs_theme(bootswatch = "minty")'
      • at line 24 found ' # tags$img(src="betasBanner.png", align = "right", height='80px', width='1000px'),'
      • at line 26 found ' # theme = bs_theme(bootswatch = "sketchy"),'
      • at line 28 found ' # theme = light,'
      • at line 41 found ' # checkboxInput("dark_mode", "Dark mode", FALSE),'
      • at line 54 found ' # h3("Exploratory analysis of inclusion levels"),'
      • at line 80 found ' # textOutput("textNumberEventsPerType"),'
      • at line 81 found ' # actionButton("filter", "Filter original table", icon = icon("filter"), class = "btn-success"),'
      • at line 114 found ' # h5("Group creation"),'
      • at line 116 found ' # helpText(em("Choose one option for group creation and check the resulting grouping below")),'
      • at line 182 found ' # textOutput("showMeEvent"),'
      • at line 183 found ' # plotOutput("densitiesSelectedEvent", height = "400px", width = "500px")'
      • at line 234 found ' # tabPanel("Differential alternative splicing (multiple groups)", icon = icon("toilet-paper"),'
      • at line 236 found ' # sidebarLayout('
      • at line 238 found ' # sidebarPanel('
      • at line 242 found ' # actionButton("rungroupdiffbetas", "Run multiple group betAS", icon = icon("users"), class = "btn-info")'
      • at line 245 found ' # ),'
      • at line 247 found ' # mainPanel('
      • at line 248 found ' # icon("calendar", class = "fa-5x")'
      • at line 249 found ' # )'
      • at line 251 found ' # )'
      • at line 255 found ' # )'
      • at line 270 found ' # file <- "test/INCLUSION_LEVELS_FULL-Hsa32-hg19_to_test.tab.gz"'
      • at line 271 found ' # testTable <- read.table(gzfile(file), sep="\t", header=TRUE, quote="")'
      • at line 272 found ' # maxDevSimulationN100 <- readRDS(url("http://imm.medicina.ulisboa.pt/group/distrans/SharedFiles/Mariana/Splicing&SenescenceFLEX/xintercepts_100incr_100cov_100trials.R"))'
      • at line 277 found ' # colnames(testTable) <- gsub(x = colnames(testTable), pattern = "Sample_IMR90_", replacement = "")'
      • at line 278 found ' # samples <- colnames(testTable)[grep(x = colnames(testTable), pattern = "-Q")-1]'
      • at line 285 found ' # observe(session$setCurrentTheme('
      • at line 286 found ' # if (input$dark_mode) dark else light'
      • at line 287 found ' # ))'
      • at line 614 found ' # plottingEvent <- reactiveValues(tableRow = list())'
      • at line 616 found ' # colors <- reactiveValues(used = list())'
      • at line 632 found ' # nextSuggestedColor <- reactive({'
      • at line 635 found ' # lastColor <- values$groups[[length(values$groups)]]$groupColor'
      • at line 636 found ' # nextColor <- sample(pastelColors[-c(which(pastelColors == lastColor))], size = 1)'
      • at line 638 found ' # }'
      • at line 640 found ' # colors[[length(values$groups)+1]] <- list(color = nextColor)'
      • at line 641 found ' # return(colors)'
      • at line 643 found ' # })'
      • at line 649 found ' # observe({updateColourInput(session,'
      • at line 650 found ' # inputID = "groupColor",'
      • at line 651 found ' # label = "Select group color:",'
      • at line 652 found ' # value = nextSuggestedColor())'
      • at line 653 found ' # })'
      • at line 659 found ' # req(input$findGroupsBasedSampleTable)'
      • at line 660 found ' # req(input$groupingFeatures)'
      • at line 718 found ' # return(NULL)'
      • at line 731 found ' # req(input$findGroupsBasedSampleTable)'
      • at line 732 found ' # req(input$groupingFeatures)'
      • at line 843 found ' # plotIndividualDensities(eventID = "HsaEX0055568",'
      • at line 844 found ' # npoints = 500,'
      • at line 845 found ' # psitable = psidataset(),'
      • at line 846 found ' # qualtable = qualdataset(),'
      • at line 847 found ' # colsA = values$groups[[1]]$samples,'
      • at line 848 found ' # colsB = values$groups[[2]]$samples,'
      • at line 849 found ' # labA = values$groups[[1]]$name,'
      • at line 850 found ' # labB = values$groups[[2]]$name,'
      • at line 851 found ' # colorA = values$groups[[1]]$color,'
      • at line 852 found ' # colorB = values$groups[[2]]$color,'
      • at line 853 found ' # maxDevTable = maxDevSimulationN100)'
      • at line 937 found ' # req(input$volcanoYAxis())'
      • at line 979 found ' # brushedPoints(df = simplifiedTableVolcano(), input$plot_brush, xvar = "deltapsi", yvar = column)'
      • at line 986 found ' # rownames = FALSE,'
      • at line 987 found ' # colnames = colnameVector())'
      • at line 997 found ' # output$showMeEvent <- renderText({'
      • at line 999 found ' # paste0("You have selected ", input$brushed_data_rows_selected$EVENT)'
      • at line 1001 found ' # })'
      • at line 1027 found ' # plotIndividualDensities(eventID = "HsaEX0055568",'
      • at line 1028 found ' # npoints = 500,'
      • at line 1029 found ' # psitable = psifiltdataset(),'
      • at line 1030 found ' # qualtable = qualfiltdataset(),'
      • at line 1031 found ' # colsA = values$groups[[1]]$samples,'
      • at line 1032 found ' # colsB = values$groups[[2]]$samples,'
      • at line 1033 found ' # labA = values$groups[[1]]$name,'
      • at line 1034 found ' # labB = values$groups[[2]]$name,'
      • at line 1035 found ' # colorA = values$groups[[1]]$color,'
      • at line 1036 found ' # colorB = values$groups[[2]]$color,'
      • at line 1037 found ' # maxDevTable = maxDevSimulationN100)'
    • In file R/jointBetas_nofitting.R:
      • at line 15 found ' # npoints <- jointpoints + 2'
    • In file R/plots.R:
      • at line 322 found ' # theme(panel.grid.major.y = element_blank(), panel.grid.minor.y = element_blank(), axis.line.x = element_line(color = "black"))'
      • at line 445 found ' # y = -log10(1.001-Pdiff))) +'
      • at line 457 found ' # xlab(expression(PSI[B]-PSI[A])) +'
      • at line 459 found ' # ylab(expression(-log10)) +'
      • at line 489 found ' #F-stat (2 groups) per event'
      • at line 549 found ' # xlab(expression(PSI[B]-PSI[A])) +'
      • at line 643 found ' # betasTableTransf <- betasTable'
      • at line 645 found ' # betasTableTransf$TransfFDR <- -log10(betasTableTransf$FDR)'
      • at line 646 found ' # betasTableTransf$TransfFDR[!is.finite(betasTableTransf$TransfFDR)] <- max(betasTableTransf$TransfFDR[is.finite(betasTableTransf$TransfFDR)])+0.0001'
      • at line 647 found ' # transfScale <- c(seq(from = 0, to = 2, by = 0.5), 2+0.0001)'
      • at line 648 found ' # transfScaleLabels <- c(seq(from = 0, to = 2, by = 0.5), Inf)'
      • at line 653 found ' # y = -log10(FDR))) +'
      • at line 654 found ' # y = -log10(1.001-Pdiff))) +'
      • at line 666 found ' # scale_y_continuous(breaks = transfScale, labels = transfScaleLabels) +'
      • at line 667 found ' # xlab(expression(PSI[B]-PSI[A])) +'
      • at line 670 found ' # ylab(expression(-log10)) +'
      • at line 671 found ' # ylab(expression(-log10)) +'
      • at line 842 found ' # npoints <- jointpoints + 2'
    • In file R/processVastTools.R:
      • at line 54 found ' # psiVAST <- psiVAST[which(psiVAST$COMPLEX == "S"),]'
      • at line 66 found ' # annot <- which(psiVAST$COMPLEX == "ANN")'
      • at line 67 found ' # psiVAST <- psiVAST[-c(annot),]'
      • at line 68 found ' # qualVAST <- qualVAST[match(psiVAST$EVENT, qualVAST$EVENT),]'
  • [ ] Important: Please consider to add drop=FALSE to avoid the reduction of dimension for matrices and arrays.
    • In file R/getGeneCounts.R:
      • at line 16 found ' genecounts <- vtcountsTable[row,col]'
    • In file R/getQualCov.R:
      • at line 18 found ' qual <- vtqualTable[row,col]'
    • and more ...
  • [ ] NOTE: Functional programming: code repetition.
    • repetition in all_grteq_row and all_lweq_row
      • in all_grteq_row
        • line 1: value)
        • line 2:{
        • line 3: r <- sapply(test_vec, grteq, value)
        • line 4: test <- any(r == FALSE)
        • line 5: bool <- !test
        • line 6: return(bool)
      • in all_lweq_row
        • line 1: value)
        • line 2:{
        • line 3: r <- sapply(test_vec, lweq, value)
        • line 4: test <- any(r == FALSE)
        • line 5: bool <- !test
        • line 6: return(bool)
    • repetition in estimateFDR, jointBetas_nofitting , jointBetas_nofitting_Fast0 , plotDensitiesFromEventObjList , plotFDRFromEventObjList , plotFstatFromEventObjList and plotPDiffFromEventObjList
      • in estimateFDR
        • line 2:{
        • line 3: jntBetas <- list()
        • line 4: artifA <- indBetasA$BetaPoints
        • line 5: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 6: psisA <- indBetasA$PSI
        • line 7: nA <- length(indBetasA$PSI)
        • line 8: labelA <- groupsAB[1]
        • line 11: artifB <- indBetasB$BetaPoints
        • line 12: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 13: psisB <- indBetasB$PSI
        • line 14: nB <- length(indBetasB$PSI)
        • line 15: labelB <- groupsAB[2]
      • in jointBetas_nofitting
        • line 2:{
        • line 3: xlength <- 1001
        • line 4: artifA <- indBetasA$BetaPoints
        • line 5: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 6: psisA <- indBetasA$PSI
        • line 7: nA <- length(indBetasA$PSI)
        • line 8: labelA <- groupsAB[1]
        • line 9: artifB <- indBetasB$BetaPoints
        • line 10: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 11: psisB <- indBetasB$PSI
        • line 12: nB <- length(indBetasB$PSI)
        • line 13: labelB <- groupsAB[2]
      • in jointBetas_nofitting_Fast0
        • line 2: {
        • line 3: artifA <- indBetasA$BetaPoints
        • line 4: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 5: psisA <- indBetasA$PSI
        • line 6: nA <- length(indBetasA$PSI)
        • line 7: labelA <- groupsAB[1]
        • line 8: artifB <- indBetasB$BetaPoints
        • line 9: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 10: psisB <- indBetasB$PSI
        • line 11: nB <- length(indBetasB$PSI)
        • line 12: labelB <- groupsAB[2]
      • in plotDensitiesFromEventObjList
        • line 7: artifA <- indBetasA$BetaPoints
        • line 8: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 9: psisA <- indBetasA$PSI
        • line 10: nA <- length(indBetasA$PSI)
        • line 11: labelA <- groupsAB[1]
        • line 12: covA <- indBetasA$inc + indBetasA$exc
        • line 13: medianA <- indBetasA$MedianBeta
        • line 14: artifB <- indBetasB$BetaPoints
        • line 15: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 16: psisB <- indBetasB$PSI
        • line 17: nB <- length(indBetasB$PSI)
        • line 18: labelB <- groupsAB[2]
        • line 19: covB <- indBetasB$inc + indBetasB$exc
        • line 20: medianB <- indBetasB$MedianBeta
      • in plotFDRFromEventObjList
        • line 17: refScale <- refSeq[pos + 1]
        • line 18: artifA <- indBetasA$BetaPoints
        • line 19: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 20: psisA <- indBetasA$PSI
        • line 21: nA <- length(indBetasA$PSI)
        • line 22: labelA <- groupsAB[1]
        • line 23: covA <- indBetasA$inc + indBetasA$exc
        • line 24: medianA <- indBetasA$MedianBeta
        • line 25: artifB <- indBetasB$BetaPoints
        • line 26: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 27: psisB <- indBetasB$PSI
        • line 28: nB <- length(indBetasB$PSI)
        • line 29: labelB <- groupsAB[2]
        • line 30: covB <- indBetasB$inc + indBetasB$exc
        • line 31: medianB <- indBetasB$MedianBeta
      • in plotFstatFromEventObjList
        • line 10: artifA <- indBetasA$BetaPoints
        • line 11: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 12: psisA <- indBetasA$PSI
        • line 13: nA <- length(indBetasA$PSI)
        • line 14: labelA <- groupsAB[1]
        • line 15: covA <- indBetasA$inc + indBetasA$exc
        • line 16: medianA <- indBetasA$MedianBeta
        • line 17: artifB <- indBetasB$BetaPoints
        • line 18: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 19: psisB <- indBetasB$PSI
        • line 20: nB <- length(indBetasB$PSI)
        • line 21: labelB <- groupsAB[2]
        • line 22: covB <- indBetasB$inc + indBetasB$exc
        • line 23: medianB <- indBetasB$MedianBeta
      • in plotPDiffFromEventObjList
        • line 10: artifA <- indBetasA$BetaPoints
        • line 11: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 12: psisA <- indBetasA$PSI
        • line 13: nA <- length(indBetasA$PSI)
        • line 14: labelA <- groupsAB[1]
        • line 15: covA <- indBetasA$inc + indBetasA$exc
        • line 16: medianA <- indBetasA$MedianBeta
        • line 17: artifB <- indBetasB$BetaPoints
        • line 18: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 19: psisB <- indBetasB$PSI
        • line 20: nB <- length(indBetasB$PSI)
        • line 21: labelB <- groupsAB[2]
        • line 22: covB <- indBetasB$inc + indBetasB$exc
        • line 23: medianB <- indBetasB$MedianBeta
    • repetition in estimateFDR and prepareTableEvent
      • in estimateFDR
        • line 3: jntBetas <- list()
        • line 4: artifA <- indBetasA$BetaPoints
        • line 5: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 6: psisA <- indBetasA$PSI
        • line 7: nA <- length(indBetasA$PSI)
        • line 8: labelA <- groupsAB[1]
        • line 9: covA <- indBetasA$inc + indBetasA$exc
        • line 10: medianA <- indBetasA$MedianBeta
        • line 11: artifB <- indBetasB$BetaPoints
        • line 12: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 13: psisB <- indBetasB$PSI
        • line 14: nB <- length(indBetasB$PSI)
        • line 15: labelB <- groupsAB[2]
        • line 16: covB <- indBetasB$inc + indBetasB$exc
        • line 17: medianB <- indBetasB$MedianBeta
        • line 18: originalMedian <- median(c(indBetasA$PSI, indBetasB$PSI))
        • line 19: foundPsi <- medianB - medianA
        • line 20: simDeltaPsi <- c()
        • line 21: npoints <- 10000
        • line 22: simulatedA <- list()
        • line 23: for (sample in unique(artiflabelsA)) {
        • line 24: simReads <- simulate_reads(cov = covA[which(names(covA) ==
        • line 25: sample)], psi = originalMedian)
        • line 26: sampleDistA <- rbeta(npoints, shape1 = simReads$inc,
        • line 27: shape2 = simReads$exc)
        • line 28: simulatedA[[length(simulatedA) + 1]] <- sampleDistA
        • line 29: }
        • line 30: simulatedB <- list()
        • line 31: for (sample in unique(artiflabelsB)) {
        • line 32: simReads <- simulate_reads(cov = covB[which(names(covB) ==
        • line 33: sample)], psi = originalMedian)
        • line 34: sampleDistB <- rbeta(npoints, shape1 = simReads$inc,
        • line 35: shape2 = simReads$exc)
        • line 36: simulatedB[[length(simulatedB) + 1]] <- sampleDistB
        • line 37: }
        • line 38: sampledPointsA <- lapply(1:length(simulatedA), function(x) sample(x = simulatedA[[x]],
        • line 39: size = nsim))
        • line 40: concatenatedA <- as.numeric(as.vector(unlist(sampledPointsA)))
        • line 41: psiA <- as.numeric(as.vector(lapply(1:nsim, function(x) median(concatenatedA[seq(from = x,
        • line 42: to = nsim * nA, by = nsim)]))))
        • line 43: sampledPointsB <- lapply(1:length(simulatedB), function(x) sample(x = simulatedB[[x]],
        • line 44: size = nsim))
        • line 45: concatenatedB <- as.numeric(as.vector(unlist(sampledPointsB)))
        • line 46: psiB <- as.numeric(as.vector(lapply(1:nsim, function(x) median(concatenatedB[seq(from = x,
        • line 47: to = nsim * nB, by = nsim)]))))
        • line 48: simDeltaPsi <- psiB - psiA
        • line 49: fdr <- length(which(abs(simDeltaPsi) >= abs(foundPsi)))/nsim
        • line 50: jntBetas[[1]] <- simDeltaPsi
      • in prepareTableEvent
        • line 16: groupsAB <- c(labA, labB)
        • line 17: artifA <- indBetasA$BetaPoints
        • line 18: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 19: psisA <- indBetasA$PSI
        • line 20: nA <- length(indBetasA$PSI)
        • line 21: labelA <- labA
        • line 22: covA <- indBetasA$inc + indBetasA$exc
        • line 23: medianA <- indBetasA$MedianBeta
        • line 24: artifB <- indBetasB$BetaPoints
        • line 25: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 26: psisB <- indBetasB$PSI
        • line 27: nB <- length(indBetasB$PSI)
        • line 28: labelB <- labB
        • line 29: covB <- indBetasB$inc + indBetasB$exc
        • line 30: medianB <- indBetasB$MedianBeta
        • line 90: originalMedian <- median(c(indBetasA$PSI, indBetasB$PSI))
        • line 91: foundPsi <- medianB - medianA
        • line 92: simDeltaPsi <- c()
        • line 93: npoints <- 10000
        • line 94: simulatedA <- list()
        • line 95: for (sample in unique(artiflabelsA)) {
        • line 96: simReads <- simulate_reads(cov = covA[which(names(covA) ==
        • line 97: sample)], psi = originalMedian)
        • line 98: sampleDistA <- rbeta(npoints, shape1 = simReads$inc,
        • line 99: shape2 = simReads$exc)
        • line 100: simulatedA[[length(simulatedA) + 1]] <- sampleDistA
        • line 101: }
        • line 102: simulatedB <- list()
        • line 103: for (sample in unique(artiflabelsB)) {
        • line 104: simReads <- simulate_reads(cov = covB[which(names(covB) ==
        • line 105: sample)], psi = originalMedian)
        • line 106: sampleDistB <- rbeta(npoints, shape1 = simReads$inc,
        • line 107: shape2 = simReads$exc)
        • line 108: simulatedB[[length(simulatedB) + 1]] <- sampleDistB
        • line 109: }
        • line 110: sampledPointsA <- lapply(1:length(simulatedA), function(x) sample(x = simulatedA[[x]],
        • line 111: size = nsim))
        • line 112: concatenatedA <- as.numeric(as.vector(unlist(sampledPointsA)))
        • line 113: psiA <- as.numeric(as.vector(lapply(1:nsim, function(x) median(concatenatedA[seq(from = x,
        • line 114: to = nsim * nA, by = nsim)]))))
        • line 115: sampledPointsB <- lapply(1:length(simulatedB), function(x) sample(x = simulatedB[[x]],
        • line 116: size = nsim))
        • line 117: concatenatedB <- as.numeric(as.vector(unlist(sampledPointsB)))
        • line 118: psiB <- as.numeric(as.vector(lapply(1:nsim, function(x) median(concatenatedB[seq(from = x,
        • line 119: to = nsim * nB, by = nsim)]))))
        • line 120: simDeltaPsi <- psiB - psiA
        • line 121: fdr <- length(which(abs(simDeltaPsi) >= abs(foundPsi)))/nsim
        • line 122: eventPlotsObjs[[9]] <- simulatedA
    • repetition in fStatistic_2Groups_PerEvent and prepareTableEvent
      • in fStatistic_2Groups_PerEvent
        • line 5: indBetasA <- individualBetas_nofitting_incr(table = qualtable[eventPos,
        • line 6: ], cols = colsA, indpoints = npoints, maxdevRefTable = maxDevTable)
        • line 7: indBetasB <- individualBetas_nofitting_incr(table = qualtable[eventPos,
        • line 8: ], cols = colsB, indpoints = npoints, maxdevRefTable = maxDevTable)
        • line 9: withins <- c()
        • line 10: pointsA <- indBetasA$BetaPoints
        • line 11: pointsB <- indBetasB$BetaPoints
        • line 12: samplesA <- unique(names(pointsA))
        • line 13: samplesB <- unique(names(pointsB))
        • line 14: within_combs_A <- combn(samplesA, 2, simplify = TRUE)
        • line 15: for (combA in 1:ncol(within_combs_A)) {
        • line 16: betas1 <- pointsA[grep(within_combs_A[1, combA],
        • line 17: names(pointsA))]
        • line 20: withins <- c(withins, betas2 - betas1)
        • line 21: }
        • line 22: within_combs_B <- combn(samplesB, 2, simplify = TRUE)
        • line 23: for (combB in 1:ncol(within_combs_B)) {
        • line 24: betas1 <- pointsB[grep(within_combs_B[1, combB],
        • line 25: names(pointsB))]
        • line 28: withins <- c(withins, betas2 - betas1)
        • line 29: }
        • line 30: groups <- c(labA, labB)
        • line 31: betweens <- c()
        • line 32: if (length(pointsA) != length(pointsB)) {
        • line 33: minlen <- min(length(pointsA), length(pointsB))
        • line 34: }
        • line 35: else {
        • line 36: minlen <- length(pointsB)
        • line 37: }
        • line 38: pointsB <- sample(pointsB, size = minlen)
        • line 39: pointsA <- sample(pointsA, size = minlen)
        • line 40: betweens <- c(betweens, pointsB - pointsA)
        • line 41: fstat <- median(abs(betweens))/median(abs(withins))
        • line 42: deltaPsi <- indBetasB$MedianBeta - indBetasA$MedianBeta
        • line 43: fStat_2Groups[[1]] <- fstat
      • in prepareTableEvent
        • line 9: indBetasA <- individualBetas_nofitting_incr(table = qualtable[x,
        • line 10: ], cols = colsA, indpoints = npoints, maxdevRefTable = maxDevTable)
        • line 11: indBetasB <- individualBetas_nofitting_incr(table = qualtable[x,
        • line 12: ], cols = colsB, indpoints = npoints, maxdevRefTable = maxDevTable)
        • line 13: eventPlotsObjs <- list()
        • line 57: withins <- c()
        • line 58: pointsA <- indBetasA$BetaPoints
        • line 59: pointsB <- indBetasB$BetaPoints
        • line 60: samplesA <- unique(names(pointsA))
        • line 61: samplesB <- unique(names(pointsB))
        • line 62: within_combs_A <- combn(samplesA, 2, simplify = TRUE)
        • line 63: for (combA in 1:ncol(within_combs_A)) {
        • line 64: betas1 <- pointsA[grep(within_combs_A[1, combA], names(pointsA))]
        • line 66: withins <- c(withins, betas2 - betas1)
        • line 67: }
        • line 68: within_combs_B <- combn(samplesB, 2, simplify = TRUE)
        • line 69: for (combB in 1:ncol(within_combs_B)) {
        • line 70: betas1 <- pointsB[grep(within_combs_B[1, combB], names(pointsB))]
        • line 72: withins <- c(withins, betas2 - betas1)
        • line 73: }
        • line 74: groups <- c(labA, labB)
        • line 75: betweens <- c()
        • line 76: if (length(pointsA) != length(pointsB)) {
        • line 77: minlen <- min(length(pointsA), length(pointsB))
        • line 78: }
        • line 79: else {
        • line 80: minlen <- length(pointsB)
        • line 81: }
        • line 82: pointsB <- sample(pointsB, size = minlen)
        • line 83: pointsA <- sample(pointsA, size = minlen)
        • line 84: betweens <- c(betweens, pointsB - pointsA)
        • line 85: fstat <- median(abs(betweens))/median(abs(withins))
        • line 86: deltaPsi <- indBetasB$MedianBeta - indBetasA$MedianBeta
        • line 87: eventPlotsObjs[[6]] <- withins
    • repetition in jointBetas_nofitting and jointBetas_nofitting_Fast0
      • in jointBetas_nofitting
        • line 3: xlength <- 1001
        • line 4: artifA <- indBetasA$BetaPoints
        • line 5: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 6: psisA <- indBetasA$PSI
        • line 7: nA <- length(indBetasA$PSI)
        • line 8: labelA <- groupsAB[1]
        • line 9: artifB <- indBetasB$BetaPoints
        • line 10: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 11: psisB <- indBetasB$PSI
        • line 12: nB <- length(indBetasB$PSI)
        • line 13: labelB <- groupsAB[2]
        • line 14: indpoints <- length(artifA)/nA
        • line 15: df_psis <- as.data.frame(rbind(cbind(psisA, names(psisA),
        • line 16: rep(labelA, times = length(psisA))), cbind(psisB, names(psisB),
        • line 17: rep(labelB, times = length(psisB)))))
        • line 18: colnames(df_psis) <- c("PSI", "Sample", "Type")
        • line 19: jntBetas <- list()
        • line 22: if (length(artifA) != length(artifB)) {
        • line 23: minlen <- min(length(artifA), length(artifB))
        • line 24: }
        • line 25: else {
        • line 26: minlen <- length(artifB)
        • line 27: }
        • line 28: artifA <- sample(x = artifA, size = minlen)
        • line 29: artifB <- sample(x = artifB, size = minlen)
        • line 35: t_p_zero <- abs(p_zero - 0.5) + 0.5
        • line 36: jntBetas[[1]] <- p_zero
        • line 37: jntBetas[[2]] <- t_p_zero
        • line 38: names(jntBetas) <- c("P(x=0)", "FlippedP(x=0)")
        • line 39: return(jntBetas)
      • in jointBetas_nofitting_Fast0
        • line 2: {
        • line 3: artifA <- indBetasA$BetaPoints
        • line 4: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 5: psisA <- indBetasA$PSI
        • line 6: nA <- length(indBetasA$PSI)
        • line 7: labelA <- groupsAB[1]
        • line 8: artifB <- indBetasB$BetaPoints
        • line 9: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 10: psisB <- indBetasB$PSI
        • line 11: nB <- length(indBetasB$PSI)
        • line 12: labelB <- groupsAB[2]
        • line 13: indpoints <- length(artifA)/nA
        • line 14: df_psis <- as.data.frame(rbind(cbind(psisA, names(psisA),
        • line 15: rep(labelA, times = length(psisA))), cbind(psisB,
        • line 16: names(psisB), rep(labelB, times = length(psisB)))))
        • line 17: colnames(df_psis) <- c("PSI", "Sample", "Type")
        • line 18: jntBetas <- list()
        • line 19: if (length(artifA) != length(artifB)) {
        • line 20: minlen <- min(length(artifA), length(artifB))
        • line 21: }
        • line 22: else {
        • line 23: minlen <- length(artifB)
        • line 24: }
        • line 25: artifA <- sample(x = artifA, size = minlen)
        • line 26: artifB <- sample(x = artifB, size = minlen)
        • line 28: t_p_zero <- abs(p_zero - 0.5) + 0.5
        • line 29: jntBetas[[1]] <- p_zero
        • line 30: jntBetas[[2]] <- t_p_zero
        • line 31: names(jntBetas) <- c("P(x=0)", "FlippedP(x=0)")
        • line 32: return(jntBetas)
    • repetition in jointBetas_nofitting_Fast0 and prepareTableEvent
      • in jointBetas_nofitting_Fast0
        • line 3: artifA <- indBetasA$BetaPoints
        • line 4: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 5: psisA <- indBetasA$PSI
        • line 6: nA <- length(indBetasA$PSI)
        • line 7: labelA <- groupsAB[1]
        • line 8: artifB <- indBetasB$BetaPoints
        • line 9: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 10: psisB <- indBetasB$PSI
        • line 11: nB <- length(indBetasB$PSI)
        • line 12: labelB <- groupsAB[2]
        • line 13: indpoints <- length(artifA)/nA
        • line 14: df_psis <- as.data.frame(rbind(cbind(psisA, names(psisA),
        • line 15: rep(labelA, times = length(psisA))), cbind(psisB,
        • line 16: names(psisB), rep(labelB, times = length(psisB)))))
        • line 17: colnames(df_psis) <- c("PSI", "Sample", "Type")
        • line 18: jntBetas <- list()
        • line 19: if (length(artifA) != length(artifB)) {
        • line 20: minlen <- min(length(artifA), length(artifB))
        • line 21: }
        • line 22: else {
        • line 23: minlen <- length(artifB)
        • line 24: }
        • line 25: artifA <- sample(x = artifA, size = minlen)
        • line 26: artifB <- sample(x = artifB, size = minlen)
      • in prepareTableEvent
        • line 17: artifA <- indBetasA$BetaPoints
        • line 18: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 19: psisA <- indBetasA$PSI
        • line 20: nA <- length(indBetasA$PSI)
        • line 21: labelA <- labA
        • line 24: artifB <- indBetasB$BetaPoints
        • line 25: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 26: psisB <- indBetasB$PSI
        • line 27: nB <- length(indBetasB$PSI)
        • line 28: labelB <- labB
        • line 32: indpoints <- length(artifA)/nA
        • line 33: df_psis <- as.data.frame(rbind(cbind(psisA, names(psisA),
        • line 34: rep(labelA, times = length(psisA))), cbind(psisB, names(psisB),
        • line 35: rep(labelB, times = length(psisB)))))
        • line 36: colnames(df_psis) <- c("PSI", "Sample", "Type")
        • line 37: jntBetas <- list()
        • line 40: if (length(artifA) != length(artifB)) {
        • line 41: minlen <- min(length(artifA), length(artifB))
        • line 42: }
        • line 43: else {
        • line 44: minlen <- length(artifB)
        • line 45: }
        • line 46: artifA <- sample(x = artifA, size = minlen)
        • line 47: artifB <- sample(x = artifB, size = minlen)
    • repetition in plotDensitiesFromEventObjList, plotFDRFromEventObjList , plotFstatFromEventObjList and plotPDiffFromEventObjList
      • in plotDensitiesFromEventObjList
        • line 1: function (eventObjList, colorA, colorB)
        • line 2: {
        • line 3: eventID <- eventObjList$eventID
        • line 4: indBetasA <- eventObjList$indBetasA
        • line 5: indBetasB <- eventObjList$indBetasB
        • line 6: groupsAB <- eventObjList$groupsAB
        • line 7: artifA <- indBetasA$BetaPoints
        • line 8: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 9: psisA <- indBetasA$PSI
        • line 10: nA <- length(indBetasA$PSI)
        • line 11: labelA <- groupsAB[1]
        • line 12: covA <- indBetasA$inc + indBetasA$exc
        • line 13: medianA <- indBetasA$MedianBeta
        • line 14: artifB <- indBetasB$BetaPoints
        • line 15: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 16: psisB <- indBetasB$PSI
        • line 17: nB <- length(indBetasB$PSI)
        • line 18: labelB <- groupsAB[2]
        • line 19: covB <- indBetasB$inc + indBetasB$exc
        • line 20: medianB <- indBetasB$MedianBeta
        • line 21: samplesA <- unique(artiflabelsA)
        • line 22: samplesB <- unique(artiflabelsB)
      • in plotFDRFromEventObjList
        • line 1: function (eventObjList)
        • line 2: {
        • line 3: eventID <- eventObjList$eventID
        • line 4: indBetasA <- eventObjList$indBetasA
        • line 5: indBetasB <- eventObjList$indBetasB
        • line 6: simulatedA <- eventObjList$simA
        • line 18: artifA <- indBetasA$BetaPoints
        • line 19: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 20: psisA <- indBetasA$PSI
        • line 21: nA <- length(indBetasA$PSI)
        • line 22: labelA <- groupsAB[1]
        • line 23: covA <- indBetasA$inc + indBetasA$exc
        • line 24: medianA <- indBetasA$MedianBeta
        • line 25: artifB <- indBetasB$BetaPoints
        • line 26: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 27: psisB <- indBetasB$PSI
        • line 28: nB <- length(indBetasB$PSI)
        • line 29: labelB <- groupsAB[2]
        • line 30: covB <- indBetasB$inc + indBetasB$exc
        • line 31: medianB <- indBetasB$MedianBeta
        • line 32: samplesA <- unique(artiflabelsA)
        • line 33: samplesB <- unique(artiflabelsB)
      • in plotFstatFromEventObjList
        • line 1: function (eventObjList)
        • line 2: {
        • line 3: eventID <- eventObjList$eventID
        • line 4: indBetasA <- eventObjList$indBetasA
        • line 5: indBetasB <- eventObjList$indBetasB
        • line 6: withins <- eventObjList$Withins
        • line 8: fstat <- eventObjList$Fstat
        • line 9: groupsAB <- eventObjList$groupsAB
        • line 10: artifA <- indBetasA$BetaPoints
        • line 11: artiflabelsA <- names(indBetasA$BetaPoints)
        • line 12: psisA <- indBetasA$PSI
        • line 13: nA <- length(indBetasA$PSI)
        • line 14: labelA <- groupsAB[1]
        • line 15: covA <- indBetasA$inc + indBetasA$exc
        • line 16: medianA <- indBetasA$MedianBeta
        • line 17: artifB <- indBetasB$BetaPoints
        • line 18: artiflabelsB <- names(indBetasB$BetaPoints)
        • line 19: psisB <- indBetasB$PSI
        • line 20: nB <- length(indBetasB$PSI)
        • line 21: labelB <- groupsAB[2]
        • line 22: covB <- indBetasB$inc + indBetasB$exc
        • line 23: medianB <- indBetasB$MedianBeta
        • line 24: samplesA <- unique(artiflabelsA)
        • line 25: samplesB <- unique(artiflabelsB)
    • repetition in plotDensitiesFromEventObjList and plotIndividualDensities
      • in plotDensitiesFromEventObjList
        • line 22: samplesB <- unique(artiflabelsB)
        • line 23: themeColors <- c("#89C0AE", "#E69A9C", "#76CAA0", "#EE805B",
        • line 24: "#F7CF77", "#81C1D3")
        • line 25: randomColorsA <- colorRampPalette(c(themeColors[1], themeColors[2]))(4)
        • line 26: randomColorsB <- colorRampPalette(c(themeColors[3], themeColors[4]))(4)
        • line 48: colorB <- themeColors[6]
        • line 49: plot <- ggplot(densities_df, aes(x = points, y = samples,
        • line 50: group = samples, color = group, fill = group)) +
        • line 51: geom_density_ridges(size = 2, alpha = 0.8, show.legend = FALSE,
        • line 52: rel_min_height = 0.001) + geom_rug(data = psis_df,
        • line 53: aes(x = psis, color = group), size = 3, alpha = 0.8,
        • line 54: show.legend = FALSE) + scale_color_manual(values = c(colorA,
        • line 55: colorB)) + scale_fill_manual(values = c(colorA, colorB)) +
      • in plotIndividualDensities
        • line 10: samplesB <- names(colsB)
        • line 11: themeColors <- c("#89C0AE", "#E69A9C", "#76CAA0", "#EE805B",
        • line 12: "#F7CF77", "#81C1D3")
        • line 13: randomColorsA <- colorRampPalette(c(themeColors[1], themeColors[2]))(4)
        • line 14: randomColorsB <- colorRampPalette(c(themeColors[3], themeColors[4]))(4)
        • line 60: rep(labB, times = length(colsB))))
        • line 61: plot <- ggplot(densities_df, aes(x = points, y = samples,
        • line 62: group = samples, color = group, fill = group)) +
        • line 63: geom_density_ridges(size = 2, alpha = 0.8, show.legend = FALSE,
        • line 64: rel_min_height = 0.001) + geom_rug(data = psis_df,
        • line 65: aes(x = psis, color = group), size = 3, alpha = 0.8,
        • line 66: show.legend = FALSE) + scale_color_manual(values = c(colorA,
        • line 67: colorB)) + scale_fill_manual(values = c(colorA, colorB)) +
    • repetition in plotFDRFromEventObjList and plotVolcano and plotVolcanoFDR and plotVolcanoFstat
      • in plotFDRFromEventObjList
        • line 13: refSeq <- seq(0, 1, 0.1)
        • line 14: maxDeltaPsi <- abs(deltaPsi)
        • line 15: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 16: maxDeltaPsi)))
        • line 17: refScale <- refSeq[pos + 1]
      • in plotVolcano
        • line 3: refSeq <- seq(0, 1, 0.1)
        • line 4: maxDeltaPsi <- max(abs(betasTable$deltapsi))
        • line 5: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 6: maxDeltaPsi)))
        • line 7: refScale <- refSeq[pos + 1]
      • in plotVolcanoFDR
        • line 3: refSeq <- seq(0, 1, 0.1)
        • line 4: maxDeltaPsi <- max(abs(betasTable$deltapsi))
        • line 5: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 6: maxDeltaPsi)))
        • line 7: refScale <- refSeq[pos + 1]
      • in plotVolcanoFstat
        • line 3: refSeq <- seq(0, 1, 0.1)
        • line 4: maxDeltaPsi <- max(abs(betasTable$deltapsi))
        • line 5: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 6: maxDeltaPsi)))
        • line 7: refScale <- refSeq[pos + 1]
    • repetition in plotIndividualDensities and plotIndividualDensitiesList
      • in plotIndividualDensities
        • line 37: times = length(points_df_A)))
        • line 38: densities_df <- rbind(densities_df, sample_df_A)
        • line 39: psis_df_A <- data.frame(psis = matrix(unlist(betasListA[[i]]$PSI),
        • line 40: nrow = 1, byrow = TRUE), stringsAsFactors = FALSE)
        • line 41: samplepsis_df_A <- cbind(psis = psis_df_A, samples = rep(samplesA[i],
        • line 49: times = length(points_df_B)))
        • line 50: densities_df <- rbind(densities_df, sample_df_B)
        • line 51: psis_df_B <- data.frame(psis = matrix(unlist(betasListB[[j]]$PSI),
        • line 52: nrow = 1, byrow = TRUE), stringsAsFactors = FALSE)
        • line 53: samplepsis_df_B <- cbind(psis = psis_df_B, samples = rep(samplesB[j],
        • line 62: group = samples, color = group, fill = group)) +
        • line 63: geom_density_ridges(size = 2, alpha = 0.8, show.legend = FALSE,
        • line 64: rel_min_height = 0.001) + geom_rug(data = psis_df,
        • line 65: aes(x = psis, color = group), size = 3, alpha = 0.8,
      • in plotIndividualDensitiesList
        • line 30: times = length(points_df)))
        • line 31: densities_df <- rbind(densities_df, sample_df)
        • line 32: psis <- data.frame(psis = matrix(unlist(indBetasGroup$PSI),
        • line 33: nrow = 1, byrow = TRUE), stringsAsFactors = FALSE)
        • line 34: samplepsis_df <- cbind(psis = psis, samples = rep(samples[samp],
        • line 44: color = group, fill = group)) + geom_density_ridges(size = 2,
        • line 45: alpha = 0.8, show.legend = FALSE, rel_min_height = 0.001) +
        • line 46: geom_rug(data = psis_df, aes(x = psis, color = group),
        • line 47: size = 3, alpha = 0.8, show.legend = FALSE) +
    • repetition in plotVolcano and plotVolcanoFDR and plotVolcanoFstat
      • in plotVolcano
        • line 1: labA, labB, basalColor, interestColor)
        • line 2:{
        • line 3: refSeq <- seq(0, 1, 0.1)
        • line 4: maxDeltaPsi <- max(abs(betasTable$deltapsi))
        • line 5: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 6: maxDeltaPsi)))
        • line 7: refScale <- refSeq[pos + 1]
        • line 8: ggplot(betasTable, aes(x = deltapsi, y = Pdiff)) + geom_point(alpha = 0.3,
        • line 9: color = basalColor, size = 4) + geom_point(data = betasTable[which(abs(betasTable$deltapsi) >
        • line 10: 0.1), ], size = 3, color = interestColor) + geom_text_repel(data = betasTable[which(abs(betasTable$deltapsi) >
        • line 11: 0.1), ], color = interestColor, aes(label = paste0(EVENT,
        • line 12: "\n(", GENE, ")")), size = 5) + scale_x_continuous(breaks = seq(-refScale,
        • line 13: refScale, 0.1), limits = c(-refScale, refScale)) + xlab(paste0("PSI(",
        • line 14: labB, ") - PSI(", labA, ")")) + ylab(paste0("Probability of differential splicing between ",
      • in plotVolcanoFDR
        • line 1: labA, labB, basalColor, interestColor)
        • line 2:{
        • line 3: refSeq <- seq(0, 1, 0.1)
        • line 4: maxDeltaPsi <- max(abs(betasTable$deltapsi))
        • line 5: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 6: maxDeltaPsi)))
        • line 7: refScale <- refSeq[pos + 1]
        • line 8: ggplot(betasTable, aes(x = deltapsi, y = invertedFDR)) +
        • line 9: geom_point(alpha = 0.3, color = basalColor, size = 4) +
        • line 10: geom_point(data = betasTable[which(abs(betasTable$deltapsi) >
        • line 11: 0.1), ], size = 3, color = interestColor) + geom_text_repel(data = betasTable[which(abs(betasTable$deltapsi) >
        • line 12: 0.1), ], color = interestColor, aes(label = paste0(EVENT,
        • line 13: "\n(", GENE, ")")), size = 5) + scale_x_continuous(breaks = seq(-refScale,
        • line 14: refScale, 0.1), limits = c(-refScale, refScale)) + xlab(paste0("PSI(",
        • line 15: labB, ") - PSI(", labA, ")")) + ylab("1 - False Discovery Rate") +
      • in plotVolcanoFstat
        • line 1: labA, labB, basalColor, interestColor)
        • line 2:{
        • line 3: refSeq <- seq(0, 1, 0.1)
        • line 4: maxDeltaPsi <- max(abs(betasTable$deltapsi))
        • line 5: pos <- which(abs(refSeq - maxDeltaPsi) == min(abs(refSeq -
        • line 6: maxDeltaPsi)))
        • line 7: refScale <- refSeq[pos + 1]
        • line 8: ggplot(betasTable, aes(x = deltapsi, y = Fstat)) + geom_point(alpha = 0.3,
        • line 9: color = basalColor, size = 4) + geom_point(data = betasTable[which(abs(betasTable$deltapsi) >
        • line 10: 0.1), ], size = 3, color = interestColor) + geom_text_repel(data = betasTable[which(abs(betasTable$deltapsi) >
        • line 11: 0.1), ], color = interestColor, aes(label = paste0(EVENT,
        • line 12: "\n(", GENE, ")")), size = 5) + scale_x_continuous(breaks = seq(-refScale,
        • line 13: refScale, 0.1), limits = c(-refScale, refScale)) + xlab(paste0("PSI(",
        • line 14: labB, ") - PSI(", labA, ")")) + ylab(expression("F-statistic")) +
    • repetition in prepareTableVolcano and prepareTableVolcanoFDR and prepareTableVolcanoFstat
      • in prepareTableVolcano
        • line 1: qualtable, npoints, colsA, colsB, labA, labB, basalColor,
        • line 2: interestColor, maxDevTable)
        • line 3:{
        • line 4: colsA <- convertCols(psitable, colsA)
        • line 5: samplesA <- names(colsA)
        • line 6: colsB <- convertCols(psitable, colsB)
        • line 7: samplesB <- names(colsB)
        • line 8: groupAbetAS <- lapply(1:nrow(qualtable), function(x) individualBetas_nofitting_incr(table = qualtable[x,
        • line 9: ], cols = colsA, indpoints = npoints, maxdevRefTable = maxDevTable))
        • line 10: groupBbetAS <- lapply(1:nrow(qualtable), function(x) individualBetas_nofitting_incr(table = qualtable[x,
        • line 11: ], cols = colsB, indpoints = npoints, maxdevRefTable = maxDevTable))
        • line 12: diffABbetAS <- lapply(1:nrow(qualtable), function(x) jointBetas_nofitting_Fast0(indBetasA = groupAbetAS[[x]],
        • line 13: indBetasB = groupBbetAS[[x]], groupsAB = c(labA, labB)))
        • line 14: names(groupAbetAS) <- qualtable$EVENT
        • line 15: names(groupBbetAS) <- qualtable$EVENT
        • line 16: names(diffABbetAS) <- qualtable$EVENT
        • line 17: betasTable <- psitable
        • line 18: betasTable$Pdiff <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 19: function(x) diffABbetAS[[x]][[2]])))
        • line 20: betasTable$betasPsiA <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 21: function(x) groupAbetAS[[x]]$MedianBeta)))
        • line 22: betasTable$betasPsiB <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 23: function(x) groupBbetAS[[x]]$MedianBeta)))
        • line 24: betasTable$deltapsi <- betasTable$betasPsiB - betasTable$betasPsiA
        • line 25: return(betasTable)
      • in prepareTableVolcanoFDR
        • line 1: qualtable, npoints, colsA, colsB, labA, labB, basalColor,
        • line 2: interestColor, maxDevTable, nsim)
        • line 3:{
        • line 4: colsA <- convertCols(psitable, colsA)
        • line 5: samplesA <- names(colsA)
        • line 6: colsB <- convertCols(psitable, colsB)
        • line 7: samplesB <- names(colsB)
        • line 8: groupAbetAS <- lapply(1:nrow(qualtable), function(x) individualBetas_nofitting_incr(table = qualtable[x,
        • line 9: ], cols = colsA, indpoints = npoints, maxdevRefTable = maxDevTable))
        • line 10: groupBbetAS <- lapply(1:nrow(qualtable), function(x) individualBetas_nofitting_incr(table = qualtable[x,
        • line 11: ], cols = colsB, indpoints = npoints, maxdevRefTable = maxDevTable))
        • line 12: diffABbetAS <- lapply(1:nrow(qualtable), function(x) estimateFDR(indBetasA = groupAbetAS[[x]],
        • line 13: indBetasB = groupBbetAS[[x]], groupsAB = c(labA, labB),
        • line 15: names(groupAbetAS) <- qualtable$EVENT
        • line 16: names(groupBbetAS) <- qualtable$EVENT
        • line 17: names(diffABbetAS) <- qualtable$EVENT
        • line 18: betasTable <- psitable
        • line 19: betasTable$FDR <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 20: function(x) diffABbetAS[[x]][[3]])))
        • line 21: betasTable$invertedFDR <- 1 - betasTable$FDR
        • line 22: betasTable$betasPsiA <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 23: function(x) groupAbetAS[[x]]$MedianBeta)))
        • line 24: betasTable$betasPsiB <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 25: function(x) groupBbetAS[[x]]$MedianBeta)))
        • line 26: betasTable$deltapsi <- betasTable$betasPsiB - betasTable$betasPsiA
        • line 27: return(betasTable)
      • in prepareTableVolcanoFstat
        • line 1: function (psitable, qualtable, npoints, colsA, colsB, labA,
        • line 2: labB, basalColor, interestColor, maxDevTable)
        • line 3: {
        • line 4: colsA <- convertCols(psitable, colsA)
        • line 5: samplesA <- names(colsA)
        • line 6: colsB <- convertCols(psitable, colsB)
        • line 7: samplesB <- names(colsB)
        • line 13: betasTable <- psitable
        • line 14: betasTable$deltapsi <- as.numeric(as.vector(lapply(1:nrow(qualtable),
        • line 15: function(x) fstat2groups[[x]]$deltaPsi)))
        • line 16: betasTable$Fstat <- as.numeric(as.vector(lapply(1:nrow(qualtable),

Documentation

  • [ ] Important: Vignette should use BiocStyle package for formatting.
  • [ ] Important: Vignette should have an Introduction section..
  • [ ] Note: Vignette includes motivation for submitting to Bioconductor as part of the abstract/intro of the main vignette.
  • [ ] To avoid the * NOTE: Consider adding runnable examples to man pages that documentexported objects. in BiocCheck, could you please add runnable examples to - betASapp.Rd
  • [ ] Important: move rds files under vignettes to inst/extdata folder
  • [ ] Important: fix the words (development version) in line 45 of betASapp.R.

Shiny App

  • [ ] Note: if possible, rewrite the app with modules.

jianhong avatar Jan 19 '23 21:01 jianhong

@marianaferreira may we expect updates soon? We like to see changes within a 3-4 week time frame to keep reviews moving. Also what is the status of incorporating SummarizedExperiment as it was mentioned in the prereview?

lshep avatar Feb 17 '23 14:02 lshep

Hey @lshep. Yes, I’m planning to submit changes soon as I’m currently working on the point-by-point revision on your suggestions. I’m still considering how to include SummarizedExperiment in the package. Thank you!

marianaferreira avatar Feb 21 '23 18:02 marianaferreira

This issue is being closed because there has been no progress for an extended period of time. You may reopen the issue when you have the time to actively participate in the review / submission process. Please also keep in mind that a package accepted to Bioconductor requires a commitment on your part to ongoing maintenance.

Thank you for your interest in Bioconductor.

bioc-issue-bot avatar Mar 31 '23 16:03 bioc-issue-bot