Browse code

[Doc] Completed documentation of visualise_chromatogram.R

shubham1637 authored on 17/12/2019 18:01:51
Showing 6 changed files

... ...
@@ -12,6 +12,10 @@ if(getRversion() >= "2.15.1")  utils::globalVariables(c("time", "Transition"))
12 12
 #' License: (c) Author (2019) + MIT
13 13
 #' Date: 2019-12-13
14 14
 #'
15
+#' @param XIC_group (list) It is a list of dataframe which has two columns. First column is for time
16
+#'  and second column indicates intensity.
17
+#' @param peakAnnot (numeric) Peak-apex time.
18
+#' @param Title (logical) TRUE: name of the list will be displayed as title.
15 19
 #' @examples
16 20
 #' dataPath <- system.file("extdata", package = "DIAlignR")
17 21
 #' runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt",
... ...
@@ -47,6 +51,20 @@ plotXICgroup <- function(XIC_group, peakAnnot = NULL, Title =NULL){
47 51
 #' License: (c) Author (2019) + MIT
48 52
 #' Date: 2019-12-13
49 53
 #'
54
+#' @param analyte (string) An analyte is as PRECURSOR.GROUP_LABEL or as PEPTIDE.MODIFIED_SEQUENCE and PRECURSOR.CHARGE from osw file.
55
+#' @param run (string) Name of a mzml file without extension.
56
+#' @param dataPath (char) Path to mzml and osw directory.
57
+#' @param maxFdrQuery (numeric) A numeric value between 0 and 1. It is used to filter features from osw file which have SCORE_MS2.QVALUE less than itself.
58
+#' @param XICfilter (string) This must be one of the strings "sgolay", "none".
59
+#' @param SgolayFiltOrd (integer) It defines the polynomial order of filer.
60
+#' @param SgolayFiltLen (integer) Must be an odd number. It defines the length of filter.
61
+#' @param runType (char) This must be one of the strings "DIA_proteomics", "DIA_Metabolomics".
62
+#' @param oswMerged (logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.
63
+#' @param nameCutPattern (string) regex expression to fetch mzML file name from RUN.FILENAME columns of osw files.
64
+#' @param analyteInGroupLabel (logical) TRUE for getting analytes as PRECURSOR.GROUP_LABEL from osw file.
65
+#' @param peakAnnot (numeric) Peak-apex time.
66
+#' @param Title (logical) TRUE: name of the list will be displayed as title.
67
+#'
50 68
 #' @examples
51 69
 #' dataPath <- system.file("extdata", package = "DIAlignR")
52 70
 #' run <- "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"
... ...
@@ -68,6 +86,8 @@ plotAnalyteXICs <- function(analyte, run, dataPath = ".", maxFdrQuery = 1.0,
68 86
 }
69 87
 
70 88
 #' Plot an aligned XIC-group.
89
+#'
90
+#' @details
71 91
 #' x-axis cannot have the same time-values, therefore, x-axis is indecized.
72 92
 #'
73 93
 #' @importFrom zoo na.locf
... ...
@@ -77,6 +97,10 @@ plotAnalyteXICs <- function(analyte, run, dataPath = ".", maxFdrQuery = 1.0,
77 97
 #'
78 98
 #' License: (c) Author (2019) + MIT
79 99
 #' Date: 2019-12-13
100
+#' @param XIC_group (list) It is a list of dataframe which has two columns. First column is for time
101
+#'  and second column indicates intensity.
102
+#' @param idx (integer) Indices of aligned chromatograms.
103
+#' @param peakAnnot (numeric) Peak-apex time.
80 104
 plotSingleAlignedChrom <- function(XIC_group, idx, peakAnnot = NULL){
81 105
   intensity <- list()
82 106
   # Update intensities with aligned time indices.
... ...
@@ -99,6 +123,8 @@ plotSingleAlignedChrom <- function(XIC_group, idx, peakAnnot = NULL){
99 123
   return(g)}
100 124
 
101 125
 #' Plot aligned XICs group for a specific peptide.
126
+#'
127
+#' @description
102 128
 #' AlignObjOutput is the output from getAlignObjs fucntion.
103 129
 #'
104 130
 #' @importFrom ggplot2 geom_vline xlab scale_y_continuous
... ...
@@ -110,6 +136,14 @@ plotSingleAlignedChrom <- function(XIC_group, idx, peakAnnot = NULL){
110 136
 #' License: (c) Author (2019) + MIT
111 137
 #' Date: 2019-12-13
112 138
 #'
139
+#' @param AlignObj (S4 object)
140
+#' @param XICs.ref (list) List of extracted ion chromatograms (dataframe) from reference run. The dataframe has two columns: first column is for time
141
+#'  and second column indicates intensity.
142
+#' @param XICs.eXp (list) List of extracted ion chromatograms (dataframe) from experiment run.The dataframe has two columns: first column is for time
143
+#'  and second column indicates intensity.
144
+#' @param refPeakLabel (numeric vector) It contains peak apex, left width and right width.
145
+#' @param annotatePeak (logical) TRUE: Peak boundaries and apex will be highlighted.
146
+#'
113 147
 #' @examples
114 148
 #' dataPath <- system.file("extdata", package = "DIAlignR")
115 149
 #' runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt",
... ...
@@ -174,6 +208,12 @@ getAlignedFigs <- function(AlignObj, XICs.ref, XICs.eXp, refPeakLabel,
174 208
 #' License: (c) Author (2019) + MIT
175 209
 #' Date: 2019-12-13
176 210
 #'
211
+#' @param AlignObjOutput (list) The list contains AlignObj, raw XICs for reference and experiment, and reference-peak label.
212
+#' @param plotType This must be one of the strings "All", "onlyUnaligned" and "onlyAligned".
213
+#' @param DrawAlignR (logical) TRUE: ggplot objects will be returned.
214
+#' @param annotatePeak (logical) TRUE: Peak boundaries and apex will be highlighted.
215
+#' @param saveFigs (logical) TRUE: Figures will be saved in AlignedAnalytes.pdf .
216
+#'
177 217
 #' @examples
178 218
 #' dataPath <- system.file("extdata", package = "DIAlignR")
179 219
 #' runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt",
... ...
@@ -230,6 +270,8 @@ plotAlignedAnalytes <- function(AlignObjOutput, plotType = "All", DrawAlignR = F
230 270
 #'
231 271
 #' License: (c) Author (2019) + MIT
232 272
 #' Date: 2019-12-13
273
+#' @param AlignObjOutput (list) The list contains AlignObj, raw XICs for reference and experiment, and reference-peak label.
274
+#'
233 275
 #' @examples
234 276
 #' library(lattice)
235 277
 #' dataPath <- system.file("extdata", package = "DIAlignR")
... ...
@@ -8,6 +8,17 @@ AlignObjOutput is the output from getAlignObjs fucntion.}
8 8
 plotAlignedAnalytes(AlignObjOutput, plotType = "All",
9 9
   DrawAlignR = FALSE, annotatePeak = FALSE, saveFigs = FALSE)
10 10
 }
11
+\arguments{
12
+\item{AlignObjOutput}{(list) The list contains AlignObj, raw XICs for reference and experiment, and reference-peak label.}
13
+
14
+\item{plotType}{This must be one of the strings "All", "onlyUnaligned" and "onlyAligned".}
15
+
16
+\item{DrawAlignR}{(logical) TRUE: ggplot objects will be returned.}
17
+
18
+\item{annotatePeak}{(logical) TRUE: Peak boundaries and apex will be highlighted.}
19
+
20
+\item{saveFigs}{(logical) TRUE: Figures will be saved in AlignedAnalytes.pdf .}
21
+}
11 22
 \description{
12 23
 Plot aligned XICs group for a specific peptide.
13 24
 AlignObjOutput is the output from getAlignObjs fucntion.
... ...
@@ -6,6 +6,9 @@
6 6
 \usage{
7 7
 plotAlignmentPath(AlignObjOutput)
8 8
 }
9
+\arguments{
10
+\item{AlignObjOutput}{(list) The list contains AlignObj, raw XICs for reference and experiment, and reference-peak label.}
11
+}
9 12
 \description{
10 13
 Plot aligned path through the similarity matrix. Reference run has indices on X-axis, eXp run has them on Y-axis.
11 14
 In getAlignObjs function, objType must be set to medium.
... ...
@@ -10,6 +10,33 @@ plotAnalyteXICs(analyte, run, dataPath = ".", maxFdrQuery = 1,
10 10
   nameCutPattern = "(.*)(/)(.*)", analyteInGroupLabel = FALSE,
11 11
   peakAnnot = NULL, Title = NULL)
12 12
 }
13
+\arguments{
14
+\item{analyte}{(string) An analyte is as PRECURSOR.GROUP_LABEL or as PEPTIDE.MODIFIED_SEQUENCE and PRECURSOR.CHARGE from osw file.}
15
+
16
+\item{run}{(string) Name of a mzml file without extension.}
17
+
18
+\item{dataPath}{(char) Path to mzml and osw directory.}
19
+
20
+\item{maxFdrQuery}{(numeric) A numeric value between 0 and 1. It is used to filter features from osw file which have SCORE_MS2.QVALUE less than itself.}
21
+
22
+\item{XICfilter}{(string) This must be one of the strings "sgolay", "none".}
23
+
24
+\item{SgolayFiltOrd}{(integer) It defines the polynomial order of filer.}
25
+
26
+\item{SgolayFiltLen}{(integer) Must be an odd number. It defines the length of filter.}
27
+
28
+\item{runType}{(char) This must be one of the strings "DIA_proteomics", "DIA_Metabolomics".}
29
+
30
+\item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.}
31
+
32
+\item{nameCutPattern}{(string) regex expression to fetch mzML file name from RUN.FILENAME columns of osw files.}
33
+
34
+\item{analyteInGroupLabel}{(logical) TRUE for getting analytes as PRECURSOR.GROUP_LABEL from osw file.}
35
+
36
+\item{peakAnnot}{(numeric) Peak-apex time.}
37
+
38
+\item{Title}{(logical) TRUE: name of the list will be displayed as title.}
39
+}
13 40
 \description{
14 41
 Plot extracted-ion chromatogram.
15 42
 }
... ...
@@ -2,13 +2,22 @@
2 2
 % Please edit documentation in R/visualise_chromatograms.R
3 3
 \name{plotSingleAlignedChrom}
4 4
 \alias{plotSingleAlignedChrom}
5
-\title{Plot an aligned XIC-group.
6
-x-axis cannot have the same time-values, therefore, x-axis is indecized.}
5
+\title{Plot an aligned XIC-group.}
7 6
 \usage{
8 7
 plotSingleAlignedChrom(XIC_group, idx, peakAnnot = NULL)
9 8
 }
9
+\arguments{
10
+\item{XIC_group}{(list) It is a list of dataframe which has two columns. First column is for time
11
+and second column indicates intensity.}
12
+
13
+\item{idx}{(integer) Indices of aligned chromatograms.}
14
+
15
+\item{peakAnnot}{(numeric) Peak-apex time.}
16
+}
10 17
 \description{
11 18
 Plot an aligned XIC-group.
19
+}
20
+\details{
12 21
 x-axis cannot have the same time-values, therefore, x-axis is indecized.
13 22
 }
14 23
 \author{
... ...
@@ -6,6 +6,14 @@
6 6
 \usage{
7 7
 plotXICgroup(XIC_group, peakAnnot = NULL, Title = NULL)
8 8
 }
9
+\arguments{
10
+\item{XIC_group}{(list) It is a list of dataframe which has two columns. First column is for time
11
+and second column indicates intensity.}
12
+
13
+\item{peakAnnot}{(numeric) Peak-apex time.}
14
+
15
+\item{Title}{(logical) TRUE: name of the list will be displayed as title.}
16
+}
9 17
 \description{
10 18
 Plot Extracted-ion chromatogram group.
11 19
 }