# Basic R-Usage Guide for PTXQC

#### Chris Bielow chris.bielow@fu-berlin.de

#### 2017-04-03

# Basic R-Usage Guide for PTXQC

This vignette serves as a quickstart guide for R users to create a report from within R using PTXQC.

Target Audience: R users

Reports can be generated using the default configuration of PTXQC. See

    vignette("PTXQC-InputData", package = "PTXQC")

how a txt folder should look like.

## Generate a default report

This is the most simple invokation of PTXQC::createReport().

    require(PTXQC)

    ## Loading required package: PTXQC
    ## Loading package PTXQC (version 0.82.3)

    ## the next require() is needed to prevent a spurious error in certain R versions (might be a bug in R or a package)
    ## error message is:
    ##    Error in Scales$new : could not find function "loadMethod"
    require(methods)

    ## specify a path to a MaxQuant txt folder
    ## Note: This folder needs to be complete (see 'vignette("PTXQC-InputData", package = "PTXQC")')
    if (1) {
      ## we will use an example dataset from PRIDE (dataset 2 of the PTXQC publication)
      local_zip = tempfile(fileext=".zip")
      download.file("ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2015/11/PXD003133/txt_20min.zip", destfile = local_zip)
      unzip(local_zip, exdir = tempdir()) ## extracts content
      txt_folder = paste0(tempdir(),"/txt_20min")
    } else {
      ## if you have local MaxQuant output, just use it
      txt_folder = "c:/Proteomics/MouseLiver/combined/txt"
    }

    r = createReport(txt_folder)

    ## getYAML with: PTXQC$ReportFilename$extended  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: PTXQC$UseLocalMQPar  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: File$Parameters$enabled  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: PTXQC$NameLengthMax_num  default: 10
    ##  .. return default: 10
    ## getYAML with: File$Summary$enabled  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: File$Summary$IDRate$Thresh_bad_num  default: 20
    ##  .. return default: 20
    ## getYAML with: File$Summary$IDRate$Thresh_great_num  default: 35
    ##  .. return default: 35
    ## getYAML with: File$ProteinGroups$enabled  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: File$ProteinGroups$RatioPlot$LabelIncThresh_num  default: 4
    ##  .. return default: 4
    ## getYAML with: File$ProteinGroups$IntensityThreshLog2_num  default: 25
    ##  .. return default: 25
    ## getYAML with: File$Evidence$enabled  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: File$Evidence$ProteinCountThresh_num  default: 3500
    ##  .. return default: 3500
    ## getYAML with: File$Evidence$IntensityThreshLog2_num  default: 23
    ##  .. return default: 23
    ## getYAML with: File$Evidence$PeptideCountThresh_num  default: 15000
    ##  .. return default: 15000
    ## getYAML with: File$Evidence$SpecialContaminants  default: c("MYCOPLASMA", "1")
    ##  .. return default: c("MYCOPLASMA", "1")
    ## getYAML with: File$Evidence$MQpar_MatchingTimeWindow_num  default: 1
    ##  .. return default: 1
    ## getYAML with: File$Evidence$MatchBetweenRuns_wA  default: auto
    ##  .. return default: auto
    ## getYAML with: File$Evidence$MQpar_firstSearchTol_num  default: 20
    ##  .. return default: 20
    ## getYAML with: File$Evidence$firstSearch_outOfCalWarnSD_num  default: 2
    ##  .. return default: 2
    ## getYAML with: File$Evidence$MQpar_mainSearchTol_num  default: NA
    ##  .. return default: NA
    ## getYAML with: File$MsMs$enabled  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: File$MsMsScans$enabled  default: TRUE
    ##  .. return default: TRUE
    ## getYAML with: File$MsMsScans$IonInjectionThresh_num  default: 10
    ##  .. return default: 10
    ## getYAML with: PTXQC$OutputFormats  default: html
    ##  getYAML with: PTXQC$OutputFormats  default: plainPDF
    ##  .. return default: html
    ##   .. return default: plainPDF
    ## getYAML with: PTXQC$PlainPDF$AddPageNumbers  default: on
    ##  .. return default: on
    ## meta id:  qcMetric_PAR
    ## getYAML with: order$qcMetric_PAR  default: 1
    ##  .. return default: 1
    ## meta id:  qcMetric_PG_PCA
    ## getYAML with: order$qcMetric_PG_PCA  default: 3
    ##  .. return default: 3
    ## meta id:  qcMetric_EVD_Top5Cont
    ## getYAML with: order$qcMetric_EVD_Top5Cont  default: 10
    ##  .. return default: 10
    ## meta id:  qcMetric_PG_Ratio
    ## getYAML with: order$qcMetric_PG_Ratio  default: 19
    ##  .. return default: 19
    ## meta id:  qcMetric_EVD_UserContaminant
    ## getYAML with: order$qcMetric_EVD_UserContaminant  default: 20
    ##  .. return default: 20
    ## meta id:  qcMetric_EVD_PeptideInt
    ## getYAML with: order$qcMetric_EVD_PeptideInt  default: 30
    ##  .. return default: 30
    ## meta id:  qcMetric_PG_RawInt
    ## getYAML with: order$qcMetric_PG_RawInt  default: 32
    ##  .. return default: 32
    ## meta id:  qcMetric_PG_LFQInt
    ## getYAML with: order$qcMetric_PG_LFQInt  default: 33
    ##  .. return default: 33
    ## meta id:  qcMetric_PG_ITRAQInt
    ## getYAML with: order$qcMetric_PG_ITRAQInt  default: 34
    ##  .. return default: 34
    ## meta id:  qcMetric_MSMS_MissedCleavages
    ## getYAML with: order$qcMetric_MSMS_MissedCleavages  default: 40
    ##  .. return default: 40
    ## meta id:  qcMetric_EVD_Charge
    ## getYAML with: order$qcMetric_EVD_Charge  default: 100
    ##  .. return default: 100
    ## meta id:  qcMetric_PG_Cont
    ## getYAML with: order$qcMetric_PG_Cont  default: 110
    ##  .. return default: 110
    ## meta id:  qcMetric_MSMSScans_TopNoverRT
    ## getYAML with: order$qcMetric_MSMSScans_TopNoverRT  default: 120
    ##  .. return default: 120
    ## meta id:  qcMetric_EVD_IDoverRT
    ## getYAML with: order$qcMetric_EVD_IDoverRT  default: 150
    ##  .. return default: 150
    ## meta id:  qcMetric_EVD_RTPeakWidth
    ## getYAML with: order$qcMetric_EVD_RTPeakWidth  default: 170
    ##  .. return default: 170
    ## meta id:  qcMetric_EVD_MBRAlign
    ## getYAML with: order$qcMetric_EVD_MBRAlign  default: 210
    ##  .. return default: 210
    ## meta id:  qcMetric_EVD_MBRIdTransfer
    ## getYAML with: order$qcMetric_EVD_MBRIdTransfer  default: 220
    ##  .. return default: 220
    ## meta id:  qcMetric_EVD_MBRaux
    ## getYAML with: order$qcMetric_EVD_MBRaux  default: 221
    ##  .. return default: 221
    ## meta id:  qcMetric_MSMSScans_IonInjTime
    ## getYAML with: order$qcMetric_MSMSScans_IonInjTime  default: 240
    ##  .. return default: 240
    ## meta id:  qcMetric_MSMSScans_MSMSIntensity
    ## getYAML with: order$qcMetric_MSMSScans_MSMSIntensity  default: 245
    ##  .. return default: 245
    ## meta id:  qcMetric_EVD_MS2OverSampling
    ## getYAML with: order$qcMetric_EVD_MS2OverSampling  default: 250
    ##  .. return default: 250
    ## meta id:  qcMetric_EVD_PreCal
    ## getYAML with: order$qcMetric_EVD_PreCal  default: 260
    ##  .. return default: 260
    ## meta id:  qcMetric_EVD_PostCal
    ## getYAML with: order$qcMetric_EVD_PostCal  default: 270
    ##  .. return default: 270
    ## meta id:  qcMetric_MSMS_MSMSDecal
    ## getYAML with: order$qcMetric_MSMS_MSMSDecal  default: 280
    ##  .. return default: 280
    ## meta id:  qcMetric_SM_MSMSIdRate
    ## getYAML with: order$qcMetric_SM_MSMSIdRate  default: 300
    ##  .. return default: 300
    ## meta id:  qcMetric_MSMSScans_TopN
    ## getYAML with: order$qcMetric_MSMSScans_TopN  default: 350
    ##  .. return val: 120
    ## meta id:  qcMetric_MSMSScans_TopNID
    ## getYAML with: order$qcMetric_MSMSScans_TopNID  default: 380
    ##  .. return default: 380
    ## meta id:  qcMetric_MSMSScans_DepPep
    ## getYAML with: order$qcMetric_MSMSScans_DepPep  default: 383
    ##  .. return default: 383
    ## meta id:  qcMetric_EVD_MissingValues
    ## getYAML with: order$qcMetric_EVD_MissingValues  default: 390
    ##  .. return default: 390
    ## meta id:  qcMetric_EVD_PeptideCount
    ## getYAML with: order$qcMetric_EVD_PeptideCount  default: 400
    ##  .. return default: 400
    ## meta id:  qcMetric_EVD_ProteinCount
    ## getYAML with: order$qcMetric_EVD_ProteinCount  default: 450
    ##  .. return default: 450
    ## meta id:  qcMetric_AverageQualOverall
    ## getYAML with: order$qcMetric_AverageQualOverall  default: 9999
    ##  .. return default: 9999
    ## Reading file E:\___tmp\RtmpSC7q6X/txt_20min/parameters.txt ...
    ## Read 61 entries from E:\___tmp\RtmpSC7q6X/txt_20min/parameters.txt.
    ## Updating colnames
    ## Simplifying contaminants
    ## Simplifying reverse
    ## Starting to work on PAR: MQ Parameters ...
    ##
    ## Memory [MB] prior|after|max(diff) : 41.1 | 42.1 | 60.2 (19)
    ##
    ## Duration: 0 s
    ##
    ## ... PAR: MQ Parameters  done
    ## Reading file E:\___tmp\RtmpSC7q6X/txt_20min/summary.txt ...
    ## Read 9 entries from E:\___tmp\RtmpSC7q6X/txt_20min/summary.txt.
    ## Updating colnames
    ## Simplifying contaminants
    ## Simplifying reverse
    ## Adding fc.raw.file column ... done
    ## Starting to work on SM: MS^2 ID rate (">%1.0f") ...
    ##
    ## Memory [MB] prior|after|max(diff) : 42.2 | 42.8 | 47.9 (6)
    ##
    ## Duration: 0 s
    ##
    ## ... SM: MS^2 ID rate (">%1.0f")  done
    ## Reading file E:\___tmp\RtmpSC7q6X/txt_20min/proteinGroups.txt ...
    ## Read 4134 entries from E:\___tmp\RtmpSC7q6X/txt_20min/proteinGroups.txt.
    ## Updating colnames
    ## Simplifying contaminants
    ## Simplifying reverse
    ## Starting to work on PG: Contaminants ...
    ##
    ## Memory [MB] prior|after|max(diff) : 49.9 | 50.3 | 55.4 (5)
    ##
    ## Duration: 0 s
    ##
    ## ... PG: Contaminants  done
    ## Starting to work on PG: raw intensity ...
    ##
    ## Memory [MB] prior|after|max(diff) : 50.3 | 52.2 | 66 (16)
    ##
    ## Duration: 0 s
    ##
    ## ... PG: raw intensity  done
    ## Starting to work on PG: LFQ intensity ...
    ##
    ## Memory [MB] prior|after|max(diff) : 52.2 | 52.8 | 66 (14)
    ##
    ## Duration: 0 s
    ##
    ## ... PG: LFQ intensity  done
    ## Starting to work on PG: Principal Component ...
    ##
    ## Memory [MB] prior|after|max(diff) : 52.8 | 53.8 | 87.5 (35)
    ##
    ## Duration: 0 s
    ##
    ## ... PG: Principal Component  done
    ## Reading file E:\___tmp\RtmpSC7q6X/txt_20min/evidence.txt ...
    ## Requiring column(s) 'retention.length' to be of type 'numeric'!
    ## Requiring column(s) 'retention.time.calibration' to be of type 'numeric'!
    ## Requiring column(s) 'retention.time', 'calibrated.retention.time' to be of type 'numeric'!
    ## Requiring column(s) 'match.time.difference' to be of type 'numeric'!
    ## Requiring column(s) 'intensity' to be of type 'numeric'!
    ## Requiring column(s) 'mass.error..ppm.', 'mass.error..da.', 'uncalibrated.mass.error..ppm.', 'uncalibrated.mass.error..da.' to be of type 'numeric'!
    ## Requiring column(s) 'uncalibrated...calibrated.m.z..ppm.', 'uncalibrated...calibrated.m.z..da.' to be of type 'numeric'!
    ## Requiring column(s) 'm.z' to be of type 'numeric'!
    ## Requiring column(s) 'score' to be of type 'numeric'!
    ## WARNING: Could not find column regex '^fraction$' using case-INsensitive matching.
    ## WARNING: Could not find column regex '[RK]\.Count' using case-INsensitive matching.
    ## Requiring column(s) 'charge' to be of type 'numeric'!
    ## Requiring column(s) 'mass' to be of type 'numeric'!
    ## Requiring column(s) 'ms.ms.count' to be of type 'numeric'!
    ## Keeping 17 of 62 columns!
    ## Read 90398 entries from E:\___tmp\RtmpSC7q6X/txt_20min/evidence.txt.
    ## Updating colnames
    ## Simplifying contaminants
    ## Simplifying reverse
    ## Adding fc.raw.file column ... done
    ## Starting to work on EVD:Contaminant (%s) ...
    ##
    ## Memory [MB] prior|after|max(diff) : 74.7 | 75.1 | 118.1 (43)
    ##
    ## Duration: 1 s
    ##
    ## ... EVD:Contaminant (%s)  done
    ## Starting to work on EVD: Pep Intensity (">%1.1f") ...
    ##
    ## Memory [MB] prior|after|max(diff) : 75.1 | 85 | 116.6 (42)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: Pep Intensity (">%1.1f")  done
    ## Starting to work on EVD: Prot Count (">%1.0f") ...
    ##
    ## Memory [MB] prior|after|max(diff) : 85.3 | 85.3 | 131.3 (46)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: Prot Count (">%1.0f")  done
    ## Starting to work on EVD: Pep Count (">%1.0f") ...
    ##
    ## Memory [MB] prior|after|max(diff) : 85.3 | 85.4 | 109.1 (24)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: Pep Count (">%1.0f")  done
    ## Starting to work on EVD: RT Peak Width ...
    ##
    ## Memory [MB] prior|after|max(diff) : 85.4 | 85.5 | 138.4 (53)
    ##
    ## Duration: 1 s
    ##
    ## ... EVD: RT Peak Width  done
    ## Starting to work on EVD: MBR Align ...
    ##
    ## Memory [MB] prior|after|max(diff) : 85.5 | 86.9 | 148 (62)
    ##
    ## Duration: 10 s
    ##
    ## ... EVD: MBR Align  done
    ## Starting to work on EVD: MBR ID-Transfer ...
    ##
    ## Memory [MB] prior|after|max(diff) : 86.8 | 87.2 | 265.5 (179)
    ##
    ## Duration: 82 s
    ##
    ## ... EVD: MBR ID-Transfer  done
    ## Starting to work on EVD: MBR auxilliary ...
    ##
    ## Memory [MB] prior|after|max(diff) : 87.2 | 92.5 | 233.2 (146)
    ##
    ## Duration: 2 s
    ##
    ## ... EVD: MBR auxilliary  done
    ## Starting to work on EVD: Charge ...
    ##
    ## Memory [MB] prior|after|max(diff) : 92.5 | 92.6 | 126 (34)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: Charge  done
    ## Starting to work on EVD: ID rate over RT ...
    ##
    ## Memory [MB] prior|after|max(diff) : 92.6 | 92.8 | 153.6 (61)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: ID rate over RT  done
    ## Starting to work on EVD: MS Cal-Pre (%1.1f) ...
    ##
    ## Memory [MB] prior|after|max(diff) : 92.8 | 96 | 172.8 (80)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: MS Cal-Pre (%1.1f)  done
    ## Starting to work on EVD: MS Cal-Post ...
    ##
    ## Memory [MB] prior|after|max(diff) : 96 | 99.1 | 172.4 (76)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: MS Cal-Post  done
    ## Starting to work on EVD: Contaminants ...
    ##
    ## Memory [MB] prior|after|max(diff) : 99.1 | 102.2 | 173.5 (74)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: Contaminants  done
    ## Starting to work on EVD: MS^2 Oversampling ...
    ##
    ## Memory [MB] prior|after|max(diff) : 102.2 | 102.2 | 150.8 (49)
    ##
    ## Duration: 0 s
    ##
    ## ... EVD: MS^2 Oversampling  done
    ## Starting to work on EVD: Pep Missing Values ...
    ##
    ## Memory [MB] prior|after|max(diff) : 102.2 | 109.5 | 265.8 (164)
    ##
    ## Duration: 2 s
    ##
    ## ... EVD: Pep Missing Values  done
    ## Reading file E:\___tmp\RtmpSC7q6X/txt_20min/msms.txt ...
    ## Requiring column(s) 'missed.cleavages' to be of type 'numeric'!
    ## Requiring column(s) 'evidence.id' to be of type 'numeric'!
    ## Keeping 2 of 60 columns!
    ## Read 86086 entries from E:\___tmp\RtmpSC7q6X/txt_20min/msms.txt.
    ## Updating colnames
    ## Simplifying contaminants
    ## Simplifying reverse
    ## Adding fc.raw.file column ... done
    ## Starting to work on MSMS: MS^2 Cal (%s) ...
    ##
    ## Memory [MB] prior|after|max(diff) : 206.1 | 209.7 | 236.4 (30)
    ##
    ## Duration: 1 s
    ##
    ## ... MSMS: MS^2 Cal (%s)  done
    ## Starting to work on MSMS: %s ...
    ##
    ## Memory [MB] prior|after|max(diff) : 209.7 | 209.8 | 244.2 (34)
    ##
    ## Duration: 0 s
    ##
    ## ... MSMS: %s  done
    ## Reading file E:\___tmp\RtmpSC7q6X/txt_20min/msmsScans.txt ...
    ## Requiring column(s) 'ion.injection.time' to be of type 'numeric'!
    ## Requiring column(s) 'retention.time' to be of type 'numeric'!
    ## WARNING: Could not find column regex '^dp.aa$' using case-INsensitive matching.
    ## WARNING: Could not find column regex '^dp.modification$' using case-INsensitive matching.
    ## Keeping 2 of 41 columns!
    ## Read 201567 entries from E:\___tmp\RtmpSC7q6X/txt_20min/msmsScans.txt.
    ## Updating colnames
    ## Simplifying contaminants
    ## Simplifying reverse
    ## Adding fc.raw.file column ... done
    ## Starting to work on MS^2*Scans: TopN over RT ...
    ##
    ## Memory [MB] prior|after|max(diff) : 125.5 | 126.9 | 236.6 (111)
    ##
    ## Duration: 1 s
    ##
    ## ... MS^2*Scans: TopN over RT  done
    ## Starting to work on MS^2*Scans: Ion Inj Time ...
    ##
    ## Memory [MB] prior|after|max(diff) : 126.8 | 127 | 154.4 (28)
    ##
    ## Duration: 0 s
    ##
    ## ... MS^2*Scans: Ion Inj Time  done
    ## Starting to work on MS^2*Scans: Intensity ...
    ##
    ## Memory [MB] prior|after|max(diff) : 127 | 134.2 | 217.5 (91)
    ##
    ## Duration: 0 s
    ##
    ## ... MS^2*Scans: Intensity  done
    ## Starting to work on MS^2*Scans: TopN high ...
    ##
    ## Memory [MB] prior|after|max(diff) : 134.2 | 134.2 | 148.6 (14)
    ##
    ## Duration: 0 s
    ##
    ## ... MS^2*Scans: TopN high  done
    ## Starting to work on MS^2*Scans: TopN ID over N ...
    ##
    ## Memory [MB] prior|after|max(diff) : 134.2 | 134.2 | 157.2 (23)
    ##
    ## Duration: 0 s
    ##
    ## ... MS^2*Scans: TopN ID over N  done
    ## [1] "#Metrics: "
    ## [1] 32
    ## Starting to work on Average Overall Quality ...
    ##
    ## Memory [MB] prior|after|max(diff) : 134.3 | 134.3 | 135.4 (1)
    ##
    ## Duration: 0 s
    ##
    ## ... Average Overall Quality  done
    ## Creating Report file ...

    ## processing file: PTXQC_report_template.Rmd

    ## Warning: Removed 1342 rows containing non-finite values (stat_boxplot).

    ## Warning: position_dodge requires non-overlapping x intervals

    ## Warning: Removed 85 rows containing non-finite values (stat_boxplot).

    ## Warning: position_dodge requires non-overlapping x intervals

    ## Warning: Removed 125 rows containing non-finite values (stat_boxplot).

    ## Warning: position_dodge requires non-overlapping x intervals

    ## Warning: Removed 5 rows containing missing values (geom_point).

    ## Warning: Removed 719 rows containing non-finite values (stat_boxplot).

    ## Warning: Removed 779 rows containing non-finite values (stat_boxplot).

    ## Warning: Removed 720 rows containing non-finite values (stat_bin).

    ## Warning: Removed 719 rows containing non-finite values (stat_bin).

    ## output file: PTXQC_report_template.knit.md

    ## "C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS PTXQC_report_template.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output "E:\___tmp\RtmpSC7q6X/txt_20min/report_v0.82.3_txt_20min.html" --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template "K:\R\win-library\3.1\rmarkdown\rmd\h\default.html" --number-sections --variable "theme:bootstrap" --include-in-header "E:\___tmp\RtmpSC7q6X\rmarkdown-str1e60242e3760.html" --no-highlight --variable "highlightjs=K:\R\win-library\3.1\rmarkdown\rmd\h\highlight"

    ##
    ## Output created: E:\___tmp\RtmpSC7q6X/txt_20min/report_v0.82.3_txt_20min.html

    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[2]]

    ##
    ## [[1]]

    ##
    ## list()
    ## [[1]]

    ##
    ## $..140323_1

    ##
    ## $..140521_1

    ##
    ## $..140521_2

    ##
    ## $..140522_1

    ##
    ## [[1]]

    ## Warning: Removed 1342 rows containing non-finite values (stat_boxplot).

    ## Warning: position_dodge requires non-overlapping x intervals

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ##
    ## [[1]]

    ## Warning: Removed 85 rows containing non-finite values (stat_boxplot).

    ## Warning: position_dodge requires non-overlapping x intervals

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ##
    ## [[1]]

    ## Warning: Removed 125 rows containing non-finite values (stat_boxplot).

    ## Warning: position_dodge requires non-overlapping x intervals

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
    ## font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ## Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x
    ## $y, : font metrics unknown for character 0xa

    ##
    ## list()
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## $`1`

    ##
    ## [[1]]

    ## Warning: Removed 5 rows containing missing values (geom_point).

    ##
    ## [[1]]

    ##
    ## $tree

    ##
    ## $gain

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ## Warning: Removed 719 rows containing non-finite values (stat_boxplot).

    ##
    ## [[1]]

    ## Warning: Removed 779 rows containing non-finite values (stat_boxplot).

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## [[1]]

    ##
    ## list()
    ## [[1]]

    ##
    ## $missingCul

    ##
    ## [[3]]

    ## Warning: Removed 720 rows containing non-finite values (stat_bin).

    ## Warning: Removed 719 rows containing non-finite values (stat_bin).

    ##
    ## $`1`

    ##
    ## attr(,"split_type")
    ## [1] "data.frame"
    ## attr(,"split_labels")
    ##   block
    ## 1     1
    ## $`1`

    ##
    ## attr(,"split_type")
    ## [1] "data.frame"
    ## attr(,"split_labels")
    ##   block
    ## 1     1
    ## list()
    ##  done
    ## Report file created at
    ##
    ##     E:\___tmp\RtmpSC7q6X/txt_20min/report_v0.82.3_txt_20min.*
    ##
    ##
    ##
    ## Time elapsed: 3.1 min

    cat(paste0("\nReport generated as '", r$report_file, "'\n\n"))

    ##
    ## Report generated as 'E:\___tmp\RtmpSC7q6X/txt_20min/report_v0.82.3_txt_20min'

## Generate a customized report

The report can be customized via a YAML configuration file. For details, see

    vignette("PTXQC-CustomizeReport", package = "PTXQC")

After editing the YAML configuration to your needs, run the code below.

    require(PTXQC)
    require(yaml)

    ## the next require() is needed to prevent a spurious error in certain R versions (might be a bug in R or a package)
    ## error message is:
    ##    Error in Scales$new : could not find function "loadMethod"
    require(methods)

    ## specify a path to a MaxQuant txt folder
    ## Note: This folder can be incomplete, depending on your YAML config
    if (1) {
      ## we will use an example dataset from PRIDE (dataset 2 of the PTXQC publication)
      local_zip = tempfile(fileext=".zip")
      download.file("ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2015/11/PXD003133/txt_20min.zip", destfile = local_zip)
      unzip(local_zip, exdir = tempdir()) ## extracts content
      txt_folder = paste0(tempdir(),"/txt_20min")
    } else {
      ## if you have local MaxQuant output, just use it
      txt_folder = "c:/Proteomics/MouseLiver/combined/txt"
    }

    ## use a YAML config inside the target directory if present
    fh_out = getReportFilenames(txt_folder)
    if (file.exists(fh_out$yaml_file))
    {
      cat("\nUsing YAML config already present in target directory ...\n")
      yaml_config = yaml.load_file(input = fh_out$yaml_file)
    } else {
      cat("\nYAML config not found in folder '", txt_folder, "'. The first run of PTXQC will create one for you.", sep="")
      yaml_config = list()
    }

    r = createReport(txt_folder, yaml_config)

    cat(paste0("\nReport generated as '", r$report_file, "'\n\n"))

That’s it.