Skip to content

Commit

Permalink
Add more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
csoneson committed Jul 3, 2023
1 parent 73776b9 commit d3217bf
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 28 deletions.
38 changes: 24 additions & 14 deletions R/runPDTMTAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,30 @@
#'
#' @examples
#' if (interactive()) {
#' # sampleAnnot <- read.delim(
#' # system.file("extdata/mq_example/1356_sampleAnnot.txt",
#' # package = "einprot"))
#' # ## Basic analysis
#' # out <- runPDTMTAnalysis(
#' # outputDir = tempdir(),
#' # outputBaseName = "PD_TMT_basic",
#' # species = "mouse",
#' # iColPattern = "",
#' # sampleAnnot = sampleAnnot,
#' # stringIdCol = NULL
#' # )
#' # ## Output file
#' # out
#' ## Basic analysis
#' out <- runPDTMTAnalysis(
#' outputDir = tempdir(),
#' outputBaseName = "PD_TMT_basic",
#' species = "baker's yeast",
#' iColPattern = "^Abundance.F.+.Sample.",
#' pdOutputFolder = system.file("extdata", "pdtmt_example",
#' package = "einprot"),
#' pdResultName = "Fig2_m23139_RTS_QC_varMods",
#' inputLevel = "Proteins",
#' pdAnalysisFile = system.file("extdata", "pdtmt_example",
#' "Fig2_m23139_RTS_QC_varMods.pdAnalysis",
#' package = "einprot"),
#' sampleAnnot = data.frame(
#' sample = c("HIS4KO_S05", "HIS4KO_S06", "HIS4KO_S07", "HIS4KO_S08",
#' "MET6KO_S01", "MET6KO_S02", "MET6KO_S03", "MET6KO_S04",
#' "URA2KO_S09", "URA2KO_S10", "URA2KO_S11", "URA2KO_S12",
#' "WT_S13", "WT_S14", "WT_S15", "WT_S16"),
#' group = c(rep("HIS4KO", 4), rep("MET6KO", 4), rep("URA2KO", 4),
#' rep("WT", 4))),
#' stringIdCol = NULL
#' )
#' ## Output file
#' out
#' }
#'
#' @returns Invisibly, the path to the compiled html report.
Expand Down
8 changes: 8 additions & 0 deletions R/seqLogoApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
#' files exported from the shiny app.
#' @param ... Additional arguments passed to \code{utils::read.csv}.
#'
#' @examples
#' tbl <- data.frame(id = c("seq1", "seq2", "seq3"),
#' seqWindow = c("LITKDHE", "RQMKQPE", "LSNKVHG"))
#' tfile <- tempfile(fileext = "_seq.csv")
#' write.table(tbl, file = tfile, row.names = FALSE,
#' col.names = TRUE, quote = TRUE, sep = ",")
#' seqLogoApp(tfile)
#'
#' @importFrom shiny fluidPage fluidPage sidebarLayout sidebarPanel
#' mainPanel downloadButton plotOutput renderPlot reactive downloadHandler
#' shinyApp textOutput renderText
Expand Down
14 changes: 14 additions & 0 deletions R/subtractBaseline.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
#'
#' @returns Matrix with baseline-subtracted abundances.
#'
#' @examples
#' sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds",
#' package = "einprot"))
#'
#' ## Introduce artificial batch column
#' sce$batch <- rep(c("B1", "B2", "B3"), 3)
#' SummarizedExperiment::colData(sce)
#' mat <- getMatSubtractedBaseline(sce, assayName = "log2_LFQ.intensity",
#' baselineGroup = "RBC_ctrl",
#' sceFull = sce)
#' ## After the subtraction, the baseline samples are equalized across the
#' ## different batches
#' head(mat)
#'
#' @importFrom SummarizedExperiment assay assayNames
#'
getMatSubtractedBaseline <- function(sce, assayName, baselineGroup, sceFull) {
Expand Down
15 changes: 15 additions & 0 deletions man/getMatSubtractedBaseline.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 24 additions & 14 deletions man/runPDTMTAnalysis.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/seqLogoApp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d3217bf

Please sign in to comment.