You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Assessment of preservation of local and global structures
248
-
249
-
If you've installed python, and have set up a python environment in your session, you can run this section to compute the GW distance. Please see the user's guide for setup instructions. Note that you can still run `computeStructuralMetrics` by setting `y=NULL`, if there are no python environments setup.
250
-
251
-
**Withinness, betweenness and Gromov-Wasserstein (GW) distance**
252
-
253
-
`computeStructuralMerics` returns three metrics that can be used to compare various imputation procedures:
254
-
255
-
-`withinness` is the sum of the squared distances between samples from the same experimental group (e.g. control, treatment, Het, WT). More specifically the similarity of the samples is measured by the distance of the (expression profile of the) sample from group centroid. This is a measure of preservation of local structures.
256
-
257
-
-`betweenness` is the sum of the squared distances between the experimental groups, more specifically the distance between group centroids. This is a measure of preservation of global structures.
258
-
259
-
-`gw_dist` is the Gromov-Wasserstein distance computed between Principal Components of imputed and source data. It is a measure of how well the structures are overall preserved over all principal axis of variation in the data. Hence, it captures preservation of both local and global structures. PCs of the source data are computed using highly variable peptides (i.e. peptides with high biological variance).
260
-
261
-
An ideal imputation method results in smaller `withinness`, larger `withinness` and smaller `gw_dist` among other imputation methods.
computeStructuralMetrics(y_msImpute, group, y[rownames(top.hvp)[1:50],], k = 16)
274
-
```
275
-
276
-
```
277
-
Computing GW distance using k= 16 Principal Components
278
-
$withinness
279
-
Mild Control Moderate Severe
280
-
10.39139 11.53781 10.54993 10.46477
281
-
282
-
$betweenness
283
-
[1] 11.50008
284
-
285
-
$gw_dist
286
-
[1] 0.01717915
287
-
```
288
243
289
244
290
-
```{r eval=FALSE}
291
-
computeStructuralMetrics(y_qrilc, group, y[rownames(top.hvp)[1:50],], k = 16)
292
-
```
293
-
294
-
```
295
-
Computing GW distance using k= 16 Principal Components
296
-
$withinness
297
-
Mild Control Moderate Severe
298
-
10.34686 11.84049 10.62378 10.73958
299
-
300
-
$betweenness
301
-
[1] 11.62664
302
-
303
-
$gw_dist
304
-
[1] 0.008877501
305
-
```
306
-
307
-
308
-
309
-
`Withinness` tends to be smaller by `msImpute`, which indicates that local structures are better preserved by these two methods. The `gw_dist` over all PCs for the two methods is very similar (rounded to 2 decimals). This suggests the enhancements in `v2-mnar` is just as good as left-censored MNAR methods such as `QRILC`. Note that `k` is set to the number of samples to capture all dimensions of the data.
310
-
311
-
312
-
Also note that that, unlike `QRILC`, msImpute `v2-mnar` dose not drastically increase the variance of peptides (measured by squared coefficient of variation) post imputation.
245
+
Note that that, unlike `QRILC`, msImpute `v2-mnar` dose not drastically increase the variance of peptides (measured by squared coefficient of variation) post imputation.
313
246
```{r}
314
247
par(mfrow=c(2,2))
315
248
pcv <- plotCV2(y, main = "data")
@@ -395,24 +328,14 @@ missing peptides exhibit structured missing out of total number of partially obs
395
328
396
329
397
330
```{r}
398
-
y_msImpute_mar <- msImpute(y, method = "v2") # no need to specify group if data is MAR.
399
-
y_msImpute_mnar <- msImpute(y, method = "v2-mnar", group = group)
400
-
```
401
-
402
-
## Assessment of preservation of local and global structures
403
-
404
-
In this example, we do not compute `gw_dist` and only rely on `withinness` and `betweenness` metrics to assess imputation.
0 commit comments