Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predefined Graph Import Still Not Available to Use #318

Open
DarioS opened this issue Apr 10, 2024 · 6 comments
Open

Predefined Graph Import Still Not Available to Use #318

DarioS opened this issue Apr 10, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@DarioS
Copy link

DarioS commented Apr 10, 2024

In progress: we are perfecting the functionality to add a precomputed KNN graph (for example constructed with Seurat or scanpy) to the graph slot using the adjacency matrix.

It has been in the vignette for the past three years.

@MikeDMorgan MikeDMorgan added the documentation Improvements or additions to documentation label Apr 22, 2024
@MikeDMorgan
Copy link
Member

Noted, thanks.

@MikeDMorgan
Copy link
Member

FYI - it is possible to use a precomputed graph from Seurat, etc, it's just the text that is outdated.

@shaln
Copy link

shaln commented Apr 23, 2024

@MikeDMorgan how can I do that? I got the following error when trying to do so using the buildFromAdjacency function. Not quite sure where to begin troubleshooting this, so any help would be greatly appreciated! Thanks.

> all.samples <- readRDS('RDS Files/all.samples.RDS')
> allsamples.sce <- as.SingleCellExperiment(all.samples)
> allsamples.milo <- Milo(allsamples.sce)
> miloR::graph(allsamples.milo) <- miloR::graph(buildFromAdjacency(all.samples@graphs$SCT_snn, k = 20))
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'graph': missing value where TRUE/FALSE needed
In addition: Warning message:
In nrow(x) * ncol(x) : NAs produced by integer overflow

> allsamples.milo
class: Milo 
dim: 24615 48315 
metadata(0):
assays(2): counts logcounts
rownames(24615): AL627309.1 AL669831.5 ... TMEM200C PDYN-AS1
rowData names(0):
colnames(48315): Control_D5_AAACCCAGTAGCGCTC-1 Control_D5_AAACCCAGTCCTACGG-1 ...
  ER_D9_TTTGTTGGTGCTCTCT-1 ER_D9_TTTGTTGTCTATGTGG-1
colData names(26): orig.ident nCount_RNA ... clusters.orig.ident ident
reducedDimNames(2): PCA UMAP
mainExpName: SCT
altExpNames(0):
nhoods dimensions(2): 1 1
nhoodCounts dimensions(2): 1 1
nhoodDistances dimension(1): 0
graph names(0):
nhoodIndex names(1): 0
nhoodExpression dimension(2): 1 1
nhoodReducedDim names(0):
nhoodGraph names(0):
nhoodAdjacency dimension(2): 1 1

@MikeDMorgan
Copy link
Member

The error suggests that there may be an issue with the SNN graph from Seurat - can you double check the output from buildFromAdjacency(all.samples@graphs$SCT_snn, k = 20) is a valid Milo object.

@kiwipeel
Copy link

kiwipeel commented Oct 2, 2024

Can you please share the codes for seurat objects? I succesfully created milo object from my snn graph but milo@.k is always null. and ı dont know why but spatialfdr values are equeal to NA. But ı got spatialfdr values when ı use directly buildgraph function

@carolienv
Copy link

Is it expected that buildFromAdjacency takes up a lot of memory on big datasets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants