Giter Club home page Giter Club logo

dot's Introduction

DOT: Flexible Feature Transfer to Spatial Omics

R-CMD-check GitHub issues

Overview

DOT is a method for transferring cell features from a reference single-cell RNA-seq data to spots/cells in spatial omics. It operates by optimizing a combination of multiple objectives using a Frank-Wolfe algorithm to produce a high quality transfer. Apart from transferring cell types/states to spatial omics, DOT can be used for transferring other relevant categorical or continuous features from one set of omics to another, such as estimating the expression of missinng genes or transferring transcription factor/pathway activities.

For more information about how this package has been used with real data and expected outputs, please check the following link:

Installation

DOT is available under the R package DOTr which you can install from GitHub with:

devtools::install_github("saezlab/DOT")

Dependencies

  • R (>= 4.0)
  • R packages: fields, ggplot2, Matrix, methods, Seurat, stats, stringr

For optimal performance on moderately sized instances, we recommend at least 4 GB of RAM. For large reference scRNA-seq data or very large spatial instances higher memory may be required.

Installation takes less than five minutes. The sample dataset provided can be run in less than a minute on a "normal" desktop computer. DOT takes approximately 7 minutes to process a MERFISH MOp dataset with approximately 250 genes, 100 cell types and 4,000 spots.

Operating system tested on: macOS Monterey 12.4

Citation

If you use DOT for your research please cite the following article:

Rahimi, A., Vale-Silva, L.A., Fälth Savitski, M. et al. DOT: a flexible multi-objective optimization framework for transferring features across single-cell and spatial omics. Nat Commun 15, 4994 (2024). https://doi.org/10.1038/s41467-024-48868-z.

dot's People

Contributors

arezourahimi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dot's Issues

Gene Expression Inference

Hello,

Could you kindly provide more information on how to infer missing genes within the spatial data? Where is the transport Matrix?

Thanks,
Amina

choosing run.DOT.highresolution/ run.DOT.lowresolution

@arezourahimi I am using DOT and I noticed you don't specify which technology you mean for low and high resolution for choosing btwrun.DOT.highresolutionandrun.DOT.lowresolution functions. Would be useful to add them which is already in preprint:
High resolution (e.g.,smFISH, MERFISH, ISS, Xenium)
Low resolution (e.g.,Visium, Slide-seq)

AnnData as input to setup.srt()

Hi,

Thank you for this package. It looks great and I'm really looking forward to using it!

I'm struggling a little with setting up my srt object with an anndata input. I load the anndata from a h5ad file
Screenshot 2024-06-20 at 11 35 52

and then try

dot.srt <- setup.srt(srt_data=ex_anndata$X, srt_coords=ex_anndata$obsm["spatial"])
My ex_anndata$X seems to be a matrix

Screenshot 2024-06-20 at 11 36 34

and my coordinates from ex_anndata$obsm["spatial"] are the same length as my matrix

Screenshot 2024-06-20 at 11 37 08 Screenshot 2024-06-20 at 11 37 36

Please could I check if there's something I'm missing?

I can load from a standard xenium output using the Seurat LoadXenium() function but I've changed the segmentation and saved to a xenium experiment format with sopa, and then Seurat is having trouble with the cell_feature_matrix.zarr.zip files which is why I've gone the h5ad anndata route.

Thank you,

Best wishes,
Emily

Issues in setup.ref() with Seurat v5

When DOT does highly variable gene selection for setup.ref() it throws the following error:

Error in order(vg$vst.variance.standardized, decreasing = TRUE) : 
  argument 1 is not a vector
Calls: setup.ref -> order

This is due to the fact that they have refactored the output of FindVariableFeatures and how it is stored in the Seurat object.

I have fixed it for my scripts by doing:

if (seurat_obj %>% nrow() > max_genes){
    vg <- Seurat::FindVariableFeatures(seurat_obj, selection.method = "vst") %>% HVFInfo()
    vg <- rownames(vg)[order(vg$variance.standardized,  decreasing = TRUE)[1:max_genes]]
    seurat_obj <- seurat_obj[vg, ]
}

before running setup.ref()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.