Detect suitable pre-treatment parameters for Binalysis
or MetaboProfile
class objects.
Usage
detectPretreatmentParameters(
x,
cls = "class",
QCidx = "QC",
miss_injections = TRUE,
batch_correction = TRUE,
threshold = 25
)
# S4 method for Binalysis
detectPretreatmentParameters(
x,
cls = "class",
QCidx = "QC",
miss_injections = TRUE,
batch_correction = TRUE,
threshold = 25
)
# S4 method for MetaboProfile
detectPretreatmentParameters(
x,
cls = "class",
QCidx = "QC",
miss_injections = TRUE,
batch_correction = TRUE,
threshold = 25
)
Arguments
- x
S4 object of class
Binalysis
,MetaboProfile
orAnalysisData
- cls
the name of the sample information table column containing the sample class information
- QCidx
QC sample class label
- miss_injections
TRUE/FALSE. Detect the presence of possible miss injections and include parameters to remove these if necessary.
- batch_correction
TRUE/FALSE. Detect if a batch correction is necessary and include parameters to perform this if necessary.
- threshold
the percentage of the median TIC below which samples will be considered miss injections. This will be ignored if
miss_injections = FALSE
.
Examples
## Retreive example file paths and sample information
file_paths <- metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes')
sample_information <- metaboData::runinfo('FIE-HRMS','BdistachyonEcotypes')
## Detect spectral binning parameters
bp <- binneR::detectParameters(file_paths)
## Perform spectral binning
bd <- binneR::binneRlyse(file_paths,sample_information,bp)
#> binneR v2.6.3 Fri Jul 21 17:27:30 2023
#> ________________________________________________________________________________
#> Scans: 5:13
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [38.9S]
## Detect pre-treatment parameters
pp <- detectPretreatmentParameters(bd)
pp
#> Parameters:
#> pre-treatment
#> correction
#> center
#> block = block
#> type = median
#> QC
#> occupancyFilter
#> cls = class
#> QCidx = QC
#> occupancy = 2/3
#> impute
#> cls = class
#> QCidx = QC
#> occupancy = 2/3
#> parallel = variables
#> seed = 1234
#> RSDfilter
#> cls = class
#> QCidx = QC
#> RSDthresh = 50
#> removeQC
#> cls = class
#> QCidx = QC
#> occupancyFilter
#> maximum
#> cls = class
#> occupancy = 2/3
#> impute
#> class
#> cls = class
#> occupancy = 2/3
#> seed = 1234
#> transform
#> TICnorm
#>