@@ -1293,7 +1293,7 @@ laboratories and over time, the same samples may result in variation in
1293
1293
retention time, especially because the LC system can be quite unstable. In these
1294
1294
cases, an alignment step using the ` adjustRtime() ` function with the
1295
1295
` LamaParam ` parameter can allow the user to perform this type of alignment.
1296
- We will go through this step by step below.
1296
+ We will go through this step by step below.
1297
1297
1298
1298
Let's load an already analyzed dataset ` ref ` and our previous dataset before
1299
1299
alignment, which will be ` tst ` . We will first restrict their retention time
@@ -1307,18 +1307,18 @@ tst <- loadXcmsData("faahko_sub2")
1307
1307
Now, we will attempt to align these two samples with the previous dataset. The
1308
1308
first step is to extract landmark features (referred to as ` lamas ` ). To achieve
1309
1309
this, we will identify the features present in every QC sample of the ` ref `
1310
- dataset. To do so, we will categorize (using ` factor() ` ) our data by
1310
+ dataset. To do so, we will categorize (using ` factor() ` ) our data by
1311
1311
` sample_type ` and only retain the QC samples. This variable will be utilized to
1312
- filter the features using the ` PercentMissingFilter() ` parameter within the
1313
- ` filterFeatures() ` function (see section above for more information on this
1312
+ filter the features using the ` PercentMissingFilter() ` parameter within the
1313
+ ` filterFeatures() ` function (see section above for more information on this
1314
1314
method)
1315
1315
1316
1316
``` {r}
1317
1317
f <- sampleData(ref)$sample_type
1318
1318
f[f != "QC"] <- NA
1319
1319
ref <- filterFeatures(ref, PercentMissingFilter(threshold = 0, f = f))
1320
1320
ref_mz_rt <- featureDefinitions(ref)[, c("mzmed","rtmed")]
1321
- ref_mz_rt
1321
+ head( ref_mz_rt)
1322
1322
```
1323
1323
1324
1324
This is what the ` lamas ` input should look like for alignment. In terms of
@@ -1404,16 +1404,16 @@ chromatographic peaks along with the fitted model line.
1404
1404
``` {r}
1405
1405
#access summary of matches and model information
1406
1406
summary <- summarizeLamaMatch(param)
1407
- summary
1407
+ summary
1408
1408
1409
1409
# coverage for each file
1410
1410
summary$Matched_peaks / summary$Total_peaks * 100
1411
1411
1412
- #access the information on the model of for the first file
1412
+ #access the information on the model of for the first file
1413
1413
summary$model_summary[[1]]
1414
1414
1415
- # Plot obs vs. ref with fitting line
1416
- plot(param, index = 1L, main = "ChromPeaks versus Lamas for the first file",
1415
+ # Plot obs vs. ref with fitting line
1416
+ plot(param, index = 1L, main = "ChromPeaks versus Lamas for the first file",
1417
1417
colPoint = "red")
1418
1418
```
1419
1419
0 commit comments