QI_to_MA: Convert QI to MetaboAnalyst

Description Usage Arguments Examples

Description

Function for converting QI output .csv files into format convenient for further analysis with MetaboAnalyst. For proper work, please, make complete QI output files with all the options marked.
This function:

  1. Cuts out all the extra data, leaving only columns with abundance values (either raw or normalised) and a column with compound's IDs.

  2. Moves chosen compound ID column to the first position.

  3. Expands sample group labels.

  4. Separate group labels into grouping factors and creates rows with factors.

  5. (for MQI_to_MA) Merges neg and pos files with matching names.

  6. Writes the resulting table into new .csv file.

MQI_to_MA converts lipid and metabolite QI data output

PQI_to_MA converts protein QI data output

Usage

1
2
3
4
5
MQI_to_MA(file = getwd(), abundance = "Raw",
  compoundID = "Accepted Compound ID", autoFac = FALSE, facNames = NULL)

PQI_to_MA(path = getwd(), abundance = "Raw", facNames = NULL,
  compoundID = "shortDescription")

Arguments

abundance

If "Normalised", then normalised data are used; if "Raw", then raw data are used

compoundID

The name of the column in QI output table used as the set of compound IDs.
For MQI_to_MA one of: "Compound", "Accepted Compound ID", "Formula".
For PQI_to_MA one of: "Accession", "Description", "shortDescription".
"shortDescription" means that the data from "Description" column are used, but they are cut starting with "OS=".

autoFac

If "TRUE" then group names are automatically converted to grouping factors' values.

facNames

Character vector of grouping factor names.

path

Character vector. There could be two types of elements:
1) file path(s) to the proceeded .csv QI output file(s).
2) path(s) to the directory(ies) containing .csv files.
In the second case all the files in all subdirectories are proceeded.
Remember that in file paths you should use either "/" or double "\", not just "\".

Examples

1
2
3
4
# PQI_to_MA("//mpimp-golm/user/Homes/Zubkov/QI_data")
# PQI_to_MA("\\\\mpimp-golm\\user\\Homes\\Zubkov\\QI_data")
# PQI_to_MA("C:/QI_data", abundance = "Raw", compoundID = "Accession")
# MQI_to_MA("C:/QI_data", facNames = c("Phenotype", "Treatment", "Time"))

flajole/MSdata documentation built on May 16, 2019, 1:17 p.m.