Git Product home page Git Product logo

Comments (5)

govekk avatar govekk commented on June 8, 2024

Hi, thanks for using our package.

The errors from the first section of code are generic errors produced by the parallelized mclapply function. You'll need to run the same MapCODEXtoCITE function with num_cores=1 to get usable error messages. Also, since that function is parallelized over the chunks of data, it is only reasonable to use num_cores < num_chunks, though I checked that it shouldn't produce an error if you go over.

The errors from the second section imply your parameters in the earlier functions do not match your parameters in the call to ScoreAnchors(). What are all of the variables shown in that code set to? It might help if you include your full code for the step by step pipeline, including variable and parameter assignments.

A few other clarification questions:

  1. What environment are you running STvEA in? Are you using our Docker image? If not, what version of R are you using?
  2. What are the dimensions of your CITE-seq and CODEX protein matrices, and how many proteins do they have in common? Please confirm that you have set row and column names for both matrices, and that stvea_object@codex_protein and stvea_object@cite_protein have the correct rows and columns (accounting for filtering).

from stvea.

aanchalsharma833 avatar aanchalsharma833 commented on June 8, 2024

Thanks for your reply. But I could resolve the issue. The problem was in sectioning/subsetting the codex data. There were very few cells upon subsetting. I changed the parameters to include more cells.

Although there is another issue I am facing in plotting the Cite seq data.

ggplot(stvea_object@cite_emb, aes_string(x = colnames(stvea_object@cite_emb)[1],  y = colnames(stvea_object@cite_emb)[2], color = factor(1:length(color)))) + geom_point(size = pt_size) + labs(title = paste(print_type,  "expression"), subtitle = subtitle) + scale_color_manual(values = alpha(color,  1), guide = FALSE) + theme_void()
Error: Aesthetics must be either length 1 or the same as the data (1310): colour
Run `rlang::last_error()` to see where the error occurred.

I tried removing color = factor(1:length(color)) and plot it. It gives me the plot but without colors. Example plots appear fine. Any clue what is happening?

Also, another error:

cite_cluster_adj <- AdjScoreClustersCITE(stvea_object, k=3, num_cores=8)
Error in cluster_matrix %*% t(transfer_matrix) : 
  Cholmod error 'X and/or Y have wrong dimensions' at file ../MatrixOps/cholmod_sdmult.c, line 88

Any insight is appreciated.

from stvea.

govekk avatar govekk commented on June 8, 2024

That makes sense. Sorry for the delay getting back to this.

I am assuming you are calling PlotExprCITE? The ggplot call probably doesn't work on its own outside of that function, since the color variable is not defined. The most likely reason you would be getting that error inside the PlotExprCITE function is if the mRNA or protein expression matrices do not have the same number of cells as the UMAP embedding matrix. Can you check the dimensions of stvea_object@cite_emb, stvea_object@cite_mRNA_norm, and stvea_object@cite_protein?

Your second error is also a dimensions issue - stvea_object@transfer_matrix should have the same number of columns as stvea_object@cite_clusters.

from stvea.

aanchalsharma833 avatar aanchalsharma833 commented on June 8, 2024

Thanks for pointing out. The dimensions of my latent space data and mRNA data were different. Getting latent space data for same no.of cells as mRNA solved the issue.

Another error I am facing is in GetUmapCODEX() call:

>stvea_object <- GetUmapCODEX(stvea_object, metric = 'pearson', n_neighbors=30, min_dist=0.1, negative_sample_rate = 50)
Error in if (abs(val - target) < tolerance) { : 
  missing value where TRUE/FALSE needed

>traceback()
5: smooth.knn.dist(knn$distance, nk, local.connectivity = connectivity, 
       bandwidth = bandwidth)
4: naive.fuzzy.simplicial.set(knn, config)
3: implementations[[method]](d, config)
2: umap::umap(stvea_object@codex_clean, ...)
1: GetUmapCODEX(stvea_object, metric = "pearson", n_neighbors = 30, 
       min_dist = 0.1, negative_sample_rate = 50)

Any suggestions would be appreciated.

from stvea.

aanchalsharma833 avatar aanchalsharma833 commented on June 8, 2024

Solved the above mentioned error.
It was caused due to the wrong codex_size information being loaded. It seems the codex_size variable is defined as we load the STvEA library. And the default variable is used in case we are not defining the codex_size variable by reading the size file. Probably a potential bug to be resolved in future updates.

from stvea.

Related Issues (13)

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.