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

changing k.weight in RunAzimuth seems does not allow workaround error in FindWeights #197

Open
mkazanov opened this issue Dec 30, 2023 · 0 comments

Comments

@mkazanov
Copy link

It seems that changing k.weight in RunAzimuth does not influence the results and does not allow to workaround the error in FindWeights function:

> so1 <- RunAzimuth(so1, reference="mousecortexref")

Warning: Overwriting miscellanous data for model
Warning: Adding a dimensional reduction (refUMAP) without the associated assay being present
Warning: Adding a dimensional reduction (refUMAP) without the associated assay being present
detected inputs from MOUSE with id type Gene.name
reference rownames detected MOUSE with id type Gene.name
Normalizing query using reference SCT model
Warning: No layers found matching search pattern provided
Warning: 65 features of the features specified were not present in both the reference query assays. 
Continuing with remaining 2935 features.
Projecting cell embeddings
Finding query neighbors
Finding neighborhoods
Finding anchors
	Found 103 anchors
Finding integration vectors
Finding integration vector weights
Error in FindWeights(object = combined.ob, reduction = weight.reduction,  : 
  Number of anchor cells is less than k.weight. Consider lowering k.weight to less than 43 or increase k.anchor.

so1 <- RunAzimuth(so1, reference="mousecortexref", k.weight = 20)

Warning: Overwriting miscellanous data for model
Warning: Adding a dimensional reduction (refUMAP) without the associated assay being present
Warning: Adding a dimensional reduction (refUMAP) without the associated assay being present
detected inputs from MOUSE with id type Gene.name
reference rownames detected MOUSE with id type Gene.name
Normalizing query using reference SCT model
Warning: No layers found matching search pattern provided
Warning: 65 features of the features specified were not present in both the reference query assays. 
Continuing with remaining 2935 features.
Projecting cell embeddings
Finding query neighbors
Finding neighborhoods
Finding anchors
	Found 103 anchors
Finding integration vectors
Finding integration vector weights
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Predicting cell labels
Predicting cell labels
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Predicting cell labels
Predicting cell labels
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
  |                                                  | 0 % ~calculating  
Integrating dataset 2 with reference dataset
Finding integration vectors
Integrating data
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
Warning: Keys should be one or more alphanumeric characters followed by an underscore, setting key from integrated_dr_ to integrateddr_
Computing nearest neighbors
Warning: The default method for RunUMAP has changed from calling Python UMAP via reticulate to the R-native UWOT using the cosine metric
To use Python UMAP via reticulate, set umap.method to 'umap-learn' and metric to 'correlation'
This message will be shown once per session
Running UMAP projection
13:39:37 Read 727 rows
13:39:37 Processing block 1 of 1
13:39:37 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 20
13:39:37 Initializing by weighted average of neighbor coordinates using 1 thread
13:39:37 Commencing optimization for 67 epochs, with 14540 positive edges
Using method 'umap'
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:39:37 Finished
Projecting reference PCA onto query
Finding integration vector weights
Error in FindWeights(object = combined.object, integration.name = "IT1",  : 
  Number of anchor cells is less than k.weight. Consider lowering k.weight to less than 43 or increase k.anchor.
In addition: Warning messages:
1: In RunUMAP.default(object = neighborlist, reduction.model = reduction.model,  :
  Number of neighbors between query and reference is not equal to the number of neighbors within reference
2: No assay specified, setting assay as RNA by default. 
@mkazanov mkazanov changed the title changing k.weight in RunAzimuth seems does not influence the results changing k.weight in RunAzimuth seems does not allow workaround error in FindWeights Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant