adjust_batch_trend {proBatch} | R Documentation

## adjust batch signal trend with the custom (continuous) fit

### Description

adjust batch signal trend with the custom (continuous) fit

### Usage

    adjust_batch_trend(data_matrix, sample_annotation,
      batch_col = "MS_batch", feature_id_col = "peptide_group_label",
      sample_id_col = "FullRunName", measure_col = "Intensity",
      sample_order_col = "order", fit_func = fit_nonlinear,
      abs_threshold = 5, pct_threshold = 0.2, ...)

### Arguments

`data_matrix` | features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. Usually the log transformed version of the original data
`sample_annotation` | data frame with sample ID, technical (e.g. MS batches) and biological (e.g. Diet) covariates
`batch_col` | column in `sample_annotation` that should be used for batch comparison
`feature_id_col` | name of the column with feature/gene/peptide/protein ID used in the long format representation df_long. In the wide formatted representation data_matrix this corresponds to the row names.
`sample_id_col` | name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)
`measure_col` | if `df_long` is among the parameters, it is the column with expression/abundance/intensity, otherwise, it is used internally for consistency
`sample_order_col` | column, determining the order of sample MS run, used as covariate to fit the non-linear fit
`fit_func` | function to fit the (non)-linear trend
`abs_threshold` | the absolute threshold to filter data for curve fitting
`pct_threshold` | the percentage threshold to filter data for curve fitting
`...` | other parameters, usually those of the `fit_func`

### Value

list of two items: 1) `data_matrix`, adjusted with continious fit; 2) fit_df, used to examine the fitting curves

### See Also

`fit_nonlinear`

### Examples

    trend_corrected_matrix <- adjust_batch_trend(example_proteome_matrix,
    example_sample_annotation, span = 0.7,
    abs_threshold = 5, pct_threshold = 0.20)

[Package proBatch version 1.0.0 Index]