This step is used to get the absolute quantification data of all lipids in all samples. If you have not finished the previous step, please click here:

Step 2: get relative quantification data.

If you have finished this step, click here to next step:

Step 4: output and organize results.


Get absolute quantification

You should have finished step 1 and step 2.

Then we should read the relative quantification data of internal standards and lipids.


Positive mode

##internal standard relative quantification data
is_quantification_table =
  readxl::read_xlsx("example/POS/is_relative_quantification/is_quantification_table.xlsx")

##lipid relative quantification data
lipid_quantification_table =
  readxl::read_xlsx("example/POS/lipid_relative_quantification/lipid_quantification_table.xlsx")
    

is_quantification_table is the relative quantification data for internal standards, and lipid_quantification_table is the relative quantification data for lipids.

We also need to get the sample information.

sample_info_pos =
  generate_sample_info(path = "example/POS")

Then the match_item should be set as:

match_item_pos =
  list(
    "Cer" = "d18:1 (d7)-15:0 Cer",
    "ChE" = c("18:1(d7) Chol Ester", "Cholesterol (d7)"),
    "Chol" = "Cholesterol (d7)",
    "DG" = "15:0-18:1(d7) DAG",
    "LPC" = "18:1(d7) Lyso PC",
    "LPE" = "18:1(d7) Lyso PE",
    "MG" = "18:1 (d7) MG",
    "PA" = "15:0-18:1(d7) PA (Na Salt)",
    "PC" = "15:0-18:1(d7) PC",
    "PE" = "15:0-18:1(d7) PE",
    "PG" = "15:0-18:1(d7) PG (Na Salt)",
    "PI" = "15:0-18:1(d7) PI (NH4 Salt)",
    "PPE" = "C18(Plasm)-18:1(d9) PE",
    "PS" = "15:0-18:1(d7) PS (Na Salt)",
    "SM" = "d18:1-18:1(d9) SM",
    "TG" = "15:0-18:1(d7)-15:0 TAG"
  )

It means that all the Cer class lipids will use internal standard d18:1 (d7)-15:0 Cer for absolute quantification.

Then run get_absolute_quantification() function to get the absolute quantification data of positive mode.

absolute_data_pos = get_absolute_quantification(
  path = "example/POS/",
  is_quantification_table = is_quantification_table,
  lipid_quantification_table = lipid_quantification_table,
  sample_info = sample_info_pos,
  match_item = match_item_pos
)
#> 1  10  20  30  40  50  60  70  80  90  100  110  120  130  140  150  152  
#> ✓ OK

Now all the absolute quantification results are outputted in example/POS/absolute_quantification folder.


Negative mode

Negative mode is same with positive mode:

is_quantification_table =
  readxl::read_xlsx("example/NEG/is_relative_quantification/is_quantification_table.xlsx")

lipid_quantification_table =
  readxl::read_xlsx("example/NEG/lipid_relative_quantification/lipid_quantification_table.xlsx")
    
sample_info_neg =
  generate_sample_info(path = "example/NEG")

Then the match_item should be set as:

match_item_neg =
  list(
    "Cer" = "d18:1 (d7)-15:0 Cer",
    "Chol" = "Cholesterol (d7)",
    "ChE" = c("18:1(d7) Chol Ester", "Cholesterol (d7)"),
    "LPC" = "18:1(d7) Lyso PC",
    "LPE" = "18:1(d7) Lyso PE",
    "PC" = "15:0-18:1(d7) PC",
    "PE" = "15:0-18:1(d7) PE",
    "PG" = "15:0-18:1(d7) PG (Na Salt)",
    "PI" = "15:0-18:1(d7) PI (NH4 Salt)",
    "PPE" = "C18(Plasm)-18:1(d9) PE",
    "PS" = "15:0-18:1(d7) PS (Na Salt)",
    "SM" = "d18:1-18:1(d9) SM"
  )

Then run get_absolute_quantification() function to get the absolute quantification data of negative mode.

absolute_data_neg = get_absolute_quantification(
  path = "example/NEG",
  is_quantification_table = is_quantification_table,
  lipid_quantification_table = lipid_quantification_table,
  sample_info = sample_info_neg,
  match_item = match_item_neg
)
#> 1  10  20  30  40  50  60  
#> ✓ OK

Now all the absolute quantification results are outputted in example/NEG/absolute_quantification folder.


Combine positive and negative mode together

Next, we need to combine positive and negative mode absolute quantification data together.

combine_pos_neg_quantification(
  path = "example/Result",
  express_data_abs_ug_ml_pos = absolute_data_pos$express_data_abs_ug_ml,
  express_data_abs_um_pos = absolute_data_pos$express_data_abs_um,
  variable_info_abs_pos = absolute_data_pos$variable_info_abs,
  express_data_abs_ug_ml_neg = absolute_data_neg$express_data_abs_ug_ml,
  express_data_abs_um_neg = absolute_data_neg$express_data_abs_um,
  variable_info_abs_neg = absolute_data_neg$variable_info_abs
)

All the results are outputted into the example/Result folder.


Next step

Next we need to output and organize some results (plots). Please click here:

Step 4: output and organize results