diff --git a/404.html b/404.html index 8f662eb..2b40222 100644 --- a/404.html +++ b/404.html @@ -54,6 +54,11 @@ diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index 1528f5e..8bc5d72 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -33,6 +33,11 @@ diff --git a/LICENSE-text.html b/LICENSE-text.html index 6bf432e..0239c49 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -33,6 +33,11 @@ diff --git a/SUPPORT.html b/SUPPORT.html index 4d5bb1e..8a369b3 100644 --- a/SUPPORT.html +++ b/SUPPORT.html @@ -33,6 +33,11 @@ diff --git a/articles/FunctionalAndStructuralPipeline.html b/articles/FunctionalAndStructuralPipeline.html new file mode 100644 index 0000000..b497a94 --- /dev/null +++ b/articles/FunctionalAndStructuralPipeline.html @@ -0,0 +1,718 @@ + + + + + + + + +Learning functional and structural spatial relationships with MISTy • mistyR + + + + + + + + + + + + + + + + Skip to contents + + +
+ + + + +
+
+ + + +
+

Introduction +

+

10X Visium captures spatially resolved transcriptomic profiles in +spots containing multiple cells. In this vignette, we will use the gene +expression information from Visium data to infer pathway and +transcription factor activity and separately investigate spatial +relationships between them and the cell-type composition. In addition, +we will examine spatial relationships of ligands and receptors.

+

Load the necessary R packages:

+
+# MISTy
+library(mistyR)
+
+# For using Python 
+library(reticulate)
+
+# Seurat
+library(Seurat)
+
+# Data manipulation
+library(tidyverse)
+
+# Pathways
+library(decoupleR)
+
+#Cleaning names
+library(janitor)
+

We will use some functions in python since the computation time is +significantly shorter than in R. Python chunks start with a #In Python. +Install and load the necessary package for Python:

+
+py_install(c("decoupler","omnipath"), pip =TRUE)
+
## Using Python: /usr/bin/python3.10
+## Creating virtual environment '~/.virtualenvs/r-reticulate' ...
+
## + /usr/bin/python3.10 -m venv /home/runner/.virtualenvs/r-reticulate
+
## Done!
+## Installing packages: pip, wheel, setuptools
+
## + /home/runner/.virtualenvs/r-reticulate/bin/python -m pip install --upgrade pip wheel setuptools
+
## Virtual environment '~/.virtualenvs/r-reticulate' successfully created.
+## Using virtual environment '~/.virtualenvs/r-reticulate' ...
+
## + /home/runner/.virtualenvs/r-reticulate/bin/python -m pip install --upgrade --no-user decoupler omnipath
+
# In Python:
+import decoupler as dc
+
+
+

Get and load data +

+

For this showcase, we use a 10X Visium spatial slide from Kuppe et al., +2022, where they created a spatial multi-omic map of human +myocardial infarction. The tissue example data comes from the human +heart of patient 14, which is in a chronic state following myocardial +infarction. The Seurat object contains, among other things, the +normalized and raw gene counts. First, we have to download and extract +the file:

+
+download.file("https://zenodo.org/records/6580069/files/10X_Visium_ACH005.tar.gz?download=1",
+    destfile = "10X_Visium_ACH005.tar.gz", method = "curl")
+untar("10X_Visium_ACH005.tar.gz")
+

The next step is to load the data, extract the normalized gene counts +of genes expressed in at least 5% of the spots, and pixel coordinates. +It is recommended to use pixel coordinates instead of row and column +numbers since the rows are shifted and therefore do not express the real +distance between the spots.

+
+seurat <- readRDS("ACH005/ACH005.rds")
+expression_raw <- as.matrix(GetAssayData(seurat, layer = "counts", assay = "SCT"))
+geometry <- GetTissueCoordinates(seurat, scale = NULL)
+
+# Only take genes that  expressed in at least 5% of the spots
+expression <- expression_raw[rownames(expression_raw[(rowSums(expression_raw > 0) / ncol(expression_raw)) >= 0.05,]),]
+

Let’s take a look at the slide itself and some of the cell-type +niches defined by Kuppe et al.:

+
+SpatialPlot(seurat, alpha = 0)
+

+
+SpatialPlot(seurat, group.by = "celltype_niche")
+

+
+
+

Extract cell-type composition +

+

The Seurat Object of the tissue slide also contains the estimated +cell type proportions from cell2location. We extract them into a +separate object we will later use with MISTy and visualize some of the +cell types:

+
+# Rename to more informative names
+rownames(seurat@assays$c2l_props@data) <- rownames(seurat@assays$c2l_props@data) %>% 
+  recode('Adipo' = 'Adipocytes',
+         'CM' = 'Cardiomyocytes',
+         'Endo' = 'Endothelial',
+         'Fib' = 'Fibroblasts',
+         'PC' = 'Pericytes',
+         'prolif' = 'Proliferating',
+         'vSMCs' = 'Vascular-SMCs')
+
+# Extract into a separate object
+composition <- as_tibble(t(seurat[["c2l_props"]]$data))
+
+
+# Visualize cell types
+DefaultAssay(seurat) <- "c2l_props"
+SpatialFeaturePlot(seurat, 
+                   keep.scale = NULL, 
+                   features = c('Vascular-SMCs', "Cardiomyocytes", "Endothelial", "Fibroblasts"),
+                   ncol = 2) 
+

+
+
+

Pathway activities on cell-type composition +

+

Let’s investigate the relationship between the cell-type compositions +and pathway activities in our example slide. But before we create the +views, we need to estimate the pathway activities. For this we will take +pathway gene sets from PROGENy +and estimate the activity with decoupleR:

+
+# Obtain genesets
+model <- get_progeny(organism = "human", top = 500)
+
## Warning: One or more parsing issues, call `problems()` on your data frame for details,
+## e.g.:
+##   dat <- vroom(...)
+##   problems(dat)
+
+# Use multivariate linear model to estimate activity
+est_path_act <- run_mlm(expression, model,.mor = NULL) 
+

We add the result to the Seurat Object and plot the estimated +activities to see the distribution over the slide:

+
+# Delete progeny assay from Kuppe et al.
+seurat[['progeny']] <- NULL
+
+# Put estimated pathway activities object into the correct format
+est_path_act_wide <- est_path_act %>% 
+  pivot_wider(id_cols = condition, names_from = source, values_from = score) %>%
+  column_to_rownames("condition") 
+
+# Clean names
+colnames(est_path_act_wide)  <- est_path_act_wide %>% 
+  clean_names(parsing_option = 0) %>% 
+  colnames(.)
+
+# Add
+seurat[['progeny']] <- CreateAssayObject(counts = t(est_path_act_wide))
+
+SpatialFeaturePlot(seurat, features = c("jak.stat", "hypoxia"), image.alpha = 0)
+

+
+

MISTy Views +

+

For the MISTy view, we will use cell type compositions per spot as +the intraview and add the estimated PROGENy +pathway activities as juxta and paraviews. The size of the neighborhood +and the kernel, as well as the kernel family, should be chosen depending +on the experiment. Here both distances were chosen to enclose only a +small number of neighboring spots.

+
+# Clean names
+colnames(composition)  <- composition %>% clean_names(parsing_option = 0) %>% colnames(.)
+
+# create intra from cell-type composition
+comp_views <- create_initial_view(composition) 
+
+# juxta & para from pathway activity
+path_act_views <- create_initial_view(est_path_act_wide) %>%
+  add_juxtaview(geometry,  neighbor.thr = 130) %>% 
+  add_paraview(geometry, l= 200, family = "gaussian")
+
+# Combine views
+com_path_act_views <- comp_views %>%
+  add_views(create_view("juxtaview.path.130", path_act_views[["juxtaview.130"]]$data, "juxta.path.130"))%>% 
+  add_views(create_view("paraview.path.200", path_act_views[["paraview.200"]]$data, "para.path.200")) 
+

Then run MISTy and collect the results:

+
+run_misty(com_path_act_views, "result/comp_path_act")
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/result/comp_path_act"
+
+misty_results_com_path_act <- collect_results("result/comp_path_act/")
+
+
+

Downstream analysis +

+

With the collected results, we can now answer the following +questions:

+
+

1. To what extent can the analyzed surrounding tissues’ pathway +activities explain the cell-type composition of the spot compared to the +intraview? +

+

Here we can look at two different statistics: intra.R2 +shows the variance explained by the intraview alone, and +gain.R2 shows the increase in explainable variance when we +additionally consider the other views (here juxta and para).

+
+misty_results_com_path_act %>%
+  plot_improvement_stats("intra.R2")%>%
+  plot_improvement_stats("gain.R2") 
+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

The juxta and paraview particularly increase the explained variance +for mast cells and adipocytes.

+

In general, the significant gain in R2 can be interpreted as the +following:

+

“We can better explain the expression of marker X when we consider +additional views other than the intrinsic view.”

+

To see the individual contributions of the views we can use:

+
+misty_results_com_path_act %>% 
+  plot_view_contributions()
+

+

We see, that the intraview explains the most variance for nearly all +cell types (as expected).

+
+
+

2. What are the specific relations that can explain the cell-type +composition? +

+

We can individually show the importance of the markers from each +viewpoint as predictors of the spot intrinsic cell-type composition to +explain the contributions.

+

Let’s look at the juxtaview:

+
+misty_results_com_path_act %>%
+  plot_interaction_heatmap("juxta.path.130", clean = TRUE)
+

+

We observe that TNFa is a significant predictor for adipocytes. We +can compare their distributions:

+
+SpatialFeaturePlot(seurat, features = "tnfa", image.alpha = 0)
+

+
+DefaultAssay(seurat) <- "c2l_props"
+SpatialFeaturePlot(seurat, features = "Adipocytes", image.alpha = 0)
+

+

We observe similar distributions for both.

+
+
+
+
+

Pathway activities on cell-type composition - Linear Model +

+

The default model used by MISTy to model each view is the random +forest. However, there are different models to choose from, like the +faster and more interpretable linear model.

+

Another option we haven’t used yet is bypass.intra. With +this, we bypass training the baseline model that predicts the intraview +with features from the intraview itself. We will still be able to see +how the other views explain the intraview. We will use the same view +composition as before:

+
+run_misty(com_path_act_views, "result/comp_path_act_linear", model.function = linear_model, bypass.intra = TRUE)
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/result/comp_path_act_linear"
+
+misty_results_com_path_act_linear <- collect_results("result/comp_path_act_linear")
+
+

Downstream analysis +

+

Let’s check again the gain.R2 and view +contributions:

+
+misty_results_com_path_act_linear %>%
+  plot_improvement_stats("gain.R2") %>%
+  plot_view_contributions()
+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

For the specific target-predictor interaction, we look again at the +juxtaview:

+
+misty_results_com_path_act_linear %>%
+  plot_interaction_heatmap("juxta.path.130", clean = TRUE) 
+

+

Visualize the activity of the JAK-STAT pathway and myeloid +distribution:

+
+SpatialFeaturePlot(seurat, features = "jak.stat", image.alpha = 0)
+
## Warning: Could not find jak.stat in the default search locations, found in
+## 'progeny' assay instead
+

+
+DefaultAssay(seurat) <- "c2l_props"
+SpatialFeaturePlot(seurat, features = "Myeloid", image.alpha = 0)
+

+
+
+
+

Pathway activities and Transcriptionfactors on cell-type +composition +

+

In addition to the estimated pathway activities, we can also add a +view to examine the relationship between cell-type composition and TF +activity. First, we need to estimate the TF activity with decoupler. It +is recommended to compute it with Python, as it is significantly +faster:

+
+expression_df <- as.data.frame(t(expression))
+
# In Python:
+net = dc.get_collectri()
+
## 
+0.00B [00:00, ?B/s]
+1.11MB [00:00, 9.11MB/s]
+5.36MB [00:00, 27.8MB/s]
+11.7MB [00:00, 40.2MB/s]
+33.3MB [00:00, 106MB/s] 
+44.3MB [00:00, 108MB/s]
+52.7MB [00:00, 86.6MB/s]
+## 
+0.00B [00:00, ?B/s]
+118kB [00:00, 184MB/s]
+
acts_tfs=  dc.run_ulm(
+  mat = r.expression_df,
+  net = net,
+  verbose = True,
+  use_raw = False,
+  )
+
## Running ulm on mat with 3175 samples and 7241 targets for 545 sources.
+

The object with the estimation contains two elements: The first are +the estimates and their respective p-values can be found in the second +element.

+
+est_TF <- py$acts_tfs
+

To speed up the following model training, we calculate the 1000 most +variable genes expressed. We then extract the TF from the highly +variable genes to create a MISTy view.

+
+# Highly variable genes
+hvg <- FindVariableFeatures(expression, selection.method = "vst", nfeatures = 1000) %>% 
+  filter(variable == TRUE)
+
+hvg_expr <- expression[rownames(hvg), ]
+
+# Extract TF from the highly variable genes
+hvg_TF<- est_TF[[1]][, colnames(est_TF[[1]]) %in% rownames(hvg_expr)]
+
+

Misty Views +

+

We will combine the intraview from the cell-type composition and +paraviews from the estimated pathway and TF activities:

+
+TF_view <- create_initial_view(hvg_TF) %>%
+  add_paraview(geometry, l = 200)           # This may still take some time
+
+# Combine Views
+comp_TF_path_views <- comp_views %>% add_views(create_view("paraview.TF.200", TF_view[["paraview.200"]]$data, "para.TF.200")) %>% 
+  add_views(create_view("paraview.path.200", path_act_views[["paraview.200"]]$data, "para.path.200"))
+
+# Run Misty
+run_misty(comp_TF_path_views, "result/comp_TF_path", model.function = linear_model, bypass.intra = TRUE)
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/result/comp_TF_path"
+
+misty_results_comp_TF_pathway <- collect_results("result/comp_TF_path")
+
+
+

Downstream analysis +

+
+misty_results_comp_TF_pathway %>%
+  plot_improvement_stats("gain.R2") %>%
+  plot_view_contributions()
+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

When plotting the interaction heatmap, we can restrict the result by +applying a trim, that only shows targets above a defined +value for a chosen metric like gain.R2.

+
+misty_results_comp_TF_pathway %>%
+  plot_interaction_heatmap("para.TF.200", 
+                           clean = TRUE,
+                           trim.measure = "gain.R2",
+                           trim = 20)
+

+

The TF MYC is an important predictor of fibroblasts:

+
+DefaultAssay(seurat) <- "SCT"
+SpatialFeaturePlot(seurat, features = "MYC", image.alpha = 0)
+

+
+DefaultAssay(seurat) <- "c2l_props"
+SpatialFeaturePlot(seurat, features = "Fibroblasts", image.alpha = 0)
+

+

Indeed, we can see a similar distribution.

+
+
+
+

Ligand-Receptor +

+

Finally, we want to learn about the spatial relationship of receptors +and ligands on the tissue slide. We will access the consensus resource +from LIANA +after downloading it from Github, pulling out the ligands and receptors +from the before-determined highly variable genes:

+
+download.file("https://raw.githubusercontent.com/saezlab/liana-py/main/liana/resource/omni_resource.csv", 
+    destfile = "omni_resource.csv", method = "curl")
+
+# Ligand Receptor Resource
+omni_resource <- read_csv("omni_resource.csv")%>% 
+  filter(resource == "consensus")
+
+# Get highly variable ligands
+ligands <- omni_resource %>% 
+  pull(source_genesymbol) %>% 
+  unique()
+hvg_lig <- hvg_expr[rownames(hvg_expr) %in% ligands,]
+
+# Get highly variable receptors
+receptors <- omni_resource %>% 
+  pull(target_genesymbol) %>% 
+  unique()
+hvg_recep <- hvg_expr[rownames(hvg_expr) %in% receptors,]
+
+# Clean names
+rownames(hvg_lig) <- hvg_lig %>% 
+  clean_names(parsing_option = 0) %>% 
+  rownames(.)
+
+rownames(hvg_recep) <- hvg_recep %>% clean_names(parsing_option = 0) %>% 
+  rownames(.)
+
+

Misty Views +

+

We are going to create a combined view with the receptors in the +intraview as targets and the ligands in the paraview as predictors:

+
+# Create views and combine them
+receptor_view <- create_initial_view(as.data.frame(t(hvg_lig)))
+
+ligand_view <- create_initial_view(as.data.frame(t(hvg_recep))) %>% 
+  add_paraview(geometry, l = 200, family = "gaussian")
+
+lig_recep_view <- receptor_view %>% add_views(create_view("paraview.ligand.200", ligand_view[["paraview.200"]]$data, "para.lig.200"))
+
+run_misty(lig_recep_view, "results/lig_recep", bypass.intra = TRUE)
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/results/lig_recep"
+
+misty_results_lig_recep <- collect_results("results/lig_recep")
+
+
+

Downstream analysis +

+

Let’s look at important interactions. An additional way to reduce the +number of interactions shown in the heatmap is applying a +cutoff, that introduces an importance threshold:

+
+misty_results_lig_recep %>%
+  plot_interaction_heatmap("para.lig.200", clean = TRUE, cutoff = 2, trim.measure ="gain.R2", trim = 25)
+

+

Remember that MISTy does not only infer interactions between ligands +and their respective receptor, but rather all possible interactions +between ligands and receptors. We can visualize one of the interactions +with high importance:

+
+DefaultAssay(seurat) <- "SCT"
+SpatialFeaturePlot(seurat, features = "CRLF1", image.alpha = 0)
+

+
+SpatialFeaturePlot(seurat, features = "COMP", image.alpha = 0)
+

+

The plots show a co-occurrence of the ligand and receptor, although +they are not an annotated receptor-ligand pair.

+
+
+
+

See also +

+

browseVignettes("mistyR")

+
+
+

Session Info +

+

Here is the output of sessionInfo() at the point when +this document was compiled.

+ +
## R version 4.3.3 (2024-02-29)
+## Platform: x86_64-pc-linux-gnu (64-bit)
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices utils     datasets  methods   base     
+## 
+## other attached packages:
+##  [1] distances_0.1.10   janitor_2.2.0      decoupleR_2.8.0    lubridate_1.9.3   
+##  [5] forcats_1.0.0      stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2       
+##  [9] readr_2.1.5        tidyr_1.3.1        tibble_3.2.1       ggplot2_3.5.0     
+## [13] tidyverse_2.0.0    Seurat_5.0.2       SeuratObject_5.0.1 sp_2.1-3          
+## [17] reticulate_1.35.0  mistyR_1.10.0      BiocStyle_2.30.0  
+## 
+## loaded via a namespace (and not attached):
+##   [1] RcppAnnoy_0.0.22       splines_4.3.3          later_1.3.2           
+##   [4] filelock_1.0.3         R.oo_1.26.0            cellranger_1.1.0      
+##   [7] polyclip_1.10-6        hardhat_1.3.1          pROC_1.18.5           
+##  [10] rpart_4.1.23           fastDummies_1.7.3      lifecycle_1.0.4       
+##  [13] rprojroot_2.0.4        vroom_1.6.5            globals_0.16.2        
+##  [16] lattice_0.22-5         MASS_7.3-60.0.1        backports_1.4.1       
+##  [19] magrittr_2.0.3         plotly_4.10.4          sass_0.4.8            
+##  [22] rmarkdown_2.25         jquerylib_0.1.4        yaml_2.3.8            
+##  [25] rlist_0.4.6.2          httpuv_1.6.14          sctransform_0.4.1     
+##  [28] spam_2.10-0            spatstat.sparse_3.0-3  cowplot_1.1.3         
+##  [31] pbapply_1.7-2          RColorBrewer_1.1-3     abind_1.4-5           
+##  [34] rvest_1.0.4            Rtsne_0.17             R.utils_2.12.3        
+##  [37] nnet_7.3-19            rappdirs_0.3.3         ipred_0.9-14          
+##  [40] lava_1.7.3             ggrepel_0.9.5          irlba_2.3.5.1         
+##  [43] listenv_0.9.1          spatstat.utils_3.0-4   goftest_1.2-3         
+##  [46] RSpectra_0.16-1        spatstat.random_3.2-3  fitdistrplus_1.1-11   
+##  [49] parallelly_1.37.1      pkgdown_2.0.7          leiden_0.4.3.1        
+##  [52] codetools_0.2-19       xml2_1.3.6             tidyselect_1.2.0      
+##  [55] farver_2.1.1           stats4_4.3.3           matrixStats_1.2.0     
+##  [58] spatstat.explore_3.2-6 jsonlite_1.8.8         caret_6.0-94          
+##  [61] ellipsis_0.3.2         progressr_0.14.0       iterators_1.0.14      
+##  [64] ggridges_0.5.6         survival_3.5-8         systemfonts_1.0.5     
+##  [67] foreach_1.5.2          tools_4.3.3            progress_1.2.3        
+##  [70] ragg_1.2.7             ica_1.0-3              Rcpp_1.0.12           
+##  [73] glue_1.7.0             prodlim_2023.08.28     gridExtra_2.3         
+##  [76] ranger_0.16.0          xfun_0.42              here_1.0.1            
+##  [79] withr_3.0.0            BiocManager_1.30.22    fastmap_1.1.1         
+##  [82] fansi_1.0.6            digest_0.6.34          timechange_0.3.0      
+##  [85] R6_2.5.1               mime_0.12              textshaping_0.3.7     
+##  [88] colorspace_2.1-0       scattermore_1.2        tensor_1.5            
+##  [91] spatstat.data_3.0-4    R.methodsS3_1.8.2      utf8_1.2.4            
+##  [94] generics_0.1.3         recipes_1.0.10         data.table_1.15.2     
+##  [97] class_7.3-22           ridge_3.3              prettyunits_1.2.0     
+## [100] httr_1.4.7             htmlwidgets_1.6.4      ModelMetrics_1.2.2.2  
+## [103] uwot_0.1.16            pkgconfig_2.0.3        gtable_0.3.4          
+## [106] timeDate_4032.109      lmtest_0.9-40          selectr_0.4-2         
+## [109] furrr_0.3.1            OmnipathR_3.10.1       htmltools_0.5.7       
+## [112] dotCall64_1.1-1        bookdown_0.38          scales_1.3.0          
+## [115] png_0.1-8              gower_1.0.1            snakecase_0.11.1      
+## [118] knitr_1.45             tzdb_0.4.0             reshape2_1.4.4        
+## [121] checkmate_2.3.1        nlme_3.1-164           curl_5.2.1            
+## [124] cachem_1.0.8           zoo_1.8-12             KernSmooth_2.23-22    
+## [127] parallel_4.3.3         miniUI_0.1.1.1         desc_1.4.3            
+## [130] pillar_1.9.0           grid_4.3.3             logger_0.2.2          
+## [133] vctrs_0.6.5            RANN_2.6.1             promises_1.2.1        
+## [136] xtable_1.8-4           cluster_2.1.6          evaluate_0.23         
+## [139] cli_3.6.2              compiler_4.3.3         rlang_1.1.3           
+## [142] crayon_1.5.2           future.apply_1.11.1    labeling_0.4.3        
+## [145] plyr_1.8.9             fs_1.6.3               stringi_1.8.3         
+## [148] viridisLite_0.4.2      deldir_2.0-4           assertthat_0.2.1      
+## [151] munsell_0.5.0          lazyeval_0.2.2         spatstat.geom_3.2-9   
+## [154] Matrix_1.6-5           RcppHNSW_0.6.0         hms_1.1.3             
+## [157] patchwork_1.2.0        bit64_4.0.5            future_1.33.1         
+## [160] shiny_1.8.0            highr_0.10             ROCR_1.0-11           
+## [163] igraph_2.0.2           memoise_2.0.1          bslib_0.6.1           
+## [166] bit_4.0.5              readxl_1.4.3
+
+
+
+ + + + +
+ + + + + + + diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-12-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-12-1.png new file mode 100644 index 0000000..2fb4df4 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-12-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-12-2.png new file mode 100644 index 0000000..4ec98cb Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-12-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-13-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-13-1.png new file mode 100644 index 0000000..e76061f Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-14-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-14-1.png new file mode 100644 index 0000000..bdbc8d4 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-15-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-15-1.png new file mode 100644 index 0000000..b56065f Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-15-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-15-2.png new file mode 100644 index 0000000..78adbbf Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-15-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-17-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-17-1.png new file mode 100644 index 0000000..94de5ea Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-17-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-17-2.png new file mode 100644 index 0000000..900ee61 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-17-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-18-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-18-1.png new file mode 100644 index 0000000..c4f0662 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-19-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-19-1.png new file mode 100644 index 0000000..d119e18 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-19-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-19-2.png new file mode 100644 index 0000000..4ef7c05 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-19-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-25-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-25-1.png new file mode 100644 index 0000000..91b9dd9 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-25-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-25-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-25-2.png new file mode 100644 index 0000000..ebaea73 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-25-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-26-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-26-1.png new file mode 100644 index 0000000..c252fc2 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-26-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-27-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-27-1.png new file mode 100644 index 0000000..160abab Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-27-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-27-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-27-2.png new file mode 100644 index 0000000..2355bf5 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-27-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-30-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-30-1.png new file mode 100644 index 0000000..ac84139 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-30-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-31-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-31-1.png new file mode 100644 index 0000000..5cfa4b2 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-31-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-31-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-31-2.png new file mode 100644 index 0000000..2fc6505 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-31-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-6-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-6-1.png new file mode 100644 index 0000000..3cde4a5 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-6-2.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-6-2.png new file mode 100644 index 0000000..cdf38c7 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-6-2.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-7-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-7-1.png new file mode 100644 index 0000000..21dc067 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-9-1.png b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-9-1.png new file mode 100644 index 0000000..3c8d469 Binary files /dev/null and b/articles/FunctionalAndStructuralPipeline_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands.html b/articles/FunctionalPipelinePathwayActivityLigands.html new file mode 100644 index 0000000..388cac0 --- /dev/null +++ b/articles/FunctionalPipelinePathwayActivityLigands.html @@ -0,0 +1,507 @@ + + + + + + + + +Functional analysis with MISTy - pathway activity and ligand expression • mistyR + + + + + + + + + + + + + + + + Skip to contents + + +
+ + + + +
+
+ + + +
+

Introduction +

+

10X Visium captures spatially resolved transcriptomic profiles in +spots containing multiple cells. In this vignette, we will use the gene +expression information from Visium data to infer pathway activity and +investigate spatial relationships between some pathways and ligand +expression.

+

Load the necessary packages:

+
+# MISTy 
+library(mistyR) 
+library(future) 
+
+#Seurat 
+library(Seurat)
+library(SeuratObject)
+
+# Data manipulation 
+library(tidyverse) 
+
+# Pathways and annotation
+library(decoupleR)
+library(OmnipathR)
+library(progeny)
+
+# Cleaning names
+library(janitor)
+
+
+

Get and load data +

+

For this showcase, we use a 10X Visium spatial slide from Kuppe et al., +2022, where they created a spatial multi-omic map of human +myocardial infarction. The tissue example data comes from the human +heart of patient 14, which is in a later state after myocardial +infarction. The Seurat object contains, among other things, the +normalized and raw gene counts. First, we have to download and extract +the file:

+
+download.file("https://zenodo.org/records/6580069/files/10X_Visium_ACH005.tar.gz?download=1",
+    destfile = "10X_Visium_ACH005.tar.gz", method = "curl")
+untar("10X_Visium_ACH005.tar.gz")
+

The next step is to load the data, extract the normalized gene +counts, names of genes expressed in at least 5% of the spots, and pixel +coordinates. It is recommended to use pixel coordinates instead of row +and column numbers since the rows are shifted and therefore do not +express the real distance between the spots.

+
+seurat_vs <- readRDS("ACH005/ACH005.rds")
+
+expression <- as.matrix(GetAssayData(seurat_vs, layer = "counts", assay = "SCT"))
+gene_names <- rownames(expression[(rowSums(expression > 0) / ncol(expression)) >= 0.05,]) 
+geometry <- GetTissueCoordinates(seurat_vs, scale = NULL)
+
+
+

Pathway activity +

+

Now we create a Seurat object with pathway activities inferred from +PROGENy. +We delete the PROGENy assay done by Kuppe et al. and load a model matrix +with the top 1000 significant genes for each of the 15 available +pathways. We then extract the genes that are both common to the PROGENy +model and the snRNA-seq assay from the Seurat object. We compute the +weighted sum of both and scale them to infer the pathway activity. We +save the result in a Seurat assay and clean the row names to handle +problematic variables.

+
+seurat_vs[['progeny']] <- NULL
+
+# Matrix with important genes for each pathway
+model <- get_progeny(organism = "human", top = 1000)
+
+# Use multivariate linear model to estimate activity
+est_path_act <- run_mlm(expression, model,.mor = NULL) 
+
+# Put estimated pathway activities object into the correct format
+est_path_act_wide <- est_path_act %>% 
+  pivot_wider(id_cols = condition, names_from = source, values_from = score) %>%
+  column_to_rownames("condition") 
+
+# Clean names
+colnames(est_path_act_wide)  <- est_path_act_wide %>% 
+  clean_names(parsing_option = 0) %>% 
+  colnames(.)
+
+# Create a Seurat object
+seurat_vs[['progeny']] <- CreateAssayObject(counts = t(est_path_act_wide))
+
+# Format for running MISTy later
+pathway_activity <- t(as.matrix(GetAssayData(seurat_vs, "progeny")))
+
+
+

Ligands +

+

To annotate the expressed ligands found in the tissue slide, we +import an intercellular network of ligands and receptors from Omnipath. We extract the ligands that +are expressed in the tissue slide and get their count data. We again +clean the row names to handle problematic variables.

+
+# Get ligands
+lig_rec <- import_intercell_network(interactions_param = list(datasets = c('ligrecextra', 'omnipath', 'pathwayextra')),
+                         transmitter_param = list(parent = 'ligand'),
+                         receiver_param = list(parent = 'receptor'))
+
+# Get unique ligands
+ligands <- unique(lig_rec$source_genesymbol)
+
+# Get expression of ligands in slide
+slide_markers <- ligands[ligands %in% gene_names] 
+ligand_expr <- t(as.matrix(expression[slide_markers,])) %>% clean_names()
+
+#clean names
+rownames(seurat_vs@assays$SCT@data) <- seurat_vs@assays$SCT@data %>% clean_names(parsing_option = 0) %>% rownames(.)
+
+
+

Visualize pathway activity +

+

Before continuing with creating the MISTy view, we can look at the +slide itself and some of the pathway activities.

+
+#Slide
+SpatialPlot(seurat_vs, alpha = 0)
+

+
+# Pathway activity examples
+DefaultAssay(seurat_vs) <- "progeny"
+SpatialFeaturePlot(seurat_vs, feature = c("mapk", "p53"), keep.scale = NULL)
+

+
+
+

MISTy views +

+

Now we need to create the MISTy views of interest. We are interested +in the relationship of the pathway activity in the same spot (intraview) +and the ten closest spots (paraview). Therefore we choose the family +`constant` and set l to ten, which will select the ten nearest +neighbors. Depending on the goal of the analysis, different families can +be applied.

+

We are also intrigued about the relationship of ligand expression and +pathway activity in the broader tissue. For this, we again create an +intra- and paraview, this time for the expression of the ligands, but +from this view, we only need the paraview. In the next step, we add it +to the pathway activity views to achieve our intended view +composition.

+
+pathway_act_view <- create_initial_view(as_tibble(pathway_activity) ) %>%
+  add_paraview(geometry, l = 10, family = "constant")
+
## 
+## Generating paraview using 10 nearest neighbors per unit
+
+ligand_view <- create_initial_view(as_tibble(ligand_expr)  %>% clean_names()) %>%
+  add_paraview(geometry, l = 10, family = "constant")
+
## 
+## Generating paraview using 10 nearest neighbors per unit
+
+combined_views <- pathway_act_view %>% add_views(create_view("paraview.ligand.10", ligand_view[["paraview.10"]]$data, "para.ligand.10"))
+

Then run MISTy and collect the results:

+
+run_misty(combined_views, "result/functional_ligand")
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/result/functional_ligand"
+
+misty_results <- collect_results("result/functional_ligand/")
+
+
+

Downstream analysis +

+

With the collected results, we can now answer the following +questions:

+
+

1. To what extent can the analyzed surrounding tissues’ activities +explain the pathway activity of the spot compared to the intraview? +

+

Here we can look at two different statistics: multi.R2 shows the +total variance explained by the multiview model. gain.R2 shows the +increase in explainable variance from the paraview.

+
+misty_results %>%
+  plot_improvement_stats("gain.R2") %>%
+  plot_improvement_stats("multi.R2")
+
## Warning: Removed 14 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+
## Warning: Removed 14 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

The paraview particularly increases the explained variance for TGFb +and PI3K. In general, the significant gain in R2 can be interpreted as +the following:

+

“We can better explain the expression of marker X when we consider +additional views other than the intrinsic view.”

+

To see the individual contributions of the views we can use:

+
+misty_results %>% plot_view_contributions()
+

+
+
+

2. What are the specific relations that can explain the pathway +activity +

+

The importance of the markers from each viewpoint as predictors of +the spot intrinsic pathway activity can be shown individually to explain +the contributions.

+

First, for the intrinsic view. To set an importance threshold we +apply cutoff:

+
+misty_results %>%
+  plot_interaction_heatmap("intra", clean = TRUE, cutoff = 1.5)
+

+

We can observe that TNFa is a significant predictor for the activity +of the NFkB pathway when in the same spot. Let’s take a look at the +spatial distribution of these pathway activities in the tissue +slide:

+
+SpatialFeaturePlot(seurat_vs, features = c("tnfa", "nfkb"), image.alpha = 0)
+

+

We can observe a correlation between high TNFa activity and high NFkB +activity.

+

Now we repeat this analysis with the pathway activity paraview. With +trim we display only targets with a value above 0.5 for +gain.R2.

+
+misty_results %>%
+  plot_interaction_heatmap(view = "para.10", 
+                           clean = TRUE, 
+                           trim = 0.5,
+                           trim.measure = "gain.R2",
+                           cutoff = 1.25)
+

+

From the gain.R2 we know that the paraview contributes a +lot to explaining the TGFb pathway activity. Let’s visualize it and its +most important predictor, androgen pathway activity:

+
+SpatialFeaturePlot(seurat_vs, features = c("androgen", "tgfb"), image.alpha = 0)
+

+

The plots show us an anticorrelation of these pathways.

+

Now we will analyze the last view, the ligand expression +paraview:

+
+misty_results %>%
+  plot_interaction_heatmap(view = "para.ligand.10", clean = TRUE, trim = 0.5,
+                           trim.measure = "gain.R2", cutoff=3)
+

+

The ligand SERPINF1 is a predictor of both PI3K and VEGF:

+
+SpatialFeaturePlot(seurat_vs, features = c("pi3k"), image.alpha = 0)
+

+
+SpatialFeaturePlot(seurat_vs, features = c("vegf"), image.alpha = 0)
+

+
+DefaultAssay(seurat_vs) <- "SCT"
+SpatialFeaturePlot(seurat_vs, features = c("serpinf1"), image.alpha = 0)
+

+

From the slides we can see that SERPINF1 correlates positive with +PI3K and negative with VEGF

+
+
+
+

See also +

+

browseVignettes("mistyR")

+
+
+

Session Info +

+

Here is the output of sessionInfo() at the point when +this document was compiled.

+ +
## R version 4.3.3 (2024-02-29)
+## Platform: x86_64-pc-linux-gnu (64-bit)
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices utils     datasets  methods   base     
+## 
+## other attached packages:
+##  [1] distances_0.1.10   janitor_2.2.0      progeny_1.24.0     OmnipathR_3.10.1  
+##  [5] decoupleR_2.8.0    lubridate_1.9.3    forcats_1.0.0      stringr_1.5.1     
+##  [9] dplyr_1.1.4        purrr_1.0.2        readr_2.1.5        tidyr_1.3.1       
+## [13] tibble_3.2.1       ggplot2_3.5.0      tidyverse_2.0.0    Seurat_5.0.2      
+## [17] SeuratObject_5.0.1 sp_2.1-3           future_1.33.1      mistyR_1.10.0     
+## [21] BiocStyle_2.30.0  
+## 
+## loaded via a namespace (and not attached):
+##   [1] RcppAnnoy_0.0.22       splines_4.3.3          later_1.3.2           
+##   [4] filelock_1.0.3         R.oo_1.26.0            cellranger_1.1.0      
+##   [7] polyclip_1.10-6        hardhat_1.3.1          pROC_1.18.5           
+##  [10] rpart_4.1.23           fastDummies_1.7.3      lifecycle_1.0.4       
+##  [13] globals_0.16.2         lattice_0.22-5         vroom_1.6.5           
+##  [16] MASS_7.3-60.0.1        backports_1.4.1        magrittr_2.0.3        
+##  [19] plotly_4.10.4          sass_0.4.8             rmarkdown_2.25        
+##  [22] jquerylib_0.1.4        yaml_2.3.8             rlist_0.4.6.2         
+##  [25] httpuv_1.6.14          sctransform_0.4.1      spam_2.10-0           
+##  [28] spatstat.sparse_3.0-3  reticulate_1.35.0      cowplot_1.1.3         
+##  [31] pbapply_1.7-2          RColorBrewer_1.1-3     abind_1.4-5           
+##  [34] rvest_1.0.4            Rtsne_0.17             R.utils_2.12.3        
+##  [37] nnet_7.3-19            rappdirs_0.3.3         ipred_0.9-14          
+##  [40] lava_1.7.3             ggrepel_0.9.5          irlba_2.3.5.1         
+##  [43] listenv_0.9.1          spatstat.utils_3.0-4   goftest_1.2-3         
+##  [46] RSpectra_0.16-1        spatstat.random_3.2-3  fitdistrplus_1.1-11   
+##  [49] parallelly_1.37.1      pkgdown_2.0.7          leiden_0.4.3.1        
+##  [52] codetools_0.2-19       xml2_1.3.6             tidyselect_1.2.0      
+##  [55] farver_2.1.1           stats4_4.3.3           matrixStats_1.2.0     
+##  [58] spatstat.explore_3.2-6 jsonlite_1.8.8         caret_6.0-94          
+##  [61] ellipsis_0.3.2         progressr_0.14.0       iterators_1.0.14      
+##  [64] ggridges_0.5.6         survival_3.5-8         systemfonts_1.0.5     
+##  [67] foreach_1.5.2          tools_4.3.3            progress_1.2.3        
+##  [70] ragg_1.2.7             ica_1.0-3              Rcpp_1.0.12           
+##  [73] glue_1.7.0             prodlim_2023.08.28     gridExtra_2.3         
+##  [76] ranger_0.16.0          xfun_0.42              withr_3.0.0           
+##  [79] BiocManager_1.30.22    fastmap_1.1.1          fansi_1.0.6           
+##  [82] digest_0.6.34          timechange_0.3.0       R6_2.5.1              
+##  [85] mime_0.12              textshaping_0.3.7      colorspace_2.1-0      
+##  [88] scattermore_1.2        tensor_1.5             spatstat.data_3.0-4   
+##  [91] R.methodsS3_1.8.2      utf8_1.2.4             generics_0.1.3        
+##  [94] recipes_1.0.10         data.table_1.15.2      class_7.3-22          
+##  [97] ridge_3.3              prettyunits_1.2.0      httr_1.4.7            
+## [100] htmlwidgets_1.6.4      ModelMetrics_1.2.2.2   uwot_0.1.16           
+## [103] pkgconfig_2.0.3        gtable_0.3.4           timeDate_4032.109     
+## [106] lmtest_0.9-40          selectr_0.4-2          furrr_0.3.1           
+## [109] htmltools_0.5.7        dotCall64_1.1-1        bookdown_0.38         
+## [112] scales_1.3.0           png_0.1-8              gower_1.0.1           
+## [115] snakecase_0.11.1       knitr_1.45             tzdb_0.4.0            
+## [118] reshape2_1.4.4         checkmate_2.3.1        nlme_3.1-164          
+## [121] curl_5.2.1             cachem_1.0.8           zoo_1.8-12            
+## [124] KernSmooth_2.23-22     parallel_4.3.3         miniUI_0.1.1.1        
+## [127] desc_1.4.3             pillar_1.9.0           grid_4.3.3            
+## [130] logger_0.2.2           vctrs_0.6.5            RANN_2.6.1            
+## [133] promises_1.2.1         xtable_1.8-4           cluster_2.1.6         
+## [136] evaluate_0.23          cli_3.6.2              compiler_4.3.3        
+## [139] rlang_1.1.3            crayon_1.5.2           future.apply_1.11.1   
+## [142] labeling_0.4.3         plyr_1.8.9             fs_1.6.3              
+## [145] stringi_1.8.3          viridisLite_0.4.2      deldir_2.0-4          
+## [148] assertthat_0.2.1       munsell_0.5.0          lazyeval_0.2.2        
+## [151] spatstat.geom_3.2-9    Matrix_1.6-5           RcppHNSW_0.6.0        
+## [154] hms_1.1.3              patchwork_1.2.0        bit64_4.0.5           
+## [157] shiny_1.8.0            highr_0.10             ROCR_1.0-11           
+## [160] igraph_2.0.2           memoise_2.0.1          bslib_0.6.1           
+## [163] bit_4.0.5              readxl_1.4.3
+
+
+
+ + + + +
+ + + + + + + diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-10-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-10-1.png new file mode 100644 index 0000000..c460318 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-11-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-11-1.png new file mode 100644 index 0000000..aabf936 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-12-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-12-1.png new file mode 100644 index 0000000..2912530 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-13-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-13-1.png new file mode 100644 index 0000000..758188f Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-14-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-14-1.png new file mode 100644 index 0000000..288d69a Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-15-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-15-1.png new file mode 100644 index 0000000..a7ee614 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-1.png new file mode 100644 index 0000000..1a9a05b Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-2.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-2.png new file mode 100644 index 0000000..a42c9bb Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-2.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-3.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-3.png new file mode 100644 index 0000000..fc1400e Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-16-3.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-6-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-6-1.png new file mode 100644 index 0000000..3cde4a5 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-6-2.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-6-2.png new file mode 100644 index 0000000..b5a71a3 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-6-2.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-9-1.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-9-1.png new file mode 100644 index 0000000..714b425 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-9-2.png b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-9-2.png new file mode 100644 index 0000000..3d1d7e1 Binary files /dev/null and b/articles/FunctionalPipelinePathwayActivityLigands_files/figure-html/unnamed-chunk-9-2.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific.html b/articles/FunctionalPipelinePathwaySpecific.html new file mode 100644 index 0000000..a4891e9 --- /dev/null +++ b/articles/FunctionalPipelinePathwaySpecific.html @@ -0,0 +1,453 @@ + + + + + + + + +Functional analysis with MISTy - pathway specific genes • mistyR + + + + + + + + + + + + + + + + Skip to contents + + +
+ + + + +
+
+ + + +
+

Introduction +

+

10X Visium captures spatially resolved transcriptomic profiles in +spots containing multiple cells. In this vignette, we will use the gene +expression information from Visium data to investigate spatial +relationships between pathway-specific genes.

+

Load the necessary packages:

+
+# MISTy 
+library(mistyR) 
+library(future) 
+
+#Seurat 
+library(Seurat)
+library(SeuratObject)
+
+# Data manipulation 
+library(tidyverse) 
+
+# Pathways
+library(decoupleR)
+
+
+

Get and load data +

+

For this showcase, we use a 10X Visium spatial slide from Kuppe et al., +2022, where they created a spatial multi-omic map of human +myocardial infarction. The tissue example data comes from the human +heart of patient 14, which is in a later state after myocardial +infarction. The Seurat object contains, among other things, the +normalized and raw gene counts. First, we have to download and extract +the file:

+
+download.file("https://zenodo.org/records/6580069/files/10X_Visium_ACH005.tar.gz?download=1",
+    destfile = "10X_Visium_ACH005.tar.gz", method = "curl")
+untar("10X_Visium_ACH005.tar.gz")
+

The next step is to load the data, extract the normalized gene +counts, names of genes expressed in at least 5% of the spots, and pixel +coordinates. It is recommended to use pixel coordinates instead of row +and column numbers since the rows are shifted and therefore do not +express the real distance between the spots.

+
+seurat_vs <- readRDS("ACH005/ACH005.rds")
+
+expression <- as.matrix(GetAssayData(seurat_vs, layer = "counts", assay = "SCT"))
+gene_names <- rownames(expression[(rowSums(expression > 0) / ncol(expression)) >= 0.05,]) 
+geometry <- GetTissueCoordinates(seurat_vs, scale = NULL)
+
+
+

Obtain pathway-specific genes +

+

First, we get the top 15 pathway-responsive human genes for each of +the 14 available pathways in PROGENy.We +will focus on two pathways - the VEGF pathway, which is responsible for +promoting the formation of new blood vessels, and the TGF-beta pathway, +which plays a critical role in regulating various cellular processes to +promote tissue repair. We only extracted genes from these pathways that +were present in the count matrix.

+
+progeny <- get_progeny(organism = "human", top = 15)
+
+VEGF_footprints <- progeny %>%
+  filter(source == "VEGF", weight != 0, target %in% gene_names) %>% 
+  pull(target)
+
+TGFb_footprints <- progeny %>%
+  filter(source == "TGFb", weight != 0, target %in% gene_names) %>% 
+  pull(target)
+
+
+

Visualize gene expression +

+

Before continuing with creating the Misty view, we can look at the +slide itself and the expression of some of the selected pathway-reactive +genes.

+
+#Slide
+SpatialPlot(seurat_vs, alpha = 0)
+

+
+# Gene expression examples
+SpatialFeaturePlot(seurat_vs, feature = c("ID1", "NID2"), keep.scale = NULL)
+

+
+
+

Misty views +

+

Now we need to create the Misty views of interest. We are interested +in the relationship of TGF-beta responsive genes in the same spot +(intraview) and the five closest spots (paraview). Therefore we choose +the family constant which will select the five nearest +neighbors. Depending on the goal of the analysis, different families can +be applied.

+

We are also intrigued about the relationship of VEGF-responsive genes +with TGF-beta responsive genes in the broader tissue. For this, we again +create an intra- and paraview, this time for VEGF, but from this view, +we only need the paraview. In the next step, we add it to the TGF-beta +views to achieve our intended views.

+
+TGFb_views <- create_initial_view(t(expression[TGFb_footprints,]) %>% as_tibble()) %>%
+  add_paraview(geometry, l=10, family = "constant")
+
## 
+## Generating paraview using 10 nearest neighbors per unit
+
+VEGF_views <- create_initial_view(t(expression[VEGF_footprints,]) %>% as_tibble()) %>%
+  add_paraview(geometry, l=10, family = "constant")
+
## 
+## Generating paraview using 10 nearest neighbors per unit
+
+misty_views <- TGFb_views %>% 
+  add_views(create_view("paraview.VEGF_10", VEGF_views[["paraview.10"]]$data, "para.VEGFn.10"))
+

Then run MISTy and collect the results:

+
+run_misty(misty_views, "result/vignette_functional_pipeline") 
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/result/vignette_functional_pipeline"
+
+misty_results <- collect_results("result/vignette_functional_pipeline")
+
+
+

Downstream analysis +

+

With the collected results, we can now answer the following +questions:

+
+

1. To what extent can the surrounding tissues’ gene expression +explain the gene expression of the spot compared to the intraview? +

+

Here we can look at two different statistics: multi.R2 shows the +total variance explained by the multiview model. gain.R2 shows the +increase in explainable variance from the paraview.

+
+misty_results %>%
+  plot_improvement_stats("gain.R2") %>%
+  plot_improvement_stats("multi.R2")
+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

The paraview particularly increases the explained variance for COMP, +ID1, and COL4A1. In general, the significant gain in R2 can be +interpreted as the following:

+

“We can better explain the expression of marker X when we consider +additional views other than the intrinsic view.”

+

To see the individual contributions of the views we can use:

+
+misty_results %>% plot_view_contributions()
+

+
+
+

2. What are the specific relations that can explain gene +expression? +

+

The importance of the markers from each viewpoint as predictors of +the expression of the intrinsic markers of the TGF-beta pathway can be +shown individually to explain the contributions.

+

First, for the intrinsic view:

+
+misty_results %>%
+  plot_interaction_heatmap("intra", clean = TRUE)
+

+

We can observe that COL4A1 and ID1 are a significant predictor for +the expression of several genes when in the same spot. ID1 is an +important predictor for SMAD7. Let’s take a look at the spatial +distribution of these genes in the tissue slide:

+
+SpatialFeaturePlot(seurat_vs, features = c("ID1", "SMAD7"), image.alpha = 0)
+

+

We can see that in spots with ID1 mRNA often SMAD7 is also +expressed.

+

Now we repeat this analysis with the TGF-beta paraview. With +trim we display only targets with a value above 0.5 for +gain.R2. To set an importance threshold we apply +cutoff.

+
+misty_results %>%
+  plot_interaction_heatmap(view = "para.10", 
+                           clean = TRUE, 
+                           trim = 0.5,
+                           trim.measure = "gain.R2",
+                           cutoff = 1.25)
+

+

From the gain.R2 we know that the paraview contributes a +lot to explaining the ID1 expression. Let’s visualize ID1 and its most +important predictor COL4A1:

+
+SpatialFeaturePlot(seurat_vs, features = c("COL4A1", "ID1"), image.alpha = 0)
+

+

The plots show us that, in some places, the localization of the mRNA +overlaps.

+

Now we will analyze the last view, the VEGF-paraview:

+
+misty_results %>%
+  plot_interaction_heatmap(view = "para.VEGFn.10", clean = TRUE)
+

+

EPHA3 is a predictor of both ID1 and COL4A1.

+
+SpatialFeaturePlot(seurat_vs, keep.scale = NULL, features = c("EPHA3","ID1"), image.alpha = 0)
+

+

A similar distribution as for ID1 can be observed for the expression +of EPHA3.

+
+
+
+

See also +

+

browseVignettes("mistyR")

+
+
+

Session Info +

+

Here is the output of sessionInfo() at the point when +this document was compiled.

+ +
## R version 4.3.3 (2024-02-29)
+## Platform: x86_64-pc-linux-gnu (64-bit)
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices utils     datasets  methods   base     
+## 
+## other attached packages:
+##  [1] distances_0.1.10   decoupleR_2.8.0    lubridate_1.9.3    forcats_1.0.0     
+##  [5] stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2        readr_2.1.5       
+##  [9] tidyr_1.3.1        tibble_3.2.1       ggplot2_3.5.0      tidyverse_2.0.0   
+## [13] Seurat_5.0.2       SeuratObject_5.0.1 sp_2.1-3           future_1.33.1     
+## [17] mistyR_1.10.0      BiocStyle_2.30.0  
+## 
+## loaded via a namespace (and not attached):
+##   [1] RcppAnnoy_0.0.22       splines_4.3.3          later_1.3.2           
+##   [4] filelock_1.0.3         R.oo_1.26.0            cellranger_1.1.0      
+##   [7] polyclip_1.10-6        hardhat_1.3.1          pROC_1.18.5           
+##  [10] rpart_4.1.23           fastDummies_1.7.3      lifecycle_1.0.4       
+##  [13] globals_0.16.2         lattice_0.22-5         vroom_1.6.5           
+##  [16] MASS_7.3-60.0.1        backports_1.4.1        magrittr_2.0.3        
+##  [19] plotly_4.10.4          sass_0.4.8             rmarkdown_2.25        
+##  [22] jquerylib_0.1.4        yaml_2.3.8             rlist_0.4.6.2         
+##  [25] httpuv_1.6.14          sctransform_0.4.1      spam_2.10-0           
+##  [28] spatstat.sparse_3.0-3  reticulate_1.35.0      cowplot_1.1.3         
+##  [31] pbapply_1.7-2          RColorBrewer_1.1-3     abind_1.4-5           
+##  [34] rvest_1.0.4            Rtsne_0.17             R.utils_2.12.3        
+##  [37] nnet_7.3-19            rappdirs_0.3.3         ipred_0.9-14          
+##  [40] lava_1.7.3             ggrepel_0.9.5          irlba_2.3.5.1         
+##  [43] listenv_0.9.1          spatstat.utils_3.0-4   goftest_1.2-3         
+##  [46] RSpectra_0.16-1        spatstat.random_3.2-3  fitdistrplus_1.1-11   
+##  [49] parallelly_1.37.1      pkgdown_2.0.7          leiden_0.4.3.1        
+##  [52] codetools_0.2-19       xml2_1.3.6             tidyselect_1.2.0      
+##  [55] farver_2.1.1           stats4_4.3.3           matrixStats_1.2.0     
+##  [58] spatstat.explore_3.2-6 jsonlite_1.8.8         caret_6.0-94          
+##  [61] ellipsis_0.3.2         progressr_0.14.0       iterators_1.0.14      
+##  [64] ggridges_0.5.6         survival_3.5-8         systemfonts_1.0.5     
+##  [67] foreach_1.5.2          tools_4.3.3            progress_1.2.3        
+##  [70] ragg_1.2.7             ica_1.0-3              Rcpp_1.0.12           
+##  [73] glue_1.7.0             prodlim_2023.08.28     gridExtra_2.3         
+##  [76] ranger_0.16.0          xfun_0.42              withr_3.0.0           
+##  [79] BiocManager_1.30.22    fastmap_1.1.1          fansi_1.0.6           
+##  [82] digest_0.6.34          timechange_0.3.0       R6_2.5.1              
+##  [85] mime_0.12              textshaping_0.3.7      colorspace_2.1-0      
+##  [88] scattermore_1.2        tensor_1.5             spatstat.data_3.0-4   
+##  [91] R.methodsS3_1.8.2      utf8_1.2.4             generics_0.1.3        
+##  [94] recipes_1.0.10         data.table_1.15.2      class_7.3-22          
+##  [97] ridge_3.3              prettyunits_1.2.0      httr_1.4.7            
+## [100] htmlwidgets_1.6.4      ModelMetrics_1.2.2.2   uwot_0.1.16           
+## [103] pkgconfig_2.0.3        gtable_0.3.4           timeDate_4032.109     
+## [106] lmtest_0.9-40          selectr_0.4-2          furrr_0.3.1           
+## [109] OmnipathR_3.10.1       htmltools_0.5.7        dotCall64_1.1-1       
+## [112] bookdown_0.38          scales_1.3.0           png_0.1-8             
+## [115] gower_1.0.1            knitr_1.45             tzdb_0.4.0            
+## [118] reshape2_1.4.4         checkmate_2.3.1        nlme_3.1-164          
+## [121] curl_5.2.1             cachem_1.0.8           zoo_1.8-12            
+## [124] KernSmooth_2.23-22     parallel_4.3.3         miniUI_0.1.1.1        
+## [127] desc_1.4.3             pillar_1.9.0           grid_4.3.3            
+## [130] logger_0.2.2           vctrs_0.6.5            RANN_2.6.1            
+## [133] promises_1.2.1         xtable_1.8-4           cluster_2.1.6         
+## [136] evaluate_0.23          cli_3.6.2              compiler_4.3.3        
+## [139] rlang_1.1.3            crayon_1.5.2           future.apply_1.11.1   
+## [142] labeling_0.4.3         plyr_1.8.9             fs_1.6.3              
+## [145] stringi_1.8.3          viridisLite_0.4.2      deldir_2.0-4          
+## [148] assertthat_0.2.1       munsell_0.5.0          lazyeval_0.2.2        
+## [151] spatstat.geom_3.2-9    Matrix_1.6-5           RcppHNSW_0.6.0        
+## [154] hms_1.1.3              patchwork_1.2.0        bit64_4.0.5           
+## [157] shiny_1.8.0            highr_0.10             ROCR_1.0-11           
+## [160] igraph_2.0.2           memoise_2.0.1          bslib_0.6.1           
+## [163] bit_4.0.5              readxl_1.4.3
+
+
+
+ + + + +
+ + + + + + + diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-10-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-10-1.png new file mode 100644 index 0000000..a636ab1 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-11-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-11-1.png new file mode 100644 index 0000000..dc0debf Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-12-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-12-1.png new file mode 100644 index 0000000..1c4ed24 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-13-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-13-1.png new file mode 100644 index 0000000..018a897 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-14-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-14-1.png new file mode 100644 index 0000000..75b8105 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-15-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-15-1.png new file mode 100644 index 0000000..0e098ce Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-5-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-5-1.png new file mode 100644 index 0000000..3cde4a5 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-5-2.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-5-2.png new file mode 100644 index 0000000..cd17ead Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-5-2.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-8-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-8-1.png new file mode 100644 index 0000000..e756e15 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-8-2.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-8-2.png new file mode 100644 index 0000000..87c0302 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-8-2.png differ diff --git a/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-9-1.png b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-9-1.png new file mode 100644 index 0000000..c7fb5f9 Binary files /dev/null and b/articles/FunctionalPipelinePathwaySpecific_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L.html b/articles/MistyRStructuralAnalysisPipelineC2L.html new file mode 100644 index 0000000..fcc2091 --- /dev/null +++ b/articles/MistyRStructuralAnalysisPipelineC2L.html @@ -0,0 +1,442 @@ + + + + + + + + +Structural analysis with MISTy - based on cell2location deconvolution • mistyR + + + + + + + + + + + + + + + + Skip to contents + + +
+ + + + +
+
+ + + +
+

Introduction +

+

MISTy is designed to analyze spatial omics datasets within and +between distinct spatial contexts referred to as views. This analysis +can focus solely on structural information. Spatial transcriptomic +methods such as 10x Visium capture information from areas containing +multiple cells. Then, deconvolution is applied to relate the measured +data of the spots back to individual cells. A commonly used tool for +this deconvolution step is cell2location.

+

This vignette presents a workflow for the analysis of structural +data, guiding users through the application of mistyR to +the results of cell2location deconvolution.

+

Load the necessary packages:

+
+# MISTy 
+library(mistyR) 
+library(future) 
+
+#Seurat 
+library(Seurat)
+library(SeuratObject)
+
+# Data manipulation 
+library(tidyverse) 
+
+# Distances
+library(distances)
+
+
+

Get and load the data +

+

For this showcase, we use a 10X Visium spatial slide from Kuppe et al., +2022, where they created a spatial multi-omic map of human +myocardial infarction. The example data comes from a human heart in a +later state after myocardial infarction that was used in the study. The +Seurat object contains, among other things, the coordinates of the spots +on the slides and their cellular composition estimated by cell2location. +First, we have to download and extract the file:

+
+download.file("https://zenodo.org/records/6580069/files/10X_Visium_ACH005.tar.gz?download=1",
+    destfile = "10X_Visium_ACH005.tar.gz", method = "curl")
+untar("10X_Visium_ACH005.tar.gz")
+

The next step is to load the data and extract the cell composition +and location of the spots. The rows are shifted, which means that the +real distances between two spots are not always the same. It is +therefore advantageous to use the pixel coordinates instead of row and +column numbers, as the distances between these are represented +accurately.

+
+# Load file into R
+seurat_vs <- readRDS("ACH005/ACH005.rds")
+
+# Extract the cell composition
+composition <- as_tibble(t(seurat_vs[["c2l_props"]]$data)) 
+
+# Extract the location data
+geometry <- GetTissueCoordinates(seurat_vs, cols = c("imagerow", "imagecol"), scale = NULL)
+
+
+

Visualize cell proportion in spots +

+

First, we visually explore the slide itself and then through a +graphical representation of cell-type proportions at each spot. When +adding interactive = TRUE to +SpatialFeaturePlot we can cycle through the proportions of +the different celltypes.

+
+# Tissue Slide
+SpatialPlot(seurat_vs, keep.scale = NULL, alpha = 0) 
+

+
+# Cell type proportions
+DefaultAssay(seurat_vs) <- "c2l_props"
+SpatialFeaturePlot(seurat_vs, keep.scale = NULL, features = "CM") 
+

+

Based on the plots, we can observe that some cell types are found +more frequently than others. Additionally, we can identify patterns in +the distribution of cells, with some being widespread across the entire +slide while others are concentrated in specific areas. Furthermore, +there are cell types that share a similar distribution.

+
+
+

MISTy views +

+

First, we need to define an intraview that captures the cell type +proportions within a spot. To capture the distribution of cell type +proportions in the surrounding tissue, we add a paraview. For this +vignette, the radius we choose is the distance to the nearest neighbor +plus the standard deviation. We calculate the weights of each spot with +family = gaussian. Then we run MISTy and collect the +results.

+
+# Calculating the radius
+geom_dist <- as.matrix(distances(geometry))  
+dist_nn <- apply(geom_dist, 1, function(x) (sort(x)[2]))
+paraview_radius <- ceiling(mean(dist_nn+ sd(dist_nn)))
+
+# Create views
+heart_views <- create_initial_view(composition) %>%
+  add_paraview(geometry, l= paraview_radius, family = "gaussian")
+
+# Run misty and collect results
+run_misty(heart_views, "result/vignette_structural_pipeline")
+
## [1] "/home/runner/work/mistyR/mistyR/vignettes/result/vignette_structural_pipeline"
+
+misty_results <- collect_results("result/vignette_structural_pipeline")
+
+
+

Downstream Analysis +

+

With the collected results, we can now answer following +questions:

+
+

1. To what extent can the occurring cell types of the surrounding +tissue explain the cell type composition of the spot compared to the +intraview? +

+

Here we can look at two different statistics: multi.R2 +shows the total variance explained by the multiview model. +gain.R2 shows the increase in explainable variance from to +the paraview.

+
+misty_results %>%
+  plot_improvement_stats("multi.R2") %>% 
+  plot_improvement_stats("gain.R2")
+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

The paraview particularly increases the explained variance for +adipocytes and mast cells. In general, the significant gain in +R2 can be interpreted as the following:

+

“We can better explain the expression of marker X when we consider +additional views other than the intrinsic view.”

+
+
+

2. What are the specific relations that can explain the +contributions? +

+

To explain the contributions, we can visualize the importance of each +cell type in predicting the cell type distribution for each view +separately.

+

First, for the intrinsic view:

+
+misty_results %>% plot_interaction_heatmap(view = "intra", clean = TRUE)
+

+

We can observe that cardiomyocytes are a significant predictor for +several cell types when in the same spot. To identify the target with +the best prediction by cardiomyocytes, we can view the importance values +as follows:

+
+misty_results$importances.aggregated %>%
+  filter(view == "intra", Predictor == "CM") %>%
+  arrange(-Importance)
+
## # A tibble: 11 × 5
+##    view  Predictor Target   Importance nsamples
+##    <chr> <chr>     <chr>         <dbl>    <int>
+##  1 intra CM        Fib          2.74          1
+##  2 intra CM        vSMCs        2.43          1
+##  3 intra CM        prolif       2.23          1
+##  4 intra CM        Myeloid      2.21          1
+##  5 intra CM        Endo         2.15          1
+##  6 intra CM        Mast         2.02          1
+##  7 intra CM        PC           1.90          1
+##  8 intra CM        Lymphoid     0.844         1
+##  9 intra CM        Adipo       -0.0416        1
+## 10 intra CM        Neuronal    -0.0865        1
+## 11 intra CM        CM          NA             1
+

Let’s take a look at the spatial distribution of these cell types in +the tissue slide:

+
+SpatialFeaturePlot(seurat_vs, keep.scale = NULL, features = c("Fib","CM"), image.alpha = 0)
+

+

We can observe that areas with high proportions of cardiomyocytes +have low proportions of fibroblasts and vice versa.

+

Now we repeat this analysis with the paraview. With trim +we display only targets with a value above 1.75 for +gain.R2. To set an importance threshold we apply +cutoff.

+
+misty_results %>% plot_interaction_heatmap(view = "para.126", clean = TRUE, 
+                                           trim = 1.75, trim.measure = "gain.R2",
+                                           cutoff = 0.5) 
+

+

Here, we select the target adipocytes, as we know from previous +analysis that the paraview contributes a large part to explaining its +distribution. The best predictor for adipocytes are proliferating +cells:

+
+SpatialFeaturePlot(seurat_vs, keep.scale = NULL, features = c("prolif","Adipo"), image.alpha = 0)
+

+

The plots show us that, in some places, the localization of the two +cell types overlap.

+
+
+
+

See also +

+

browseVignettes("mistyR")

+
+
+

Session Info +

+

Here is the output of sessionInfo() at the point when +this document was compiled.

+ +
## R version 4.3.3 (2024-02-29)
+## Platform: x86_64-pc-linux-gnu (64-bit)
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices utils     datasets  methods   base     
+## 
+## other attached packages:
+##  [1] distances_0.1.10   lubridate_1.9.3    forcats_1.0.0      stringr_1.5.1     
+##  [5] dplyr_1.1.4        purrr_1.0.2        readr_2.1.5        tidyr_1.3.1       
+##  [9] tibble_3.2.1       ggplot2_3.5.0      tidyverse_2.0.0    Seurat_5.0.2      
+## [13] SeuratObject_5.0.1 sp_2.1-3           future_1.33.1      mistyR_1.10.0     
+## [17] BiocStyle_2.30.0  
+## 
+## loaded via a namespace (and not attached):
+##   [1] RcppAnnoy_0.0.22       splines_4.3.3          later_1.3.2           
+##   [4] filelock_1.0.3         R.oo_1.26.0            polyclip_1.10-6       
+##   [7] hardhat_1.3.1          pROC_1.18.5            rpart_4.1.23          
+##  [10] fastDummies_1.7.3      lifecycle_1.0.4        vroom_1.6.5           
+##  [13] globals_0.16.2         lattice_0.22-5         MASS_7.3-60.0.1       
+##  [16] magrittr_2.0.3         plotly_4.10.4          sass_0.4.8            
+##  [19] rmarkdown_2.25         jquerylib_0.1.4        yaml_2.3.8            
+##  [22] rlist_0.4.6.2          httpuv_1.6.14          sctransform_0.4.1     
+##  [25] spam_2.10-0            spatstat.sparse_3.0-3  reticulate_1.35.0     
+##  [28] cowplot_1.1.3          pbapply_1.7-2          RColorBrewer_1.1-3    
+##  [31] abind_1.4-5            Rtsne_0.17             R.utils_2.12.3        
+##  [34] nnet_7.3-19            ipred_0.9-14           lava_1.7.3            
+##  [37] ggrepel_0.9.5          irlba_2.3.5.1          listenv_0.9.1         
+##  [40] spatstat.utils_3.0-4   goftest_1.2-3          RSpectra_0.16-1       
+##  [43] spatstat.random_3.2-3  fitdistrplus_1.1-11    parallelly_1.37.1     
+##  [46] pkgdown_2.0.7          leiden_0.4.3.1         codetools_0.2-19      
+##  [49] tidyselect_1.2.0       farver_2.1.1           stats4_4.3.3          
+##  [52] matrixStats_1.2.0      spatstat.explore_3.2-6 jsonlite_1.8.8        
+##  [55] caret_6.0-94           ellipsis_0.3.2         progressr_0.14.0      
+##  [58] ggridges_0.5.6         survival_3.5-8         iterators_1.0.14      
+##  [61] systemfonts_1.0.5      foreach_1.5.2          tools_4.3.3           
+##  [64] ragg_1.2.7             ica_1.0-3              Rcpp_1.0.12           
+##  [67] glue_1.7.0             prodlim_2023.08.28     gridExtra_2.3         
+##  [70] xfun_0.42              ranger_0.16.0          withr_3.0.0           
+##  [73] BiocManager_1.30.22    fastmap_1.1.1          fansi_1.0.6           
+##  [76] digest_0.6.34          timechange_0.3.0       R6_2.5.1              
+##  [79] mime_0.12              textshaping_0.3.7      colorspace_2.1-0      
+##  [82] scattermore_1.2        tensor_1.5             spatstat.data_3.0-4   
+##  [85] R.methodsS3_1.8.2      utf8_1.2.4             generics_0.1.3        
+##  [88] data.table_1.15.2      recipes_1.0.10         class_7.3-22          
+##  [91] httr_1.4.7             ridge_3.3              htmlwidgets_1.6.4     
+##  [94] ModelMetrics_1.2.2.2   uwot_0.1.16            pkgconfig_2.0.3       
+##  [97] gtable_0.3.4           timeDate_4032.109      lmtest_0.9-40         
+## [100] furrr_0.3.1            htmltools_0.5.7        dotCall64_1.1-1       
+## [103] bookdown_0.38          scales_1.3.0           png_0.1-8             
+## [106] gower_1.0.1            knitr_1.45             tzdb_0.4.0            
+## [109] reshape2_1.4.4         nlme_3.1-164           cachem_1.0.8          
+## [112] zoo_1.8-12             KernSmooth_2.23-22     parallel_4.3.3        
+## [115] miniUI_0.1.1.1         desc_1.4.3             pillar_1.9.0          
+## [118] grid_4.3.3             vctrs_0.6.5            RANN_2.6.1            
+## [121] promises_1.2.1         xtable_1.8-4           cluster_2.1.6         
+## [124] evaluate_0.23          cli_3.6.2              compiler_4.3.3        
+## [127] crayon_1.5.2           rlang_1.1.3            future.apply_1.11.1   
+## [130] labeling_0.4.3         plyr_1.8.9             fs_1.6.3              
+## [133] stringi_1.8.3          viridisLite_0.4.2      deldir_2.0-4          
+## [136] assertthat_0.2.1       munsell_0.5.0          lazyeval_0.2.2        
+## [139] spatstat.geom_3.2-9    Matrix_1.6-5           RcppHNSW_0.6.0        
+## [142] hms_1.1.3              patchwork_1.2.0        bit64_4.0.5           
+## [145] shiny_1.8.0            highr_0.10             ROCR_1.0-11           
+## [148] igraph_2.0.2           memoise_2.0.1          bslib_0.6.1           
+## [151] bit_4.0.5
+
+
+
+ + + + +
+ + + + + + + diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-10-1.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-10-1.png new file mode 100644 index 0000000..f7f5af7 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-11-1.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-11-1.png new file mode 100644 index 0000000..3428c0f Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-4-1.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-4-1.png new file mode 100644 index 0000000..3cde4a5 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-4-2.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-4-2.png new file mode 100644 index 0000000..6193d28 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-4-2.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-6-1.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-6-1.png new file mode 100644 index 0000000..ec76fe8 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-6-2.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-6-2.png new file mode 100644 index 0000000..79e21c4 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-6-2.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-7-1.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-7-1.png new file mode 100644 index 0000000..95f6010 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-9-1.png b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-9-1.png new file mode 100644 index 0000000..96b3fc4 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineC2L_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT.html b/articles/MistyRStructuralAnalysisPipelineDOT.html new file mode 100644 index 0000000..6a33e0c --- /dev/null +++ b/articles/MistyRStructuralAnalysisPipelineDOT.html @@ -0,0 +1,482 @@ + + + + + + + + +Structural analysis with MISTy - based on DOT deconvolution • mistyR + + + + + + + + + + + + + + + + Skip to contents + + +
+ + + + +
+
+ + + +
+

Introduction +

+

MISTy is designed to analyze spatial omics datasets within and +between distinct spatial contexts referred to as views. This analysis +can focus solely on structural information. Spatial transcriptomic +methods such as Visium capture information from areas containing +multiple cells. Then, deconvolution is applied to relate the measured +data of the spots back to individual cells. In this vignette we will use +the R package DOT for +deconvolution.

+

This vignette presents a workflow for the analysis of structural +data, guiding users through the application of mistyR to +the results of DOT deconvolution.

+

The package DOT can be installed from Github +remotes::install_github("saezlab/DOT").

+

Load the necessary packages:

+
+# MISTy 
+library(mistyR) 
+library(future) 
+
+# DOT
+library(DOT)
+
+# Loading experiment data 
+library(Seurat)
+library(SeuratObject)
+
+# Data manipulation 
+library(tidyverse) 
+
+# Distances
+library(distances)
+
+
+

Get and load the data +

+

For this showcase, we use a 10X Visium spatial slide from Kuppe et al., +2022, where they created a spatial multi-omic map of human +myocardial infarction. The tissue example data comes from the human +heart of patient 14 which is in a later state after myocardial +infarction. The Seurat object contains, among other things, the spot +coordinates on the slides which we will need for decomposition First, we +have to download and extract the file:

+
+# Download the data
+download.file("https://zenodo.org/records/6580069/files/10X_Visium_ACH005.tar.gz?download=1",
+    destfile = "10X_Visium_ACH005.tar.gz", method = "curl")
+untar("10X_Visium_ACH005.tar.gz")
+

The next step is to load the data and extract the location of the +spots. The rows are shifted, which means that the real distances between +two spots are not always the same. It is therefore advantageous to use +the pixel coordinates instead of row and column numbers, as the +distances between these are represented accurately.

+
+spatial_data <- readRDS("ACH005/ACH005.rds")
+
+geometry <- GetTissueCoordinates(spatial_data, cols = c("imagerow", "imagecol"), scale = NULL)
+

For deconvolution, we additionally need a reference single-cell data +set containing a gene x cell count matrix and a vector containing the +corresponding cell annotations. Kuppe et al., 2022, obtained from each +sample isolated nuclei from the remaining tissue that they used for +snRNA-seq. The data corresponding to the same patient as the spatial +data will be used as reference data in DOT. First download +the file:

+
+download.file("https://www.dropbox.com/scl/fi/sq24xaavxplkc98iimvpz/hca_p14.rds?rlkey=h8cyxzhypavkydbv0z3pqadus&dl=1",
+              destfile = "hca_p14.rds",
+              mode = "wb")
+

Now load the data. From this, we retrieve a gene x cell count matrix +and the respective cell annotations.

+
+ref_data <- readRDS("hca_p14.rds")
+
+ref_counts_P14 <- ref_data$counts
+ref_ct <- ref_data$celltypes
+
+
+

Deconvolution with DOT +

+

Next, we need to set up the DOT object. The two inputs we need are +the count matrix and pixel coordinates of the spatial data and the count +matrix and cell annotations of the single-cell reference data.

+
+dot.srt <-setup.srt(srt_data = spatial_data@assays$Spatial@counts, srt_coords = geometry) 
+
+dot.ref <- setup.ref(ref_data = ref_counts_P14, ref_annotations = ref_ct, 10)
+
+dot <- create.DOT(dot.srt, dot.ref)
+

Now we can carry out deconvolution:

+
+# Run DOT
+dot <- run.DOT.lowresolution(dot)
+

The results can be found under dot@weights. To obtain +the calculated cell-type proportion per spot, we normalize the result to +a row sum of 1.

+
+# Normalize DOT results
+DOT_weights <- sweep(dot@weights, 1, rowSums(dot@weights), "/")
+
+
+

Visualize cell proportion in spots +

+

Now we can visually explore the slide itself and the abundance of +cell types at each spot.

+
+# Tissue Slide
+SpatialPlot(spatial_data, keep.scale = NULL, alpha = 0) 
+

+
+# Results DOT
+draw_maps(geometry, 
+          DOT_weights, 
+          background = "white", 
+          normalize = FALSE, 
+          ncol = 3, 
+          viridis_option = "viridis")
+

+

Based on the plots, we can observe that some cell types are found +more frequently than others. Additionally, we can identify patterns in +the distribution of cells, with some being widespread across the entire +slide while others are concentrated in specific areas. Furthermore, +there are cell types that share a similar distribution.

+
+
+

MISTy views +

+
+
+

Downstream Analysis +

+

With the collected results, we can now answer the following +questions:

+
+

1. To what extent can the occurring cell types of the surrounding +tissue explain the cell type composition of the spot compared to the +intraview? +

+

Here we can look at two different statistics: multi.R2 +shows the total variance explained by the multiview model. +gain.R2 shows the increase in explainable variance from the +paraview.

+
+misty_results %>%
+  plot_improvement_stats("multi.R2") %>% 
+  plot_improvement_stats("gain.R2")
+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+
## Warning: Removed 11 rows containing missing values or values outside the scale range
+## (`geom_segment()`).
+

+

The paraview particularly increases the explained variance for +adipocytes and mast cells. In general, the significant gain in +R2 can be interpreted as the following:

+

“We can better explain the expression of marker X when we consider +additional views other than the intrinsic view.”

+
+
+

2. What are the specific relations that can explain the +contributions? +

+

To explain the contributions, we can visualize the importance of each +cell type in predicting the cell type distribution for each view +separately. With trim, we display only targets with a value +above 50 for multi.R2. To set an importance threshold we +would apply cutoff.

+

First, for the intrinsic view:

+
+misty_results %>% plot_interaction_heatmap(view = "intra", 
+                                           clean = TRUE,
+                                           trim.measure = "multi.R2",
+                                           trim = 50)
+

+

We can observe that cardiomyocytes are a significant predictor for +some cell types when in the same spot. To identify the target with the +best prediction by cardiomyocytes, we can view the importance values as +follows:

+
+misty_results$importances.aggregated %>%
+  filter(view == "intra", Predictor == "CM") %>%
+  arrange(-Importance)
+
## # A tibble: 11 × 5
+##    view  Predictor Target   Importance nsamples
+##    <chr> <chr>     <chr>         <dbl>    <int>
+##  1 intra CM        Fib          2.82          1
+##  2 intra CM        Endo         2.62          1
+##  3 intra CM        PC           2.59          1
+##  4 intra CM        vSMCs        2.57          1
+##  5 intra CM        Myeloid      2.48          1
+##  6 intra CM        Adipo        2.37          1
+##  7 intra CM        Mast         1.31          1
+##  8 intra CM        Neuronal     1.22          1
+##  9 intra CM        prolif       0.361         1
+## 10 intra CM        Lymphoid     0.0519        1
+## 11 intra CM        CM          NA             1
+

Let’s take a look at the spatial distribution of Cardiomyocytes and +their most important target, fibroblasts, in the tissue slide:

+
+draw_maps(geometry, 
+          DOT_weights[, c("Fib", "CM")], 
+          background = "white", 
+          size = 1.25, 
+          normalize = FALSE, 
+          ncol = 1,
+          viridis_option = "viridis")
+

+

We can observe that areas with high proportions of cardiomyocytes +have low proportions of fibroblasts and vice versa.

+

Now we repeat this analysis with the paraview:

+
+misty_results %>% plot_interaction_heatmap(view = "para.126", 
+                                           clean = TRUE, 
+                                           trim = 0.1,
+                                           trim.measure = "gain.R2") 
+

+

Here, we select the target adipocytes, as we know from previous +analysis that the paraview contributes a large part to explaining its +distribution. The best predictor for adipocytes are Myeloid cells. To +better identify the localization of the two cell types, we set the color +scaling to a smaller range, as there are a few spots with a high +proportion, which makes the distribution of spots with a low proportion +difficult to recognize.

+
+draw_maps(geometry,
+          DOT_weights[, c("Myeloid","Adipo")],
+          background = "white",
+          size = 1.25,
+          normalize = FALSE, 
+          ncol = 1,
+          viridis_option = "viridis") +
+       scale_colour_viridis_c(limits = c(0,0.33))
+

+

The plots show us that, in some places, the localization of the two +cell types overlap.

+
+
+
+

See also +

+

browseVignettes("mistyR")

+
+
+

Session Info +

+

Here is the output of sessionInfo() at the point when +this document was compiled.

+ +
## R version 4.3.3 (2024-02-29)
+## Platform: x86_64-pc-linux-gnu (64-bit)
+## Running under: Ubuntu 22.04.4 LTS
+## 
+## Matrix products: default
+## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## 
+## locale:
+##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
+##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
+##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
+## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
+## 
+## time zone: UTC
+## tzcode source: system (glibc)
+## 
+## attached base packages:
+## [1] stats     graphics  grDevices utils     datasets  methods   base     
+## 
+## other attached packages:
+##  [1] distances_0.1.10   lubridate_1.9.3    forcats_1.0.0      stringr_1.5.1     
+##  [5] dplyr_1.1.4        purrr_1.0.2        readr_2.1.5        tidyr_1.3.1       
+##  [9] tibble_3.2.1       ggplot2_3.5.0      tidyverse_2.0.0    Seurat_5.0.2      
+## [13] SeuratObject_5.0.1 sp_2.1-3           DOT_0.0.0.9000     future_1.33.1     
+## [17] mistyR_1.10.0      BiocStyle_2.30.0  
+## 
+## loaded via a namespace (and not attached):
+##   [1] RcppAnnoy_0.0.22       splines_4.3.3          later_1.3.2           
+##   [4] filelock_1.0.3         fields_15.2            R.oo_1.26.0           
+##   [7] polyclip_1.10-6        hardhat_1.3.1          pROC_1.18.5           
+##  [10] rpart_4.1.23           fastDummies_1.7.3      lifecycle_1.0.4       
+##  [13] vroom_1.6.5            globals_0.16.2         lattice_0.22-5        
+##  [16] MASS_7.3-60.0.1        magrittr_2.0.3         plotly_4.10.4         
+##  [19] sass_0.4.8             rmarkdown_2.25         jquerylib_0.1.4       
+##  [22] yaml_2.3.8             rlist_0.4.6.2          httpuv_1.6.14         
+##  [25] sctransform_0.4.1      spam_2.10-0            spatstat.sparse_3.0-3 
+##  [28] reticulate_1.35.0      cowplot_1.1.3          pbapply_1.7-2         
+##  [31] RColorBrewer_1.1-3     maps_3.4.2             abind_1.4-5           
+##  [34] Rtsne_0.17             R.utils_2.12.3         nnet_7.3-19           
+##  [37] ipred_0.9-14           lava_1.7.3             ggrepel_0.9.5         
+##  [40] irlba_2.3.5.1          listenv_0.9.1          spatstat.utils_3.0-4  
+##  [43] goftest_1.2-3          RSpectra_0.16-1        spatstat.random_3.2-3 
+##  [46] fitdistrplus_1.1-11    parallelly_1.37.1      pkgdown_2.0.7         
+##  [49] leiden_0.4.3.1         codetools_0.2-19       tidyselect_1.2.0      
+##  [52] farver_2.1.1           stats4_4.3.3           matrixStats_1.2.0     
+##  [55] spatstat.explore_3.2-6 jsonlite_1.8.8         caret_6.0-94          
+##  [58] ellipsis_0.3.2         progressr_0.14.0       ggridges_0.5.6        
+##  [61] survival_3.5-8         iterators_1.0.14       systemfonts_1.0.5     
+##  [64] foreach_1.5.2          tools_4.3.3            ragg_1.2.7            
+##  [67] ica_1.0-3              Rcpp_1.0.12            glue_1.7.0            
+##  [70] prodlim_2023.08.28     gridExtra_2.3          xfun_0.42             
+##  [73] ranger_0.16.0          withr_3.0.0            BiocManager_1.30.22   
+##  [76] fastmap_1.1.1          fansi_1.0.6            digest_0.6.34         
+##  [79] timechange_0.3.0       R6_2.5.1               mime_0.12             
+##  [82] textshaping_0.3.7      colorspace_2.1-0       scattermore_1.2       
+##  [85] tensor_1.5             spatstat.data_3.0-4    R.methodsS3_1.8.2     
+##  [88] utf8_1.2.4             generics_0.1.3         data.table_1.15.2     
+##  [91] recipes_1.0.10         class_7.3-22           httr_1.4.7            
+##  [94] ridge_3.3              htmlwidgets_1.6.4      ModelMetrics_1.2.2.2  
+##  [97] uwot_0.1.16            pkgconfig_2.0.3        gtable_0.3.4          
+## [100] timeDate_4032.109      lmtest_0.9-40          furrr_0.3.1           
+## [103] htmltools_0.5.7        dotCall64_1.1-1        bookdown_0.38         
+## [106] scales_1.3.0           png_0.1-8              gower_1.0.1           
+## [109] knitr_1.45             tzdb_0.4.0             reshape2_1.4.4        
+## [112] nlme_3.1-164           cachem_1.0.8           zoo_1.8-12            
+## [115] KernSmooth_2.23-22     parallel_4.3.3         miniUI_0.1.1.1        
+## [118] desc_1.4.3             pillar_1.9.0           grid_4.3.3            
+## [121] vctrs_0.6.5            RANN_2.6.1             promises_1.2.1        
+## [124] xtable_1.8-4           cluster_2.1.6          evaluate_0.23         
+## [127] cli_3.6.2              compiler_4.3.3         crayon_1.5.2          
+## [130] rlang_1.1.3            future.apply_1.11.1    labeling_0.4.3        
+## [133] plyr_1.8.9             fs_1.6.3               stringi_1.8.3         
+## [136] viridisLite_0.4.2      deldir_2.0-4           assertthat_0.2.1      
+## [139] munsell_0.5.0          lazyeval_0.2.2         spatstat.geom_3.2-9   
+## [142] Matrix_1.6-5           RcppHNSW_0.6.0         hms_1.1.3             
+## [145] patchwork_1.2.0        bit64_4.0.5            shiny_1.8.0           
+## [148] highr_0.10             ROCR_1.0-11            igraph_2.0.2          
+## [151] memoise_2.0.1          bslib_0.6.1            bit_4.0.5
+
+
+
+ + + + +
+ + + + + + + diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-11-1.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-11-1.png new file mode 100644 index 0000000..16c46e5 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-11-2.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-11-2.png new file mode 100644 index 0000000..695c9d5 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-11-2.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-12-1.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-12-1.png new file mode 100644 index 0000000..74bbb65 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-14-1.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-14-1.png new file mode 100644 index 0000000..e35a5a5 Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-15-1.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-15-1.png new file mode 100644 index 0000000..6e61daa Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-16-1.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-16-1.png new file mode 100644 index 0000000..4377bcb Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-9-1.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-9-1.png new file mode 100644 index 0000000..273102e Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-9-2.png b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-9-2.png new file mode 100644 index 0000000..c1ea07f Binary files /dev/null and b/articles/MistyRStructuralAnalysisPipelineDOT_files/figure-html/unnamed-chunk-9-2.png differ diff --git a/articles/index.html b/articles/index.html index 71396d7..43a0ba2 100644 --- a/articles/index.html +++ b/articles/index.html @@ -33,6 +33,11 @@ @@ -74,7 +79,17 @@

All vignettes

-
mistyR and data formats
+
Learning functional and structural spatial relationships with MISTy
+
+
Functional analysis with MISTy - pathway activity and ligand expression
+
+
Functional analysis with MISTy - pathway specific genes
+
+
Structural analysis with MISTy - based on cell2location deconvolution
+
+
Structural analysis with MISTy - based on DOT deconvolution
+
+
mistyR and data formats
Modeling spatially resolved omics with mistyR
diff --git a/articles/mistyDataFormats.html b/articles/mistyDataFormats.html index 1f3ab99..09f9a40 100644 --- a/articles/mistyDataFormats.html +++ b/articles/mistyDataFormats.html @@ -56,6 +56,11 @@ @@ -112,7 +117,7 @@

Ricardo Omar Slovenia
-

2023-12-22

+

2024-03-04

Source: vignettes/mistyDataFormats.Rmd
mistyDataFormats.Rmd
@@ -315,7 +320,7 @@

Seurat # Expression data -expression <- GetAssayData( +expression <- GetAssayData( object = seurat.vs, slot = "counts", assay = "Spatial" @@ -324,7 +329,7 @@

Seurat # Seurat deals with duplicates internally in similar way as above # Location data -geometry <- GetTissueCoordinates(seurat.vs, +geometry <- GetTissueCoordinates(seurat.vs, cols = c("row", "col"), scale = NULL ) @@ -404,10 +409,6 @@

Defining Estrogen and Hy progeny available from the package decoupleR.

 resource <- get_progeny(organism ="human", top = 15)
-#> Warning: One or more parsing issues, call `problems()` on your data frame for details,
-#> e.g.:
-#>   dat <- vroom(...)
-#>   problems(dat)
 
 estrogen.footprints <- resource %>%
   filter(source == "Estrogen", weight != 0, target %in% slide.markers) %>% 
@@ -481,21 +482,21 @@ 

Interpretation and downstream an #> # A tibble: 15 × 4 #> target sample measure value #> <chr> <chr> <chr> <dbl> -#> 1 PGK1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.32e-5 -#> 2 ANKZF1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.15e-3 -#> 3 INSIG2 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 2.06e-3 -#> 4 PDK1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.72e-2 -#> 5 FAM162A /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.34e-2 -#> 6 FUT11 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 4.13e-2 -#> 7 EGLN1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 6.05e-2 -#> 8 HILPDA /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 6.11e-2 -#> 9 NDRG1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 6.81e-2 -#> 10 ENO2 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 9.40e-2 -#> 11 PFKFB4 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.10e-1 -#> 12 KDM3A /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.30e-1 -#> 13 BNIP3L /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.53e-1 -#> 14 ANKRD37 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.34e-1 -#> 15 GBE1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 7.74e-1

+#> 1 PGK1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 2.69e-4 +#> 2 INSIG2 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 2.38e-3 +#> 3 PDK1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.73e-3 +#> 4 ANKZF1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.81e-3 +#> 5 FAM162A /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 6.92e-3 +#> 6 FUT11 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 7.16e-3 +#> 7 HILPDA /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.93e-2 +#> 8 NDRG1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 6.03e-2 +#> 9 ENO2 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 8.71e-2 +#> 10 EGLN1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.00e-1 +#> 11 PFKFB4 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 1.55e-1 +#> 12 KDM3A /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 2.55e-1 +#> 13 BNIP3L /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.12e-1 +#> 14 ANKRD37 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 3.51e-1 +#> 15 GBE1 /home/runner/work/mistyR/mistyR/vignettes/vignette_m… p.R2 9.11e-1

In general, the significant gain in R2 can be interpreted as the following:

“We can better explain the expression of marker X, when we consider @@ -511,9 +512,9 @@

Interpretation and downstream an #> # A tibble: 3 × 6 #> target view mean fraction p.mean p.sd #> <chr> <chr> <dbl> <dbl> <dbl> <dbl> -#> 1 PGK1 intra 0.517 0.375 0 NA -#> 2 PGK1 para.5 0.356 0.258 0 NA -#> 3 PGK1 para.estrogen.5 0.508 0.368 0 NA +#> 1 PGK1 intra 0.487 0.356 0 NA +#> 2 PGK1 para.5 0.322 0.235 0 NA +#> 3 PGK1 para.estrogen.5 0.560 0.409 0 NA

In the case of PGK1, we observe that around 37.7% of the contribution in the final model comes from the expression of other markers of hypoxia intrinsically or from the broader tissue structure. The rest (62.3%) @@ -538,20 +539,20 @@

Interpretation and downstream an #> # A tibble: 15 × 5 #> view Predictor Target Importance nsamples #> <chr> <chr> <chr> <dbl> <int> -#> 1 intra NDRG1 PGK1 2.46 1 -#> 2 intra FAM162A PGK1 1.97 1 -#> 3 intra PFKFB4 PGK1 0.291 1 -#> 4 intra HILPDA PGK1 0.277 1 -#> 5 intra ENO2 PGK1 -0.0620 1 -#> 6 intra EGLN1 PGK1 -0.284 1 -#> 7 intra GBE1 PGK1 -0.415 1 -#> 8 intra KDM3A PGK1 -0.462 1 -#> 9 intra BNIP3L PGK1 -0.562 1 -#> 10 intra ANKRD37 PGK1 -0.587 1 -#> 11 intra INSIG2 PGK1 -0.592 1 -#> 12 intra ANKZF1 PGK1 -0.597 1 -#> 13 intra FUT11 PGK1 -0.711 1 -#> 14 intra PDK1 PGK1 -0.733 1 +#> 1 intra NDRG1 PGK1 2.50 1 +#> 2 intra FAM162A PGK1 1.90 1 +#> 3 intra HILPDA PGK1 0.328 1 +#> 4 intra PFKFB4 PGK1 0.259 1 +#> 5 intra ENO2 PGK1 0.0612 1 +#> 6 intra EGLN1 PGK1 -0.358 1 +#> 7 intra GBE1 PGK1 -0.449 1 +#> 8 intra KDM3A PGK1 -0.520 1 +#> 9 intra ANKRD37 PGK1 -0.572 1 +#> 10 intra BNIP3L PGK1 -0.580 1 +#> 11 intra ANKZF1 PGK1 -0.585 1 +#> 12 intra INSIG2 PGK1 -0.619 1 +#> 13 intra FUT11 PGK1 -0.682 1 +#> 14 intra PDK1 PGK1 -0.691 1 #> 15 intra PGK1 PGK1 NA 1
 
@@ -648,9 +649,9 @@ 

Session infosessionInfo() at the point when this document was compiled:

-
#> R version 4.3.2 (2023-10-31)
+
#> R version 4.3.3 (2024-02-29)
 #> Platform: x86_64-pc-linux-gnu (64-bit)
-#> Running under: Ubuntu 22.04.3 LTS
+#> Running under: Ubuntu 22.04.4 LTS
 #> 
 #> Matrix products: default
 #> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
@@ -672,53 +673,53 @@ 

Session info#> other attached packages: #> [1] SpatialExperiment_1.12.0 SingleCellExperiment_1.24.0 #> [3] SummarizedExperiment_1.32.0 Biobase_2.62.0 -#> [5] GenomicRanges_1.54.1 GenomeInfoDb_1.38.2 +#> [5] GenomicRanges_1.54.1 GenomeInfoDb_1.38.6 #> [7] IRanges_2.36.0 S4Vectors_0.40.2 #> [9] BiocGenerics_0.48.1 MatrixGenerics_1.14.0 -#> [11] matrixStats_1.2.0 ggplot2_3.4.4 +#> [11] matrixStats_1.2.0 ggplot2_3.5.0 #> [13] decoupleR_2.8.0 sctransform_0.4.1 #> [15] purrr_1.0.2 dplyr_1.1.4 -#> [17] tibble_3.2.1 Matrix_1.6-1.1 +#> [17] tibble_3.2.1 Matrix_1.6-5 #> [19] future_1.33.1 mistyR_1.10.0 #> [21] BiocStyle_2.30.0 #> #> loaded via a namespace (and not attached): #> [1] RColorBrewer_1.1-3 jsonlite_1.8.8 magrittr_2.0.3 -#> [4] magick_2.8.2 farver_2.1.1 rmarkdown_2.25 +#> [4] magick_2.8.3 farver_2.1.1 rmarkdown_2.25 #> [7] fs_1.6.3 zlibbioc_1.48.0 ragg_1.2.7 -#> [10] vctrs_0.6.5 memoise_2.0.1 RCurl_1.98-1.13 +#> [10] vctrs_0.6.5 memoise_2.0.1 RCurl_1.98-1.14 #> [13] htmltools_0.5.7 S4Arrays_1.2.0 progress_1.2.3 -#> [16] curl_5.2.0 cellranger_1.1.0 SparseArray_1.2.2 -#> [19] sass_0.4.8 parallelly_1.36.0 bslib_0.6.1 +#> [16] curl_5.2.1 cellranger_1.1.0 SparseArray_1.2.4 +#> [19] sass_0.4.8 parallelly_1.37.1 bslib_0.6.1 #> [22] desc_1.4.3 plyr_1.8.9 lubridate_1.9.3 -#> [25] cachem_1.0.8 igraph_1.6.0 lifecycle_1.0.4 +#> [25] cachem_1.0.8 igraph_2.0.2 lifecycle_1.0.4 #> [28] pkgconfig_2.0.3 R6_2.5.1 fastmap_1.1.1 -#> [31] GenomeInfoDbData_1.2.11 digest_0.6.33 selectr_0.4-2 +#> [31] GenomeInfoDbData_1.2.11 digest_0.6.34 selectr_0.4-2 #> [34] colorspace_2.1-0 furrr_0.3.1 textshaping_0.3.7 #> [37] filelock_1.0.3 labeling_0.4.3 fansi_1.0.6 -#> [40] timechange_0.2.0 httr_1.4.7 abind_1.4-5 -#> [43] compiler_4.3.2 bit64_4.0.5 withr_2.5.2 +#> [40] timechange_0.3.0 httr_1.4.7 abind_1.4-5 +#> [43] compiler_4.3.3 bit64_4.0.5 withr_3.0.0 #> [46] backports_1.4.1 logger_0.2.2 OmnipathR_3.10.1 -#> [49] highr_0.10 R.utils_2.12.3 MASS_7.3-60 +#> [49] highr_0.10 R.utils_2.12.3 MASS_7.3-60.0.1 #> [52] rappdirs_0.3.3 DelayedArray_0.28.0 rjson_0.2.21 -#> [55] tools_4.3.2 future.apply_1.11.1 R.oo_1.25.0 -#> [58] glue_1.6.2 grid_4.3.2 checkmate_2.3.1 +#> [55] tools_4.3.3 future.apply_1.11.1 R.oo_1.26.0 +#> [58] glue_1.7.0 grid_4.3.3 checkmate_2.3.1 #> [61] reshape2_1.4.4 generics_0.1.3 gtable_0.3.4 -#> [64] tzdb_0.4.0 R.methodsS3_1.8.2 tidyr_1.3.0 -#> [67] data.table_1.14.10 hms_1.1.3 xml2_1.3.6 +#> [64] tzdb_0.4.0 R.methodsS3_1.8.2 tidyr_1.3.1 +#> [67] data.table_1.15.2 hms_1.1.3 xml2_1.3.6 #> [70] utf8_1.2.4 XVector_0.42.0 pillar_1.9.0 #> [73] stringr_1.5.1 vroom_1.6.5 later_1.3.2 -#> [76] lattice_0.21-9 bit_4.0.5 tidyselect_1.2.0 -#> [79] knitr_1.45 gridExtra_2.3 bookdown_0.37 -#> [82] xfun_0.41 stringi_1.8.3 yaml_2.3.8 +#> [76] lattice_0.22-5 bit_4.0.5 tidyselect_1.2.0 +#> [79] knitr_1.45 gridExtra_2.3 bookdown_0.38 +#> [82] xfun_0.42 stringi_1.8.3 yaml_2.3.8 #> [85] evaluate_0.23 codetools_0.2-19 BiocManager_1.30.22 #> [88] cli_3.6.2 systemfonts_1.0.5 munsell_0.5.0 -#> [91] jquerylib_0.1.4 Rcpp_1.0.11 readxl_1.4.3 -#> [94] globals_0.16.2 parallel_4.3.2 pkgdown_2.0.7 -#> [97] readr_2.1.4 assertthat_0.2.1 prettyunits_1.2.0 -#> [100] bitops_1.0-7 listenv_0.9.0 rlist_0.4.6.2 -#> [103] scales_1.3.0 crayon_1.5.2 rlang_1.1.2 -#> [106] rvest_1.0.3 distances_0.1.10

+#> [91] jquerylib_0.1.4 Rcpp_1.0.12 readxl_1.4.3 +#> [94] globals_0.16.2 parallel_4.3.3 pkgdown_2.0.7 +#> [97] readr_2.1.5 assertthat_0.2.1 prettyunits_1.2.0 +#> [100] bitops_1.0-7 listenv_0.9.1 rlist_0.4.6.2 +#> [103] scales_1.3.0 crayon_1.5.2 rlang_1.1.3 +#> [106] rvest_1.0.4 distances_0.1.10

diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-1.png index dc2a0fb..c16602e 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-2.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-2.png index 3ee45d8..5d67011 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-2.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-15-2.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-17-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-17-1.png index 7043936..09016f9 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-17-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-18-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-18-1.png index 78f56da..866cc15 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-18-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-1.png index 00884f5..6795452 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-2.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-2.png index db63649..ab1aea6 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-2.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-20-2.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-22-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-22-1.png index d86c4a0..b338366 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-22-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-22-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-1.png index 00884f5..6795452 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-2.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-2.png index 641d27c..c090713 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-2.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-23-2.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-24-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-24-1.png index 5ada11a..05b4757 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-24-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-24-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-1.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-1.png index 00884f5..6795452 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-1.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-1.png differ diff --git a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-2.png b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-2.png index f0b5265..2dded97 100644 Binary files a/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-2.png and b/articles/mistyDataFormats_files/figure-html/unnamed-chunk-25-2.png differ diff --git a/articles/mistyR.html b/articles/mistyR.html index 20ab547..1adf2a2 100644 --- a/articles/mistyR.html +++ b/articles/mistyR.html @@ -56,6 +56,11 @@ @@ -107,7 +112,7 @@

Jovan Slovenia
-

2023-12-22

+

2024-03-04

Source: vignettes/mistyR.Rmd
mistyR.Rmd
@@ -582,9 +587,9 @@

Session info

Here is the output of sessionInfo() at the point when this document was compiled:

-
#> R version 4.3.2 (2023-10-31)
+
#> R version 4.3.3 (2024-02-29)
 #> Platform: x86_64-pc-linux-gnu (64-bit)
-#> Running under: Ubuntu 22.04.3 LTS
+#> Running under: Ubuntu 22.04.4 LTS
 #> 
 #> Matrix products: default
 #> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
@@ -608,31 +613,31 @@ 

Session info#> [1] stats graphics grDevices utils datasets methods base #> #> other attached packages: -#> [1] ggplot2_3.4.4 distances_0.1.10 purrr_1.0.2 dplyr_1.1.4 +#> [1] ggplot2_3.5.0 distances_0.1.10 purrr_1.0.2 dplyr_1.1.4 #> [5] future_1.33.1 mistyR_1.10.0 BiocStyle_2.30.0 #> #> loaded via a namespace (and not attached): -#> [1] gtable_0.3.4 xfun_0.41 bslib_0.6.1 -#> [4] rlist_0.4.6.2 vctrs_0.6.5 tools_4.3.2 -#> [7] generics_0.1.3 parallel_4.3.2 tibble_3.2.1 +#> [1] gtable_0.3.4 xfun_0.42 bslib_0.6.1 +#> [4] rlist_0.4.6.2 vctrs_0.6.5 tools_4.3.3 +#> [7] generics_0.1.3 parallel_4.3.3 tibble_3.2.1 #> [10] fansi_1.0.6 highr_0.10 pkgconfig_2.0.3 -#> [13] R.oo_1.25.0 data.table_1.14.10 RColorBrewer_1.1-3 +#> [13] R.oo_1.26.0 data.table_1.15.2 RColorBrewer_1.1-3 #> [16] desc_1.4.3 assertthat_0.2.1 lifecycle_1.0.4 -#> [19] compiler_4.3.2 farver_2.1.1 stringr_1.5.1 +#> [19] compiler_4.3.3 farver_2.1.1 stringr_1.5.1 #> [22] textshaping_0.3.7 munsell_0.5.0 codetools_0.2-19 #> [25] htmltools_0.5.7 sass_0.4.8 yaml_2.3.8 #> [28] pillar_1.9.0 pkgdown_2.0.7 furrr_0.3.1 -#> [31] crayon_1.5.2 jquerylib_0.1.4 tidyr_1.3.0 -#> [34] R.utils_2.12.3 cachem_1.0.8 parallelly_1.36.0 -#> [37] tidyselect_1.2.0 digest_0.6.33 stringi_1.8.3 -#> [40] bookdown_0.37 listenv_0.9.0 labeling_0.4.3 -#> [43] fastmap_1.1.1 grid_4.3.2 colorspace_2.1-0 +#> [31] crayon_1.5.2 jquerylib_0.1.4 tidyr_1.3.1 +#> [34] R.utils_2.12.3 cachem_1.0.8 parallelly_1.37.1 +#> [37] tidyselect_1.2.0 digest_0.6.34 stringi_1.8.3 +#> [40] bookdown_0.38 listenv_0.9.1 labeling_0.4.3 +#> [43] fastmap_1.1.1 grid_4.3.3 colorspace_2.1-0 #> [46] cli_3.6.2 magrittr_2.0.3 utf8_1.2.4 -#> [49] withr_2.5.2 filelock_1.0.3 scales_1.3.0 -#> [52] rmarkdown_2.25 globals_0.16.2 igraph_1.6.0 +#> [49] withr_3.0.0 filelock_1.0.3 scales_1.3.0 +#> [52] rmarkdown_2.25 globals_0.16.2 igraph_2.0.2 #> [55] ragg_1.2.7 R.methodsS3_1.8.2 memoise_2.0.1 -#> [58] evaluate_0.23 knitr_1.45 rlang_1.1.2 -#> [61] glue_1.6.2 BiocManager_1.30.22 jsonlite_1.8.8 +#> [58] evaluate_0.23 knitr_1.45 rlang_1.1.3 +#> [61] glue_1.7.0 BiocManager_1.30.22 jsonlite_1.8.8 #> [64] R6_2.5.1 systemfonts_1.0.5 fs_1.6.3

diff --git a/articles/mistyR_files/figure-html/unnamed-chunk-17-1.png b/articles/mistyR_files/figure-html/unnamed-chunk-17-1.png index df61ba2..70c1567 100644 Binary files a/articles/mistyR_files/figure-html/unnamed-chunk-17-1.png and b/articles/mistyR_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/articles/mistyR_files/figure-html/unnamed-chunk-18-1.png b/articles/mistyR_files/figure-html/unnamed-chunk-18-1.png index 298eeb2..4a88503 100644 Binary files a/articles/mistyR_files/figure-html/unnamed-chunk-18-1.png and b/articles/mistyR_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/authors.html b/authors.html index 84fded1..0a64081 100644 --- a/authors.html +++ b/authors.html @@ -33,6 +33,11 @@ diff --git a/index.html b/index.html index df771ef..e063781 100644 --- a/index.html +++ b/index.html @@ -86,6 +86,11 @@ @@ -168,7 +173,7 @@

Docker

For the released and the latest stable and development versions we also provide Docker images based on the Rocker project - rocker/r-base image.

To create and start a container from the latest docker image and run R in interactive mode:

-
docker run -it tanevski/mistyr:latest
+
docker run -it tanevski/mistyr:latest

Usage diff --git a/news/index.html b/news/index.html index 5724fa6..f80f70e 100644 --- a/news/index.html +++ b/news/index.html @@ -33,6 +33,11 @@ diff --git a/pkgdown.yml b/pkgdown.yml index 97e1583..a49bfcd 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,10 +1,15 @@ -pandoc: 2.19.2 +pandoc: 3.1.11 pkgdown: 2.0.7 pkgdown_sha: ~ articles: + FunctionalAndStructuralPipeline: FunctionalAndStructuralPipeline.html + FunctionalPipelinePathwayActivityLigands: FunctionalPipelinePathwayActivityLigands.html + FunctionalPipelinePathwaySpecific: FunctionalPipelinePathwaySpecific.html + MistyRStructuralAnalysisPipelineC2L: MistyRStructuralAnalysisPipelineC2L.html + MistyRStructuralAnalysisPipelineDOT: MistyRStructuralAnalysisPipelineDOT.html mistyDataFormats: mistyDataFormats.html mistyR: mistyR.html -last_built: 2023-12-22T12:24Z +last_built: 2024-03-04T16:36Z urls: reference: https://saezlab.github.io/mistyR/reference article: https://saezlab.github.io/mistyR/articles diff --git a/reference/Rplot003.png b/reference/Rplot003.png index 4845412..4c45ff0 100644 Binary files a/reference/Rplot003.png and b/reference/Rplot003.png differ diff --git a/reference/add_juxtaview.html b/reference/add_juxtaview.html index 6d9672c..a70a881 100644 --- a/reference/add_juxtaview.html +++ b/reference/add_juxtaview.html @@ -35,6 +35,11 @@ diff --git a/reference/add_paraview.html b/reference/add_paraview.html index 2e863a1..deb48c2 100644 --- a/reference/add_paraview.html +++ b/reference/add_paraview.html @@ -35,6 +35,11 @@ diff --git a/reference/add_views.html b/reference/add_views.html index 059872c..75ec949 100644 --- a/reference/add_views.html +++ b/reference/add_views.html @@ -33,6 +33,11 @@ @@ -130,110 +135,110 @@

Examples#> #> $intraview$data #> marker1 marker2 -#> 1 7.147116 14.773349 -#> 2 9.379281 9.598865 -#> 3 12.471372 12.584100 -#> 4 10.341245 19.549720 -#> 5 10.341238 17.569026 -#> 6 8.127741 11.400255 -#> 7 9.192327 18.759454 -#> 8 7.991191 13.873981 -#> 9 7.778586 15.960021 -#> 10 8.617160 16.927435 -#> 11 8.660713 19.156778 -#> 12 11.810934 16.916394 -#> 13 10.728475 14.944677 -#> 14 11.303032 15.738555 -#> 15 10.552506 16.953432 -#> 16 10.954474 19.140693 -#> 17 11.819402 13.999430 -#> 18 8.573062 14.266932 -#> 19 7.039639 17.932174 -#> 20 8.257285 12.727924 -#> 21 11.196253 14.491926 -#> 22 10.262893 18.100687 -#> 23 10.045391 11.693906 -#> 24 12.371541 10.066523 -#> 25 8.200097 21.228335 -#> 26 9.392253 13.364929 -#> 27 10.540035 18.172582 -#> 28 10.582997 14.606449 -#> 29 13.805375 17.673744 -#> 30 6.944830 14.031214 -#> 31 10.842000 17.959361 -#> 32 8.974109 17.611423 -#> 33 11.600573 12.285631 -#> 34 11.247682 10.313818 -#> 35 10.986234 10.557505 -#> 36 4.604489 14.430758 -#> 37 12.172167 11.708435 -#> 38 10.420431 14.581907 -#> 39 7.199396 15.635287 -#> 40 7.875248 13.008051 -#> 41 10.686682 12.388456 -#> 42 8.477913 17.149223 -#> 43 9.488551 12.825695 -#> 44 12.622561 10.512821 -#> 45 8.100540 18.588889 -#> 46 10.547171 18.138914 -#> 47 11.443992 13.241828 -#> 48 7.837032 15.194163 -#> 49 7.285705 16.535340 -#> 50 9.628270 13.898895 -#> 51 13.929758 15.040375 -#> 52 11.064995 17.485847 -#> 53 10.896790 17.435841 -#> 54 8.485408 12.406793 -#> 55 11.204250 15.638445 -#> 56 7.341554 18.712210 -#> 57 6.823032 11.758395 -#> 58 12.448538 11.880617 -#> 59 11.888459 12.325656 -#> 60 11.373085 12.018831 -#> 61 8.824511 16.028936 -#> 62 7.760347 14.133224 -#> 63 7.208120 13.682043 -#> 64 8.369269 12.463294 -#> 65 9.343171 16.927003 -#> 66 8.893487 16.289842 -#> 67 10.629718 8.095231 -#> 68 9.338371 14.082113 -#> 69 7.498090 10.388512 -#> 70 8.282610 11.033060 -#> 71 10.194826 22.555975 -#> 72 8.646241 16.938945 -#> 73 12.968828 19.994221 -#> 74 10.050579 18.379473 -#> 75 9.973016 12.593697 -#> 76 9.863692 10.840088 -#> 77 9.603544 12.990747 -#> 78 11.581431 20.790503 -#> 79 8.881165 13.218355 -#> 80 8.403656 13.568303 -#> 81 12.106995 12.604467 -#> 82 8.791174 15.720998 -#> 83 12.108503 13.613823 -#> 84 14.555612 15.189932 -#> 85 6.758847 11.161352 -#> 86 7.615607 8.356509 -#> 87 12.168551 15.595379 -#> 88 7.901084 22.752864 -#> 89 14.032439 9.763586 -#> 90 11.732212 17.608203 -#> 91 7.072087 19.445792 -#> 92 9.271814 16.848258 -#> 93 5.752941 15.013441 -#> 94 7.520027 16.103703 -#> 95 9.160238 16.943678 -#> 96 9.054491 14.319986 -#> 97 12.941847 13.301676 -#> 98 6.144297 19.512165 -#> 99 11.975934 16.186339 -#> 100 12.227423 18.228549 +#> 1 7.199913 13.838359 +#> 2 10.510634 12.643702 +#> 3 5.125473 11.829789 +#> 4 9.988857 12.613376 +#> 5 11.243105 9.731174 +#> 6 12.296823 12.928386 +#> 7 6.356365 13.324374 +#> 8 9.505349 13.390010 +#> 9 9.511601 15.681381 +#> 10 9.434589 17.935365 +#> 11 8.892601 14.373352 +#> 12 11.257964 10.801769 +#> 13 14.130050 15.775612 +#> 14 6.738021 13.674602 +#> 15 11.024854 16.705800 +#> 16 6.273977 21.380551 +#> 17 8.955975 16.274575 +#> 18 9.894796 9.947155 +#> 19 11.085993 15.748205 +#> 20 8.171850 18.218515 +#> 21 10.936309 21.118108 +#> 22 10.725903 16.348361 +#> 23 7.390913 19.175442 +#> 24 11.475553 16.279700 +#> 25 13.777010 15.322752 +#> 26 9.805110 15.066884 +#> 27 8.128305 16.810833 +#> 28 9.968099 14.212048 +#> 29 8.346422 13.415208 +#> 30 6.975201 15.576448 +#> 31 11.870726 11.561401 +#> 32 10.352977 17.538554 +#> 33 10.487371 15.245159 +#> 34 13.247098 11.084649 +#> 35 10.224076 12.165264 +#> 36 9.732006 16.363025 +#> 37 6.179825 12.434392 +#> 38 9.441526 14.139314 +#> 39 9.373108 17.684885 +#> 40 12.134616 15.201913 +#> 41 10.140070 14.511971 +#> 42 8.721753 12.518069 +#> 43 9.900070 20.629517 +#> 44 9.497033 17.299321 +#> 45 10.889594 17.939870 +#> 46 15.510835 18.965343 +#> 47 10.093063 11.640868 +#> 48 11.155418 16.543799 +#> 49 10.236390 10.472700 +#> 50 6.176559 19.598224 +#> 51 11.724173 16.287442 +#> 52 9.513527 15.366310 +#> 53 9.587826 11.585963 +#> 54 10.038355 13.325955 +#> 55 10.059122 18.157616 +#> 56 11.099655 17.033051 +#> 57 5.451770 15.115499 +#> 58 15.365114 13.930856 +#> 59 9.277557 17.348532 +#> 60 10.426711 17.413235 +#> 61 12.148692 9.299818 +#> 62 8.669824 17.807353 +#> 63 12.227905 14.072845 +#> 64 9.508207 15.789200 +#> 65 7.644873 9.628224 +#> 66 8.048299 12.635223 +#> 67 12.130115 11.600935 +#> 68 10.263341 16.090958 +#> 69 10.977258 14.142336 +#> 70 6.601099 16.553007 +#> 71 7.058527 14.691274 +#> 72 10.568301 12.077791 +#> 73 12.674641 18.812017 +#> 74 10.473393 17.882594 +#> 75 12.636587 17.306164 +#> 76 11.047820 18.107792 +#> 77 11.213496 13.578339 +#> 78 9.780129 11.173995 +#> 79 10.344363 14.083138 +#> 80 9.819345 21.635308 +#> 81 13.848687 11.874995 +#> 82 12.596786 11.560428 +#> 83 11.497583 9.974018 +#> 84 11.112449 19.577816 +#> 85 8.903485 16.662557 +#> 86 12.221070 20.979331 +#> 87 4.775331 14.537638 +#> 88 9.688612 22.693225 +#> 89 10.867780 18.185997 +#> 90 9.236098 18.428085 +#> 91 10.848375 18.371517 +#> 92 12.126204 13.808996 +#> 93 12.097425 12.530217 +#> 94 9.923794 13.263346 +#> 95 10.972298 20.291368 +#> 96 13.345765 15.398976 +#> 97 9.291278 16.129498 +#> 98 11.892696 18.416123 +#> 99 12.633653 18.723789 +#> 100 9.406720 16.836273 #> #> #> $misty.uniqueid -#> [1] "790c4cc3e0be70477421eb2a0a5057a3" +#> [1] "b0782b57cbeec2bcbbdf3e54abecd6fe" #> #> $dummyname #> $dummyname$abbrev @@ -241,106 +246,106 @@

Examples#> #> $dummyname$data #> marker1 marker2 -#> 1 15.4325216 12.196657 -#> 2 17.2725073 10.542491 -#> 3 7.0312589 15.273506 -#> 4 9.5205542 15.331941 -#> 5 0.5857943 19.178378 -#> 6 9.1958625 10.520786 -#> 7 7.4191778 14.827394 -#> 8 6.7665015 11.394387 -#> 9 9.5681059 10.949289 -#> 10 12.8940065 11.200911 -#> 11 7.1138365 14.348012 -#> 12 2.3424527 17.928963 -#> 13 10.3914779 12.307287 -#> 14 10.2741325 6.330625 -#> 15 14.8573177 15.229007 -#> 16 11.1066147 18.878023 -#> 17 17.3306749 11.867334 -#> 18 11.6958422 11.855958 -#> 19 10.9388989 1.630758 -#> 20 13.8997664 11.214635 -#> 21 7.5815462 19.324120 -#> 22 8.5659007 22.617628 -#> 23 11.5347740 20.283152 -#> 24 4.4165057 5.782458 -#> 25 7.2185265 13.089618 -#> 26 12.7465816 20.861671 -#> 27 14.1983716 9.170548 -#> 28 16.9065572 10.843393 -#> 29 14.4480255 16.864736 -#> 30 3.7115773 17.113913 -#> 31 9.0951101 13.865950 -#> 32 10.4888856 14.416103 -#> 33 12.9629553 10.422704 -#> 34 5.4403867 20.305971 -#> 35 10.9280881 11.626687 -#> 36 20.0996672 5.360340 -#> 37 11.5513039 18.529238 -#> 38 12.6520048 12.383338 -#> 39 14.6736306 11.565209 -#> 40 7.6896529 22.110151 -#> 41 9.8179885 8.691901 -#> 42 3.7538343 17.885095 -#> 43 9.8418147 13.916670 -#> 44 8.8671723 2.851097 -#> 45 11.7033453 7.273878 -#> 46 11.1601635 8.429435 -#> 47 11.2243017 22.433918 -#> 48 3.6467930 6.880682 -#> 49 7.3339703 13.325778 -#> 50 20.0427331 5.800592 -#> 51 -1.6797850 25.409744 -#> 52 13.3770979 14.496853 -#> 53 6.6826816 10.772240 -#> 54 4.5630740 22.942833 -#> 55 17.9328461 19.529736 -#> 56 11.1551001 18.061527 -#> 57 14.4967838 19.530814 -#> 58 23.7038631 14.594430 -#> 59 1.7225141 21.087970 -#> 60 11.6996767 10.602354 -#> 61 8.6116118 21.113845 -#> 62 16.5405817 18.276203 -#> 63 0.3709174 9.700346 -#> 64 10.3711960 10.546526 -#> 65 7.3770224 10.430074 -#> 66 9.0548265 17.787692 -#> 67 12.3101996 11.702569 -#> 68 14.4590148 18.111699 -#> 69 8.1058905 14.617330 -#> 70 9.8003026 23.831542 -#> 71 10.1974744 15.363684 -#> 72 10.8338533 6.533359 -#> 73 9.9157588 10.290579 -#> 74 10.1466736 13.604972 -#> 75 4.7594172 12.817860 -#> 76 8.3190180 22.393860 -#> 77 -0.3923340 14.402588 -#> 78 9.1455180 8.228548 -#> 79 6.5677559 15.082416 -#> 80 8.5926602 19.976364 -#> 81 11.8569538 13.436973 -#> 82 6.0568812 15.543345 -#> 83 11.8152126 8.676890 -#> 84 11.5619152 13.105979 -#> 85 9.2731839 21.402112 -#> 86 16.0865758 15.034537 -#> 87 15.8171716 14.581668 -#> 88 14.8384004 16.811186 -#> 89 14.2539181 15.853230 -#> 90 7.3003148 13.589548 -#> 91 9.9732440 19.856860 -#> 92 7.8443344 20.984054 -#> 93 6.2126264 4.428040 -#> 94 4.0078642 13.763909 -#> 95 10.0587509 20.934616 -#> 96 18.9805758 12.784631 -#> 97 7.5453897 17.766827 -#> 98 8.2656999 17.422929 -#> 99 13.0533179 10.387294 -#> 100 2.5225715 21.149169 +#> 1 7.8530996 13.219378 +#> 2 16.8023066 9.677679 +#> 3 9.6457128 20.385583 +#> 4 8.6392316 20.907878 +#> 5 -2.2334001 15.991960 +#> 6 10.3274332 12.997974 +#> 7 4.5074555 18.080771 +#> 8 6.8341091 24.870784 +#> 9 -0.3182723 24.423312 +#> 10 23.2446601 7.056897 +#> 11 4.2330081 12.300384 +#> 12 8.2968106 9.152693 +#> 13 13.9318129 17.795530 +#> 14 3.6474344 5.903264 +#> 15 12.7107077 16.966720 +#> 16 10.3755295 15.210671 +#> 17 12.7925721 20.898321 +#> 18 12.0770320 13.715394 +#> 19 2.7385012 9.718320 +#> 20 14.7060306 15.993886 +#> 21 8.3053206 18.252668 +#> 22 9.6221288 16.719567 +#> 23 10.2010220 22.387662 +#> 24 10.6215053 15.360128 +#> 25 5.0078372 25.632223 +#> 26 16.1669503 7.619015 +#> 27 11.7021224 17.039442 +#> 28 7.6364876 21.969889 +#> 29 13.5437653 16.801391 +#> 30 2.3552064 18.272751 +#> 31 11.1871267 20.260777 +#> 32 3.4359288 5.102224 +#> 33 13.7351429 21.041928 +#> 34 2.1874078 14.153600 +#> 35 10.3552668 16.475149 +#> 36 6.8023261 21.331703 +#> 37 5.7740213 9.323284 +#> 38 13.3762235 9.344731 +#> 39 15.7668790 15.549967 +#> 40 1.5674763 19.264527 +#> 41 5.4859253 13.828311 +#> 42 16.5881685 25.433443 +#> 43 15.5009487 14.445403 +#> 44 16.0188392 8.035765 +#> 45 2.8436461 9.288546 +#> 46 16.9145543 23.523044 +#> 47 10.0156297 14.599632 +#> 48 9.6105659 12.813594 +#> 49 12.2071411 14.403925 +#> 50 10.6446145 18.932314 +#> 51 5.8489287 12.105274 +#> 52 7.4820355 14.272866 +#> 53 4.0317941 17.632290 +#> 54 6.2413834 23.667891 +#> 55 17.2792070 22.243286 +#> 56 5.8569823 22.590966 +#> 57 11.4488723 13.079964 +#> 58 7.5997326 24.135626 +#> 59 6.9758532 12.242541 +#> 60 17.3005509 10.671232 +#> 61 10.7483968 13.280843 +#> 62 2.8333945 20.314382 +#> 63 9.9484834 19.065291 +#> 64 8.9388198 24.017417 +#> 65 5.4682991 14.474657 +#> 66 -0.5107624 19.912267 +#> 67 19.4668023 6.433487 +#> 68 5.1593708 10.839902 +#> 69 9.4869848 20.502459 +#> 70 11.1997979 14.130899 +#> 71 10.3044945 15.894060 +#> 72 -0.8878801 11.507853 +#> 73 9.4106993 10.197754 +#> 74 10.5614739 10.122885 +#> 75 10.0394310 13.307117 +#> 76 19.3887194 20.761735 +#> 77 20.7937828 17.025506 +#> 78 13.5485726 12.645388 +#> 79 13.8349169 14.333745 +#> 80 8.4589429 21.133412 +#> 81 15.0600092 16.664720 +#> 82 5.4047420 13.264558 +#> 83 12.8169004 14.507247 +#> 84 11.6124137 15.173830 +#> 85 11.8333718 16.930635 +#> 86 15.6491758 15.104156 +#> 87 5.2925096 15.037934 +#> 88 11.0891882 19.654220 +#> 89 17.0770615 11.576250 +#> 90 8.0813348 16.687008 +#> 91 9.1295681 12.939311 +#> 92 8.8912774 19.671306 +#> 93 4.9523564 24.201584 +#> 94 12.4036263 11.475902 +#> 95 18.0220366 15.042552 +#> 96 2.4248774 25.170949 +#> 97 2.9198804 8.291570 +#> 98 14.3838866 20.794896 +#> 99 13.1206621 13.983955 +#> 100 20.5613864 13.109857 #> #> @@ -351,110 +356,110 @@

Examples#> #> $intraview$data #> marker1 marker2 -#> 1 7.147116 14.773349 -#> 2 9.379281 9.598865 -#> 3 12.471372 12.584100 -#> 4 10.341245 19.549720 -#> 5 10.341238 17.569026 -#> 6 8.127741 11.400255 -#> 7 9.192327 18.759454 -#> 8 7.991191 13.873981 -#> 9 7.778586 15.960021 -#> 10 8.617160 16.927435 -#> 11 8.660713 19.156778 -#> 12 11.810934 16.916394 -#> 13 10.728475 14.944677 -#> 14 11.303032 15.738555 -#> 15 10.552506 16.953432 -#> 16 10.954474 19.140693 -#> 17 11.819402 13.999430 -#> 18 8.573062 14.266932 -#> 19 7.039639 17.932174 -#> 20 8.257285 12.727924 -#> 21 11.196253 14.491926 -#> 22 10.262893 18.100687 -#> 23 10.045391 11.693906 -#> 24 12.371541 10.066523 -#> 25 8.200097 21.228335 -#> 26 9.392253 13.364929 -#> 27 10.540035 18.172582 -#> 28 10.582997 14.606449 -#> 29 13.805375 17.673744 -#> 30 6.944830 14.031214 -#> 31 10.842000 17.959361 -#> 32 8.974109 17.611423 -#> 33 11.600573 12.285631 -#> 34 11.247682 10.313818 -#> 35 10.986234 10.557505 -#> 36 4.604489 14.430758 -#> 37 12.172167 11.708435 -#> 38 10.420431 14.581907 -#> 39 7.199396 15.635287 -#> 40 7.875248 13.008051 -#> 41 10.686682 12.388456 -#> 42 8.477913 17.149223 -#> 43 9.488551 12.825695 -#> 44 12.622561 10.512821 -#> 45 8.100540 18.588889 -#> 46 10.547171 18.138914 -#> 47 11.443992 13.241828 -#> 48 7.837032 15.194163 -#> 49 7.285705 16.535340 -#> 50 9.628270 13.898895 -#> 51 13.929758 15.040375 -#> 52 11.064995 17.485847 -#> 53 10.896790 17.435841 -#> 54 8.485408 12.406793 -#> 55 11.204250 15.638445 -#> 56 7.341554 18.712210 -#> 57 6.823032 11.758395 -#> 58 12.448538 11.880617 -#> 59 11.888459 12.325656 -#> 60 11.373085 12.018831 -#> 61 8.824511 16.028936 -#> 62 7.760347 14.133224 -#> 63 7.208120 13.682043 -#> 64 8.369269 12.463294 -#> 65 9.343171 16.927003 -#> 66 8.893487 16.289842 -#> 67 10.629718 8.095231 -#> 68 9.338371 14.082113 -#> 69 7.498090 10.388512 -#> 70 8.282610 11.033060 -#> 71 10.194826 22.555975 -#> 72 8.646241 16.938945 -#> 73 12.968828 19.994221 -#> 74 10.050579 18.379473 -#> 75 9.973016 12.593697 -#> 76 9.863692 10.840088 -#> 77 9.603544 12.990747 -#> 78 11.581431 20.790503 -#> 79 8.881165 13.218355 -#> 80 8.403656 13.568303 -#> 81 12.106995 12.604467 -#> 82 8.791174 15.720998 -#> 83 12.108503 13.613823 -#> 84 14.555612 15.189932 -#> 85 6.758847 11.161352 -#> 86 7.615607 8.356509 -#> 87 12.168551 15.595379 -#> 88 7.901084 22.752864 -#> 89 14.032439 9.763586 -#> 90 11.732212 17.608203 -#> 91 7.072087 19.445792 -#> 92 9.271814 16.848258 -#> 93 5.752941 15.013441 -#> 94 7.520027 16.103703 -#> 95 9.160238 16.943678 -#> 96 9.054491 14.319986 -#> 97 12.941847 13.301676 -#> 98 6.144297 19.512165 -#> 99 11.975934 16.186339 -#> 100 12.227423 18.228549 +#> 1 7.199913 13.838359 +#> 2 10.510634 12.643702 +#> 3 5.125473 11.829789 +#> 4 9.988857 12.613376 +#> 5 11.243105 9.731174 +#> 6 12.296823 12.928386 +#> 7 6.356365 13.324374 +#> 8 9.505349 13.390010 +#> 9 9.511601 15.681381 +#> 10 9.434589 17.935365 +#> 11 8.892601 14.373352 +#> 12 11.257964 10.801769 +#> 13 14.130050 15.775612 +#> 14 6.738021 13.674602 +#> 15 11.024854 16.705800 +#> 16 6.273977 21.380551 +#> 17 8.955975 16.274575 +#> 18 9.894796 9.947155 +#> 19 11.085993 15.748205 +#> 20 8.171850 18.218515 +#> 21 10.936309 21.118108 +#> 22 10.725903 16.348361 +#> 23 7.390913 19.175442 +#> 24 11.475553 16.279700 +#> 25 13.777010 15.322752 +#> 26 9.805110 15.066884 +#> 27 8.128305 16.810833 +#> 28 9.968099 14.212048 +#> 29 8.346422 13.415208 +#> 30 6.975201 15.576448 +#> 31 11.870726 11.561401 +#> 32 10.352977 17.538554 +#> 33 10.487371 15.245159 +#> 34 13.247098 11.084649 +#> 35 10.224076 12.165264 +#> 36 9.732006 16.363025 +#> 37 6.179825 12.434392 +#> 38 9.441526 14.139314 +#> 39 9.373108 17.684885 +#> 40 12.134616 15.201913 +#> 41 10.140070 14.511971 +#> 42 8.721753 12.518069 +#> 43 9.900070 20.629517 +#> 44 9.497033 17.299321 +#> 45 10.889594 17.939870 +#> 46 15.510835 18.965343 +#> 47 10.093063 11.640868 +#> 48 11.155418 16.543799 +#> 49 10.236390 10.472700 +#> 50 6.176559 19.598224 +#> 51 11.724173 16.287442 +#> 52 9.513527 15.366310 +#> 53 9.587826 11.585963 +#> 54 10.038355 13.325955 +#> 55 10.059122 18.157616 +#> 56 11.099655 17.033051 +#> 57 5.451770 15.115499 +#> 58 15.365114 13.930856 +#> 59 9.277557 17.348532 +#> 60 10.426711 17.413235 +#> 61 12.148692 9.299818 +#> 62 8.669824 17.807353 +#> 63 12.227905 14.072845 +#> 64 9.508207 15.789200 +#> 65 7.644873 9.628224 +#> 66 8.048299 12.635223 +#> 67 12.130115 11.600935 +#> 68 10.263341 16.090958 +#> 69 10.977258 14.142336 +#> 70 6.601099 16.553007 +#> 71 7.058527 14.691274 +#> 72 10.568301 12.077791 +#> 73 12.674641 18.812017 +#> 74 10.473393 17.882594 +#> 75 12.636587 17.306164 +#> 76 11.047820 18.107792 +#> 77 11.213496 13.578339 +#> 78 9.780129 11.173995 +#> 79 10.344363 14.083138 +#> 80 9.819345 21.635308 +#> 81 13.848687 11.874995 +#> 82 12.596786 11.560428 +#> 83 11.497583 9.974018 +#> 84 11.112449 19.577816 +#> 85 8.903485 16.662557 +#> 86 12.221070 20.979331 +#> 87 4.775331 14.537638 +#> 88 9.688612 22.693225 +#> 89 10.867780 18.185997 +#> 90 9.236098 18.428085 +#> 91 10.848375 18.371517 +#> 92 12.126204 13.808996 +#> 93 12.097425 12.530217 +#> 94 9.923794 13.263346 +#> 95 10.972298 20.291368 +#> 96 13.345765 15.398976 +#> 97 9.291278 16.129498 +#> 98 11.892696 18.416123 +#> 99 12.633653 18.723789 +#> 100 9.406720 16.836273 #> #> #> $misty.uniqueid -#> [1] "790c4cc3e0be70477421eb2a0a5057a3" +#> [1] "b0782b57cbeec2bcbbdf3e54abecd6fe" #> #> $dummyname #> $dummyname$abbrev @@ -462,106 +467,106 @@

Examples#> #> $dummyname$data #> marker1 marker2 -#> 1 15.4325216 12.196657 -#> 2 17.2725073 10.542491 -#> 3 7.0312589 15.273506 -#> 4 9.5205542 15.331941 -#> 5 0.5857943 19.178378 -#> 6 9.1958625 10.520786 -#> 7 7.4191778 14.827394 -#> 8 6.7665015 11.394387 -#> 9 9.5681059 10.949289 -#> 10 12.8940065 11.200911 -#> 11 7.1138365 14.348012 -#> 12 2.3424527 17.928963 -#> 13 10.3914779 12.307287 -#> 14 10.2741325 6.330625 -#> 15 14.8573177 15.229007 -#> 16 11.1066147 18.878023 -#> 17 17.3306749 11.867334 -#> 18 11.6958422 11.855958 -#> 19 10.9388989 1.630758 -#> 20 13.8997664 11.214635 -#> 21 7.5815462 19.324120 -#> 22 8.5659007 22.617628 -#> 23 11.5347740 20.283152 -#> 24 4.4165057 5.782458 -#> 25 7.2185265 13.089618 -#> 26 12.7465816 20.861671 -#> 27 14.1983716 9.170548 -#> 28 16.9065572 10.843393 -#> 29 14.4480255 16.864736 -#> 30 3.7115773 17.113913 -#> 31 9.0951101 13.865950 -#> 32 10.4888856 14.416103 -#> 33 12.9629553 10.422704 -#> 34 5.4403867 20.305971 -#> 35 10.9280881 11.626687 -#> 36 20.0996672 5.360340 -#> 37 11.5513039 18.529238 -#> 38 12.6520048 12.383338 -#> 39 14.6736306 11.565209 -#> 40 7.6896529 22.110151 -#> 41 9.8179885 8.691901 -#> 42 3.7538343 17.885095 -#> 43 9.8418147 13.916670 -#> 44 8.8671723 2.851097 -#> 45 11.7033453 7.273878 -#> 46 11.1601635 8.429435 -#> 47 11.2243017 22.433918 -#> 48 3.6467930 6.880682 -#> 49 7.3339703 13.325778 -#> 50 20.0427331 5.800592 -#> 51 -1.6797850 25.409744 -#> 52 13.3770979 14.496853 -#> 53 6.6826816 10.772240 -#> 54 4.5630740 22.942833 -#> 55 17.9328461 19.529736 -#> 56 11.1551001 18.061527 -#> 57 14.4967838 19.530814 -#> 58 23.7038631 14.594430 -#> 59 1.7225141 21.087970 -#> 60 11.6996767 10.602354 -#> 61 8.6116118 21.113845 -#> 62 16.5405817 18.276203 -#> 63 0.3709174 9.700346 -#> 64 10.3711960 10.546526 -#> 65 7.3770224 10.430074 -#> 66 9.0548265 17.787692 -#> 67 12.3101996 11.702569 -#> 68 14.4590148 18.111699 -#> 69 8.1058905 14.617330 -#> 70 9.8003026 23.831542 -#> 71 10.1974744 15.363684 -#> 72 10.8338533 6.533359 -#> 73 9.9157588 10.290579 -#> 74 10.1466736 13.604972 -#> 75 4.7594172 12.817860 -#> 76 8.3190180 22.393860 -#> 77 -0.3923340 14.402588 -#> 78 9.1455180 8.228548 -#> 79 6.5677559 15.082416 -#> 80 8.5926602 19.976364 -#> 81 11.8569538 13.436973 -#> 82 6.0568812 15.543345 -#> 83 11.8152126 8.676890 -#> 84 11.5619152 13.105979 -#> 85 9.2731839 21.402112 -#> 86 16.0865758 15.034537 -#> 87 15.8171716 14.581668 -#> 88 14.8384004 16.811186 -#> 89 14.2539181 15.853230 -#> 90 7.3003148 13.589548 -#> 91 9.9732440 19.856860 -#> 92 7.8443344 20.984054 -#> 93 6.2126264 4.428040 -#> 94 4.0078642 13.763909 -#> 95 10.0587509 20.934616 -#> 96 18.9805758 12.784631 -#> 97 7.5453897 17.766827 -#> 98 8.2656999 17.422929 -#> 99 13.0533179 10.387294 -#> 100 2.5225715 21.149169 +#> 1 7.8530996 13.219378 +#> 2 16.8023066 9.677679 +#> 3 9.6457128 20.385583 +#> 4 8.6392316 20.907878 +#> 5 -2.2334001 15.991960 +#> 6 10.3274332 12.997974 +#> 7 4.5074555 18.080771 +#> 8 6.8341091 24.870784 +#> 9 -0.3182723 24.423312 +#> 10 23.2446601 7.056897 +#> 11 4.2330081 12.300384 +#> 12 8.2968106 9.152693 +#> 13 13.9318129 17.795530 +#> 14 3.6474344 5.903264 +#> 15 12.7107077 16.966720 +#> 16 10.3755295 15.210671 +#> 17 12.7925721 20.898321 +#> 18 12.0770320 13.715394 +#> 19 2.7385012 9.718320 +#> 20 14.7060306 15.993886 +#> 21 8.3053206 18.252668 +#> 22 9.6221288 16.719567 +#> 23 10.2010220 22.387662 +#> 24 10.6215053 15.360128 +#> 25 5.0078372 25.632223 +#> 26 16.1669503 7.619015 +#> 27 11.7021224 17.039442 +#> 28 7.6364876 21.969889 +#> 29 13.5437653 16.801391 +#> 30 2.3552064 18.272751 +#> 31 11.1871267 20.260777 +#> 32 3.4359288 5.102224 +#> 33 13.7351429 21.041928 +#> 34 2.1874078 14.153600 +#> 35 10.3552668 16.475149 +#> 36 6.8023261 21.331703 +#> 37 5.7740213 9.323284 +#> 38 13.3762235 9.344731 +#> 39 15.7668790 15.549967 +#> 40 1.5674763 19.264527 +#> 41 5.4859253 13.828311 +#> 42 16.5881685 25.433443 +#> 43 15.5009487 14.445403 +#> 44 16.0188392 8.035765 +#> 45 2.8436461 9.288546 +#> 46 16.9145543 23.523044 +#> 47 10.0156297 14.599632 +#> 48 9.6105659 12.813594 +#> 49 12.2071411 14.403925 +#> 50 10.6446145 18.932314 +#> 51 5.8489287 12.105274 +#> 52 7.4820355 14.272866 +#> 53 4.0317941 17.632290 +#> 54 6.2413834 23.667891 +#> 55 17.2792070 22.243286 +#> 56 5.8569823 22.590966 +#> 57 11.4488723 13.079964 +#> 58 7.5997326 24.135626 +#> 59 6.9758532 12.242541 +#> 60 17.3005509 10.671232 +#> 61 10.7483968 13.280843 +#> 62 2.8333945 20.314382 +#> 63 9.9484834 19.065291 +#> 64 8.9388198 24.017417 +#> 65 5.4682991 14.474657 +#> 66 -0.5107624 19.912267 +#> 67 19.4668023 6.433487 +#> 68 5.1593708 10.839902 +#> 69 9.4869848 20.502459 +#> 70 11.1997979 14.130899 +#> 71 10.3044945 15.894060 +#> 72 -0.8878801 11.507853 +#> 73 9.4106993 10.197754 +#> 74 10.5614739 10.122885 +#> 75 10.0394310 13.307117 +#> 76 19.3887194 20.761735 +#> 77 20.7937828 17.025506 +#> 78 13.5485726 12.645388 +#> 79 13.8349169 14.333745 +#> 80 8.4589429 21.133412 +#> 81 15.0600092 16.664720 +#> 82 5.4047420 13.264558 +#> 83 12.8169004 14.507247 +#> 84 11.6124137 15.173830 +#> 85 11.8333718 16.930635 +#> 86 15.6491758 15.104156 +#> 87 5.2925096 15.037934 +#> 88 11.0891882 19.654220 +#> 89 17.0770615 11.576250 +#> 90 8.0813348 16.687008 +#> 91 9.1295681 12.939311 +#> 92 8.8912774 19.671306 +#> 93 4.9523564 24.201584 +#> 94 12.4036263 11.475902 +#> 95 18.0220366 15.042552 +#> 96 2.4248774 25.170949 +#> 97 2.9198804 8.291570 +#> 98 14.3838866 20.794896 +#> 99 13.1206621 13.983955 +#> 100 20.5613864 13.109857 #> #>

diff --git a/reference/clear_cache.html b/reference/clear_cache.html index 6481289..8a9b75a 100644 --- a/reference/clear_cache.html +++ b/reference/clear_cache.html @@ -33,6 +33,11 @@ diff --git a/reference/collect_results.html b/reference/collect_results.html index 4473cf9..219ba93 100644 --- a/reference/collect_results.html +++ b/reference/collect_results.html @@ -35,6 +35,11 @@ @@ -189,16 +194,16 @@

Examples#> List of 6 #> $ improvements : tibble [264 × 4] (S3: tbl_df/tbl/data.frame) #> ..$ target : chr [1:264] "ECM" "ECM" "ECM" "ECM" ... -#> ..$ sample : chr [1:264] "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" ... +#> ..$ sample : chr [1:264] "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" ... #> ..$ measure: chr [1:264] "intra.RMSE" "intra.R2" "multi.RMSE" "multi.R2" ... #> ..$ value : num [1:264] 0.1058 92.4635 0.0988 93.4217 0.0101 ... #> $ contributions : tibble [198 × 4] (S3: tbl_df/tbl/data.frame) #> ..$ target: chr [1:198] "ECM" "ECM" "ECM" "ECM" ... -#> ..$ sample: chr [1:198] "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" ... +#> ..$ sample: chr [1:198] "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" ... #> ..$ view : chr [1:198] "intercept" "intra" "para.10" "p.intercept" ... #> ..$ value : num [1:198] -0.074 0.991 0.259 NA 0 ... #> $ importances : tibble [726 × 5] (S3: tbl_df/tbl/data.frame) -#> ..$ sample : chr [1:726] "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" "/tmp/RtmpOkK2iV/file275b42c65302/reference/results/synthetic1" ... +#> ..$ sample : chr [1:726] "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results/synthetic1" ... #> ..$ view : chr [1:726] "intra" "intra" "intra" "intra" ... #> ..$ Predictor : chr [1:726] "ECM" "ECM" "ECM" "ECM" ... #> ..$ Target : chr [1:726] "ECM" "ligA" "ligB" "ligC" ... diff --git a/reference/create_initial_view.html b/reference/create_initial_view.html index 85d4aef..63f1843 100644 --- a/reference/create_initial_view.html +++ b/reference/create_initial_view.html @@ -37,6 +37,11 @@ diff --git a/reference/create_view.html b/reference/create_view.html index 531663d..e9cbc65 100644 --- a/reference/create_view.html +++ b/reference/create_view.html @@ -33,6 +33,11 @@ diff --git a/reference/extract_signature.html b/reference/extract_signature.html index 43a4ad9..d78f478 100644 --- a/reference/extract_signature.html +++ b/reference/extract_signature.html @@ -33,6 +33,11 @@ @@ -157,9 +162,9 @@

Examples#> # A tibble: 3 × 34 #> sample ECM_intra.R2 ECM_multi.R2 ECM_gain.R2 ligA_intra.R2 ligA_multi.R2 #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 /tmp/RtmpOk… 92.5 93.4 0.958 98.6 98.7 -#> 2 /tmp/RtmpOk… 93.2 94.1 0.882 98.7 98.7 -#> 3 /tmp/RtmpOk… 92.7 93.5 0.743 98.6 98.6 +#> 1 /tmp/RtmpP3… 92.5 93.4 0.958 98.6 98.7 +#> 2 /tmp/RtmpP3… 93.2 94.1 0.882 98.7 98.7 +#> 3 /tmp/RtmpP3… 92.7 93.5 0.743 98.6 98.6 #> # ℹ 28 more variables: ligA_gain.R2 <dbl>, ligB_intra.R2 <dbl>, #> # ligB_multi.R2 <dbl>, ligB_gain.R2 <dbl>, ligC_intra.R2 <dbl>, #> # ligC_multi.R2 <dbl>, ligC_gain.R2 <dbl>, ligD_intra.R2 <dbl>, diff --git a/reference/filter_views.html b/reference/filter_views.html index 2522c79..7bdc5f4 100644 --- a/reference/filter_views.html +++ b/reference/filter_views.html @@ -35,6 +35,11 @@ diff --git a/reference/index.html b/reference/index.html index c1f6958..17008c6 100644 --- a/reference/index.html +++ b/reference/index.html @@ -33,6 +33,11 @@ diff --git a/reference/plot_contrast_heatmap-1.png b/reference/plot_contrast_heatmap-1.png index 7d309c7..a4e4e1a 100644 Binary files a/reference/plot_contrast_heatmap-1.png and b/reference/plot_contrast_heatmap-1.png differ diff --git a/reference/plot_contrast_heatmap-2.png b/reference/plot_contrast_heatmap-2.png index 0037e92..8a23c53 100644 Binary files a/reference/plot_contrast_heatmap-2.png and b/reference/plot_contrast_heatmap-2.png differ diff --git a/reference/plot_contrast_heatmap.html b/reference/plot_contrast_heatmap.html index 589b357..9612b0d 100644 --- a/reference/plot_contrast_heatmap.html +++ b/reference/plot_contrast_heatmap.html @@ -35,6 +35,11 @@ diff --git a/reference/plot_contrast_results-1.png b/reference/plot_contrast_results-1.png index 56c08ae..f14918d 100644 Binary files a/reference/plot_contrast_results-1.png and b/reference/plot_contrast_results-1.png differ diff --git a/reference/plot_contrast_results-2.png b/reference/plot_contrast_results-2.png index f07a1ce..81cea25 100644 Binary files a/reference/plot_contrast_results-2.png and b/reference/plot_contrast_results-2.png differ diff --git a/reference/plot_contrast_results-3.png b/reference/plot_contrast_results-3.png index 417ccd0..39c998e 100644 Binary files a/reference/plot_contrast_results-3.png and b/reference/plot_contrast_results-3.png differ diff --git a/reference/plot_contrast_results.html b/reference/plot_contrast_results.html index f845614..dcece23 100644 --- a/reference/plot_contrast_results.html +++ b/reference/plot_contrast_results.html @@ -33,6 +33,11 @@ diff --git a/reference/plot_improvement_stats-1.png b/reference/plot_improvement_stats-1.png index 696f002..4f51829 100644 Binary files a/reference/plot_improvement_stats-1.png and b/reference/plot_improvement_stats-1.png differ diff --git a/reference/plot_improvement_stats-2.png b/reference/plot_improvement_stats-2.png index 87e94ad..228466a 100644 Binary files a/reference/plot_improvement_stats-2.png and b/reference/plot_improvement_stats-2.png differ diff --git a/reference/plot_improvement_stats-3.png b/reference/plot_improvement_stats-3.png index 18733be..f2b9657 100644 Binary files a/reference/plot_improvement_stats-3.png and b/reference/plot_improvement_stats-3.png differ diff --git a/reference/plot_improvement_stats.html b/reference/plot_improvement_stats.html index 156a439..51f8571 100644 --- a/reference/plot_improvement_stats.html +++ b/reference/plot_improvement_stats.html @@ -35,6 +35,11 @@ diff --git a/reference/plot_interaction_communities-1.png b/reference/plot_interaction_communities-1.png index 66a4204..f4831c9 100644 Binary files a/reference/plot_interaction_communities-1.png and b/reference/plot_interaction_communities-1.png differ diff --git a/reference/plot_interaction_communities-2.png b/reference/plot_interaction_communities-2.png index d198ab5..14bea71 100644 Binary files a/reference/plot_interaction_communities-2.png and b/reference/plot_interaction_communities-2.png differ diff --git a/reference/plot_interaction_communities-3.png b/reference/plot_interaction_communities-3.png index 8c0ded0..64bea72 100644 Binary files a/reference/plot_interaction_communities-3.png and b/reference/plot_interaction_communities-3.png differ diff --git a/reference/plot_interaction_communities.html b/reference/plot_interaction_communities.html index d6b2ef1..d6d7c2d 100644 --- a/reference/plot_interaction_communities.html +++ b/reference/plot_interaction_communities.html @@ -33,6 +33,11 @@ diff --git a/reference/plot_interaction_heatmap-1.png b/reference/plot_interaction_heatmap-1.png index 86a0dad..18c57a4 100644 Binary files a/reference/plot_interaction_heatmap-1.png and b/reference/plot_interaction_heatmap-1.png differ diff --git a/reference/plot_interaction_heatmap-2.png b/reference/plot_interaction_heatmap-2.png index c1ceef2..8510873 100644 Binary files a/reference/plot_interaction_heatmap-2.png and b/reference/plot_interaction_heatmap-2.png differ diff --git a/reference/plot_interaction_heatmap.html b/reference/plot_interaction_heatmap.html index 43180f6..0a7546a 100644 --- a/reference/plot_interaction_heatmap.html +++ b/reference/plot_interaction_heatmap.html @@ -33,6 +33,11 @@ diff --git a/reference/plot_view_contributions-1.png b/reference/plot_view_contributions-1.png index 1a4b162..10c8b72 100644 Binary files a/reference/plot_view_contributions-1.png and b/reference/plot_view_contributions-1.png differ diff --git a/reference/plot_view_contributions.html b/reference/plot_view_contributions.html index b679653..70b6a73 100644 --- a/reference/plot_view_contributions.html +++ b/reference/plot_view_contributions.html @@ -35,6 +35,11 @@ diff --git a/reference/reexports.html b/reference/reexports.html index 21d1c2c..5ab81f0 100644 --- a/reference/reexports.html +++ b/reference/reexports.html @@ -47,6 +47,11 @@ @@ -119,7 +124,7 @@

Examplesrun_misty(misty.views) #> #> Training models -#> [1] "/tmp/RtmpOkK2iV/file275b42c65302/reference/results" +#> [1] "/tmp/RtmpP3LlTJ/file2b4621274147/reference/results" diff --git a/reference/remove_views.html b/reference/remove_views.html index cb73b9b..60b410e 100644 --- a/reference/remove_views.html +++ b/reference/remove_views.html @@ -33,6 +33,11 @@ diff --git a/reference/rename_view.html b/reference/rename_view.html index cf4f7cd..44db0c8 100644 --- a/reference/rename_view.html +++ b/reference/rename_view.html @@ -33,6 +33,11 @@ @@ -124,14 +129,14 @@

Examples#> $ intraview :List of 2 #> ..$ abbrev: chr "intra" #> ..$ data :'data.frame': 100 obs. of 2 variables: -#> .. ..$ marker1: num [1:100] 12.12 13.19 11.1 9.31 10.35 ... -#> .. ..$ marker2: num [1:100] 15.6 11.1 16.2 15.6 13.9 ... -#> $ misty.uniqueid: chr "d89c737606e6292beb7d2912d904e5a3" +#> .. ..$ marker1: num [1:100] 7.05 7.19 13.98 9.18 8.68 ... +#> .. ..$ marker2: num [1:100] 5.82 17.39 13.54 7.83 18.56 ... +#> $ misty.uniqueid: chr "397aabb41517c46aac7d78a2001bec9f" #> $ originalname :List of 2 #> ..$ abbrev: chr "on" #> ..$ data :'data.frame': 100 obs. of 2 variables: -#> .. ..$ marker1: num [1:100] 11.56 11.54 5.71 8.75 10.59 ... -#> .. ..$ marker2: num [1:100] 21.66 16.14 9.49 22.09 14.42 ... +#> .. ..$ marker1: num [1:100] 12.61 9.46 12.83 17.66 8.12 ... +#> .. ..$ marker2: num [1:100] 20.7 17.2 19.1 20.7 17.1 ... # rename and preview misty.views %>% @@ -141,14 +146,14 @@

Examples#> $ intraview :List of 2 #> ..$ abbrev: chr "intra" #> ..$ data :'data.frame': 100 obs. of 2 variables: -#> .. ..$ marker1: num [1:100] 12.12 13.19 11.1 9.31 10.35 ... -#> .. ..$ marker2: num [1:100] 15.6 11.1 16.2 15.6 13.9 ... -#> $ misty.uniqueid: chr "d89c737606e6292beb7d2912d904e5a3" +#> .. ..$ marker1: num [1:100] 7.05 7.19 13.98 9.18 8.68 ... +#> .. ..$ marker2: num [1:100] 5.82 17.39 13.54 7.83 18.56 ... +#> $ misty.uniqueid: chr "397aabb41517c46aac7d78a2001bec9f" #> $ renamed :List of 2 #> ..$ abbrev: chr "rn" #> ..$ data :'data.frame': 100 obs. of 2 variables: -#> .. ..$ marker1: num [1:100] 11.56 11.54 5.71 8.75 10.59 ... -#> .. ..$ marker2: num [1:100] 21.66 16.14 9.49 22.09 14.42 ... +#> .. ..$ marker1: num [1:100] 12.61 9.46 12.83 17.66 8.12 ... +#> .. ..$ marker2: num [1:100] 20.7 17.2 19.1 20.7 17.1 ...