Welcome to menuraR!

Thank you for visiting menuraR, an application designed to compare multiple Non-linear Dimension Reduction (NLDR) layouts and assist in selecting the most reasonable one.

If you already have high-dimensional data, metadata, and NLDR results prepared, you can upload them directly.

✨ Alternatively, if you don’t have pre-computed metadata or NLDR results, you can use menuraR to generate tSNE and UMAP layouts with default hyperparameter settings after uploading your high-dimensional data. You can also explore the app with the provided example datasets:

👉 If you want more NLDR layouts than the ones you uploaded, you can use “Add layout” to generate additional tSNE and/or UMAP layouts with your chosen hyperparameter settings.

File structure

The data is organized into separate CSV files: one for high-dimensional data, one for metadata, and another for non-linear dimensionality reductions (NLDR).

High-Dimensional Data

The high-dimensional data file must contain a unique “ID” column and data columns named “x1”, “x2”, etc.

x1 x2 x3 x4 ID
1.99 -0.194 0.0189 0.981 1
0.791 -0.848 0.470 0.530 2
0.785 -0.950 0.687 0.313 3
0.572 -0.0309 0.000477 1.00 4
1.00 -0.529 0.152 0.848 5
0.379 -0.00676 0.0000229 1.00 6

Metadata

The metadata file should contain “name_of_the_layout” as an integer, “nldr_method” as tSNE, UMAP etc., and “hyper_parameters” followed by parameter name, then “=” to the value.

name_of_the_layout nldr_method hyper_parameters
1 tSNE perplexity = 52
2 UMAP n_neighbors = 15, min_dist = 0.1
3 PHATE knn = 5
4 TriMAP n_inliers = 12, n_outliers = 4, n_random = 3
5 PaCMAP n_neighbors = 10, MN_ratio = 0.5, FP_ratio = 2, init = r…

NLDR Results

The NLDR results file should include the “ID” column (to link back to the high-dimensional data), the two NLDR components (“emb1” and “emb2”) for each method followed by the method ID (e.g., 1_emb1, 1_emb2).

1_emb1 1_emb2 2_emb1 2_emb2 3_emb1 3_emb2 4_emb1 4_emb2 5_emb1 5_emb2 ID
3.39 -7.26 -15.3 2.89 -0.00564 0.0115 -51.8 -23.2 -8.89 1
22.5 -0.181 -10.3 -1.93 -0.0204 -0.00855 -59.8 1.97 0.0766 2
25.6 -2.59 -10.4 -3.44 -0.0180 -0.00502 -56.3 5.71 -0.228 3
12.4 16.6 -6.37 2.56 -0.00314 -0.0171 -81.0 -7.28 5.63 4
14.1 4.33 -10.2 1.79 -0.0236 -0.000476 -65.3 -9.05 -0.559 5
14.9 18.5 -5.85 2.10 -0.00235 -0.0182 -83.1 -2.61 7.08 6

Example R Code for Data Preparation

Here are code snippets demonstrating how to prepare your data from a Seurat object into the required format for dimarence.

Obtain PCA Data

library(Seurat)    # Assuming Seurat is installed and loaded
library(tidyverse) # For tibble and mutate
library(here)      # For robust file paths

# Load your Seurat object
mouse_liver_obj <- read_rds(here::here("Tutorials/mouse_liver_seurat_obj.rds"))

# Extract PCA embeddings, select top 10 components, rename, and add ID
pca_df_selected <- mouse_liver_obj@reductions$pca@cell.embeddings[, 1:10] |>
  as_tibble() |>
  setNames(paste0("x", 1:10)) |>
  mutate(ID = row_number())

pca_df_selected
# A tibble: 4,124 × 11
       x1      x2     x3      x4      x5     x6     x7      x8     x9     x10
    <dbl>   <dbl>  <dbl>   <dbl>   <dbl>  <dbl>  <dbl>   <dbl>  <dbl>   <dbl>
 1   2.62 -7.84   -5.31   -2.81    6.97  -3.39  -1.10  -10.5   -2.48  -0.184 
 2   5.60 -0.326   0.136   4.39   -4.02   0.938 -1.19    0.711 -0.230  0.0405
 3   8.98 -1.74   -0.355  -1.47    9.69  -2.83  -0.203  -5.97   1.11  -0.223 
 4   9.88 -1.69   -0.482  -0.577   6.57  -4.28  -0.811 -13.7   -0.144 -0.184 
 5   7.69 -1.03   -0.197   1.35    5.81   0.917  0.521   1.27   0.920 -0.0714
 6 -20.2  -1.05   20.6     0.760  -0.312  2.22  -0.856   3.19   0.451 -0.509 
 7   4.90 -0.748   0.593   1.20   -0.503  0.191  0.235   0.742 -1.77   0.154 
 8   8.70 -1.96   -1.28  -47.3   -11.0    4.69  -1.77    2.97  23.5   -1.45  
 9 -25.8  -1.46   26.3    -1.37    2.77   1.22  -2.05    1.81  -0.930 -0.366 
10   5.98 -0.0674 -0.501   5.19   -6.40   0.322 -1.10   -1.60   0.214  0.174 
# ℹ 4,114 more rows
# ℹ 1 more variable: ID <int>

Obtain NLDR Data

library(Seurat)    # Assuming Seurat is installed and loaded
library(tidyverse) # For tibble and mutate

# Extract UMAP embeddings, rename, and add ID
umap_df <- mouse_liver_obj@reductions$umap@cell.embeddings |>
  as_tibble() |>
  setNames(c("1_emb1", "1_emb2")) |> # Adjust column names based on your layout ID
  mutate(ID = row_number())

umap_df
# A tibble: 4,124 × 3
   `1_emb1` `1_emb2`    ID
      <dbl>    <dbl> <int>
 1    6.17      7.34     1
 2   -5.92      7.41     2
 3    4.83      6.66     3
 4    5.48      7.32     4
 5   -0.947     4.00     5
 6   17.0      12.6      6
 7   -1.88      6.72     7
 8    7.82      2.38     8
 9   16.5      11.4      9
10   -7.95      8.52    10
# ℹ 4,114 more rows

Access the Application

You can access the menuraR application at the following link: - https://ebsmonash.shinyapps.io/menuraR/

Please note that these links may be updated if the server hosting services change.


For any questions or issues, please contact the maintainer at jayani.piyadigamage@monash.edu.