This function imports grouped features from a table, which can be either a data frame or a path to a file with tabular data (e.g. .csv).

importFeatureGroupsTable(
  input,
  analysisInfo,
  addCols = NULL,
  groupAlgo,
  groupArgs = NULL
)

Arguments

input

The input to be imported: either a data.frame, data.table or file path to a file that can be imported with fread.

analysisInfo

A data.frame (or data.table) with Analysis information.

addCols

Passed to importFeaturesTable.

groupAlgo, groupArgs

(sets workflow) The grouping algorithm and a list with parameters that is used to re-group features when adduct assignments are changed, e.g. by selectIons. Hence, these are often unused and dummy values can be set here, such as groupAlgo="openms", groupArgs = list().

Value

An object derived from the class featureGroupsSet (if the imported data is from a sets workflow) or featureGroups object otherwise.

Details

This function imports data from a table. This function is called when calling importFeatureGroups with type="table".

This function can be used to import feature group data from a table generated by the as.data.table (and as.data.frame) function, or the output from any other feature detection and grouping software. The column format mostly follows the format used by the as.data.table function with the features argument set to TRUE.

The function first imports the feature data from the table using importFeaturesTable. Please see its documentation for an overview of the columns that are expected in the input table.

In addition to the columns for feature data, the following columns are expected in the input table:

  • group: a string naming the feature group in which the feature is part of. Values in this column should be unique per analysis. (mandatory)

  • group_ret,group_mz: the retention time (in seconds) and m/z assigned to the feature group. Will be calculated from mean values of feature data if missing. (optional)

For data from an IMS workflow, the following additional columns are relevant:

  • group_mobility,group_CCS: the mobility and CCS assigned to the feature group. Will be calculated from mean values of feature data if missing. (optional)

  • ims_precursor_group: a string naming the IMS precursor feature group of the feature group (NA if none or not a IMS feature). (optional)

For data from a sets workflow, the following additional columns are relevant:

  • group_ion_mz-<set>,group_neutralMass,group_adduct-<set>: the ion m/z, neutral mass and adduct assigned to the feature group. Columns should be present for each set (e.g. ion_mz-positive). Missing columns will be calculated from feature data. NOTE If feature columns are missing, then the group columns will be used to create them.

Note

This function does not yet allow importing more advanced feature group properties, such as normalized intensities and predicted concentrations.

See also

importFeatureGroups for more details and other algorithms.

importFeaturesTable for importing features from a table. as.data.table for converting feature groups data to a data.table format. groupFeatures to generate feature groups.