Normalize Arrays — matrix_normalise • protGear

# Normalize Arrays

Source: `R/normalisation_functions.R`
`matrix_normalise.Rd`

Normalize Arrays

    matrix_normalise(
      matrix_antigen,
      method = "log2",
      batch_correct = FALSE,
      batch_var1,
      batch_var2 = day_batches,
      return_plot = FALSE,
      plot_by_antigen = TRUE,
      control_antigens = NULL,
      array_matrix = NULL
    )

## Arguments

matrix_antigen

  An object of class matrix with features/proteins as columns and samples as the rows

method

  character string specifying the normalization method. Choices are `"none","log2","vsn","cyclic_loess"` `"cyclic_loess_log" ,"rlm"`

batch_correct

  A logical value indicating whether batch correction should be done or not

batch_var1

  A character or factor vector of size similar to rows of `matrix_antigen` indicating the first batch.

batch_var2

  A character or factor vector of size similar to rows of `matrix_antigen` indicating the second batch.

return_plot

  A logical value indicating whether a plot is returned to show the results of normalisation.

plot_by_antigen

  Logical to indicate whether to plot by antigen or not slide name for the matrix_antigen object.

control_antigens

  logical vector specifying the subset of spots which are non-differentially-expressed control spots, for use with `method="rlm"`

array_matrix

  An object of class dataframe or matrix used with `method='rlm'` indicating the sample index and

## Value

A data frame of normalised values

## Examples

    matrix_antigen <- readr::read_csv(system.file("extdata",
    "matrix_antigen.csv", package="protGear"))
    #> Rows: 105 Columns: 117
    #> ── Column specification ────────────────────────────────────────────────────────
    #> Delimiter: ","
    #> dbl (117): AARP, AMA1, ASP, Buffer, CD4TAG, CLAG3.2, CommercialHumanIgG, EBA...
    #>
    #> ℹ Use `spec()` to retrieve the full column specification for this data.
    #> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
    #VSN
    normlise_vsn <- matrix_normalise(as.matrix(matrix_antigen),
    method = "vsn",
    return_plot = TRUE
    )
    ## log
    normlise_log <- matrix_normalise(as.matrix(matrix_antigen),
    method = "log2",
    return_plot = TRUE
    )
    ## cyclic_loess_log
    normlise_cylic_log <- matrix_normalise(as.matrix(matrix_antigen),
    method = "cyclic_loess_log",
    return_plot = TRUE
    )