Skip to contents

This function imports tabular data files (*.csv) exported from Skyline, containing peak integration results.

Usage

import_data_skyline(
  data = NULL,
  path,
  transition_id_columns = c("name", "mz", "none"),
  import_metadata = TRUE,
  silent = FALSE
)

Arguments

data

A MidarExperiment object.

path

One or more file paths, or a directory path from which all matching files will be imported.

transition_id_columns

A character vector specifying the columns that define the transition (precursor and product) to use for unique feature_id generation. Options are "name", "mz", or "none". If "none", feature_id is derived from Molecule Name and Precursor Name or Product Name. If "mz", feature_id is based on Precursor Mz and Product Mz. Using "none" will result in feature_id being a copy of Molecule Name, with an error raised if it is not unique for each transition.

import_metadata

Logical; whether to import additional metadata columns (e.g., precursor/product m/z values).

silent

Logical; whether to suppress most notifications.

Value

A MidarExperiment object containing the imported data.

Details

In Skyline, transitions are defined by the Molecule Name and corresponding precursor and product m/z values, rather than any identifier. When importing this data, the feature_id is generated using the Molecule Name with either precursor/product names or m/z values, unless Molecule Name uniquely identifies the features (refer to the transition_id_columns argument below).

The following supported columns from Skyline can be imported:

Skyline Column NameMiDAR Column NameRequired
Replicate Nameanalysis_idYes
Molecule List Namefeature_classNo
Molecule Namefeature_idYes
Precursor Namefeature_idYes*
Product Namefeature_idYes*
Precursor Mzmethod_precursor_mzYes*
Product Mzmethod_product_mzYes*
Areafeature_areaYes
Retention Timefeature_rtNo

*Requirements for these columns are described in transition_id_columns.

To export results from Skyline, use the 'Molecule Transition Results' format and include Replicate Name, Molecule Name, and either Precursor Mz/Product Mz or Precursor Name/Product Name columns. At least one feature variable, such as Area or RT, must also be exported.

Examples

mexp <- MidarExperiment()
file_path <- system.file("extdata", "Skyline_MoleculeTransitionResults.csv", package = "midar")
mexp <- import_data_skyline(
  data = mexp,
  path = file_path,
  transition_id_columns = "mz",
  import_metadata = TRUE
)
#>  Imported 6 analyses with 21 features
#>  `feature_area` selected as default feature intensity. Modify with `set_intensity_var()`.
#>  Analysis metadata associated with 6 analyses.
#>  Feature metadata associated with 21 features.
#>  Analysis order was based on `analysis_order` column of imported data. Use `set_analysis_order` to change the order.
print(mexp)
#> 
#> ── MidarExperiment ─────────────────────────────────────────────────────────────
#> Title:
#> 
#> Processing status: Annotated raw AREA values
#> 
#> ── Annotated Raw Data ──
#> 
#> • Analyses: 6
#> • Features: 21
#> • Raw signal used for processing: `feature_area`
#> 
#> ── Metadata ──
#> 
#> • Analyses/samples: 
#> • Features/analytes: 
#> • Internal standards: 
#> • Response curves: 
#> • Calibrants/QC concentrations: 
#> • Study samples: 
#> 
#> ── Processing Status ──
#> 
#> • Isotope corrected: 
#> • ISTD normalized: 
#> • ISTD quantitated: 
#> • Drift corrected variables: 
#> • Batch corrected variables: 
#> • Feature filtering applied: 
#> 
#> ── Exclusion of Analyses and Features ──
#> 
#> • Analyses manually excluded (`analysis_id`): 
#> • Features manually excluded (`feature_id`):