Skip to content

Commit

Permalink
Merge pull request #71 from margotbligh/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
margotbligh authored Mar 19, 2024
2 parents fd6f76c + e7425e9 commit c51059b
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 29 deletions.
25 changes: 14 additions & 11 deletions R/glycoAnnotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#' @include glycoPredict.R
#'
#' @description \code{glycoAnnotate()} annotates peaks or features in MS data,
#' using either a pre-generated table by \link[GlycoAnnotateR]{glycoPredict} or
#' by generating a new table.
#' using EITHER a pre-generated table (`pred_table`) by
#' \link[GlycoAnnotateR]{glycoPredict} OR
#' by generating a new table by suppling a `glycoPredictParam`object
#' to `param`.
#'
#' @export
#'
Expand All @@ -14,17 +16,18 @@
#' or features from Cardinal (MALDI).
#' @slot mz_column Name of column containing m/z values.
#' @slot mzmin_column OPTIONAL: Name of column containing minimum m/z data values.
#' If supplied, will do overlap-overlap matching. Generally only if mzmin and mzmax
#' If supplied, will do overlap of two ranges matching. Generally only if mzmin and mzmax
#' values generated during peak picking. If not provided, mz value will be annotated
#' if within range of theoretical mz +- error.
#' if within range of theoretical mz +/- error (value within range).
#' @slot mzmax_column OPTIONAL: Name of column containing maximum m/z data values.
#' If supplied, will do overlap-overlap matching. Generally only if mzmin and mzmax
#' If supplied, will do overlap of two ranges matching. Generally only if mzmin and mzmax
#' values generated during peak picking.If not provided, mz value will be annotated
#' if within range of theoretical mz +- error.
#' if within range of theoretical mz +/- error (value within range).
#' @slot pred_table Table generated previously by \link[GlycoAnnotateR]{glycoPredict}.
#' MUST BE LONG FORMAT - select \code{format='long'} when running prediction.
#' Must provide value for this OR `param`.
#' @slot param \link[GlycoAnnotateR]{glycoPredictParam} object for generation of table
#' of theoretical mz values for annotation.
#' of theoretical mz values for annotation. Must provide value for this OR `pred_table`.
#' @slot collapse Logical. If \code{TRUE}, annotations will be 'collapsed' so that multiple
#' annotations for one mz will be in the same row, comma separated (nrow of output is in
#' this case equal to nrow of input data). If \code{FALSE} (default), it is possible
Expand All @@ -36,7 +39,7 @@
#' molecule name and ion. If prediction table provided to \code{pred_table} instead of
#' \code{param}, column names are required.
#' @slot error Numeric value - error used to create window for matching. mz values
#' will be matched against theoretical mzs +- error.
#' will be matched against theoretical mzs +/- error.
#' @slot error_units Units for error - can be 'ppm' or 'Da'
#'
#' @examples
Expand Down Expand Up @@ -277,9 +280,9 @@ glycoAnnotate <- function(data,
#' #collapse multiple annotations
#' annotated_data_collapsed <- glycoAnnotationsCollapse(annotated_data = annotated_data, collapse_columns = c('IUPAC name', 'ion'), noncollapse_columns = c('mz', 'rt', 'sampleA', 'sampleB'))
#'
#' @seealso glycoAnnotateR::glycoPredict()
#' @seealso glycoAnnotateR::glycoPredictParam()
#' @seealso glycoAnnotateR::glycoAnnotate()
#' @seealso \link[GlycoAnnotateR]{glycoPredictParam}
#' @seealso \link[GlycoAnnotateR]{glycoPredict}
#' @seealso \link[GlycoAnnotateR]{glycoAnnotate}


glycoAnnotationsCollapse <- function(annotated_data,
Expand Down
2 changes: 1 addition & 1 deletion R/glycoMS2Annotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' column with precursor annotations (matching those in `precursorAnnotations`)
#' @slot ion_type Ionisation type. Currently accepted ESI and MALDI. Impacts ions.
#' @slot error Numeric value - error used to create window for matching. mz values
#' will be matched against theoretical mzs +- error.
#' will be matched against theoretical mzs +/- error.
#' @slot error_units Units for error - can be 'ppm' or 'Da'
#' @slot nmod_max Maximum number of modifications per monomer, calculated by the number of modifications over the number of monomers (default 1).
#' Does not take into account unsaturated, alditol or dehydrated.
Expand Down
1 change: 0 additions & 1 deletion R/glycoPredict.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#' gpp@@polarity <- 'neg'
#' gpp@@scan_range <- c(150, 1300)
#' gpp@@modifications <- c('sulfate', 'carboxylicacid')
#' gpp@@double_sulfate <- TRUE
#' predicted.df <- glycoPredict(param = gpp)
#'
#' @details
Expand Down
6 changes: 5 additions & 1 deletion R/setClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
#' "2-aminobenzamide", "1-phenyl-3-methyl-5-pyrazolone".
#' @slot ion_type Ionisation type. Currently accepted ESI and MALDI. Impacts ions.
#' @slot naming Notation for molecule names. Uses commonly accepted abbreviations. Possibilities: 'IUPAC' (default), 'Oxford', 'GlycoCT'
#' @slot adducts Adduct types to be included. Options are 'H', 'Na', 'K', 'NH4', 'Cl'
#' and 'CHOO'. See [here](https://margotbligh.github.io/GlycoAnnotateR/#output-and-other-parameters)
#' for detailed description of which adducts are generated,
#' @slot glycan_linkage Option to implement filters for O- and N-glycans. Possibilities: 'none' (default), 'nglycan' or 'oglycan'.
#' @slot modification_limits Option to implement user created filters. Must be a named list, with names as modifications and values as limits.
#'
#' @slot format Output format. Options are 'long' (default) or wide.
#'
#' @inherit glycoPredict details
#' @inherit glycoPredict examples

Expand Down
21 changes: 12 additions & 9 deletions man/glycoAnnotate.Rd

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

6 changes: 3 additions & 3 deletions man/glycoAnnotationsCollapse.Rd

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

2 changes: 1 addition & 1 deletion man/glycoMS2Annotate.Rd

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

1 change: 0 additions & 1 deletion man/glycoPredict.Rd

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

7 changes: 6 additions & 1 deletion man/glycoPredictParam-class.Rd

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

0 comments on commit c51059b

Please sign in to comment.