Code Monkey home page Code Monkey logo

Comments (5)

akhiadber avatar akhiadber commented on June 20, 2024

please paste the output of length(mc@colors) and max(mc@mc), assuming your metacell object is named 'mc'. Assuming this is the mismatch, we'll look into why this mismatch happens when running mcell_mc_split_filt.

from metacell.

nixstix avatar nixstix commented on June 20, 2024

Hi, thanks for the quick response! Indeed this was the mismatch. The output length(mc@colors) was 1, and max(mc@mc) was 22. When I populated mc@colors with 22 colors (e.g. using mc_colorize_default it worked.

from metacell.

akhiadber avatar akhiadber commented on June 20, 2024

We'll still look into why the length of mc@colors was 1 when running the split function, assuming you didn't set this on purpose. For now coloring in some manner is the workaround

from metacell.

nixstix avatar nixstix commented on June 20, 2024

We did not set anything regarding the colours. If you need a reproducible example, I can email you a subset of data and the code we are using.

from metacell.

UboCA avatar UboCA commented on June 20, 2024

Hi, thanks for the quick response! Indeed this was the mismatch. The output length(mc@colors) was 1, and max(mc@mc) was 22. When I populated mc@colors with 22 colors (e.g. using mc_colorize_default it worked.

Indeed, I have met the similar error as above. After checking mc_outliers.r, here may be the issue:

mcell_mc_split_filt = function(new_mc_id, mc_id, mat_id, T_lfc, plot_mats=T, dirichlet=F)
{
        #......
        new_mc = rep(NA, length(mc@mc))
	names(new_mc) = names(mc@mc)
        #......	
        new_mc = new_mc[setdiff(names(new_mc),new_outliers)]
	scdb_add_mc(new_mc_id, tgMCCov(new_mc, new_outliers, mat))
}

Since new_mc@colors was no assigned, what I'll add to after running mcell_mc_split_filt is as followed:

mcell_mc_split_filt(new_mc_id=paste0(id,'_filt'),   
            mc_id=id, 
            mat_id=id,
            T_lfc=3, plot_mats=F)
# restore mc@colors as one unknown bug-> return 1 after function 'mcell_mc_split_filt'
mc_filt = scdb_mc(paste0(id,'_filt'))
mc_filt@colors = rep(NA, max(mc_filt@mc))
names(mc_filt@colors) = 1:max(mc_filt@mc)
scdb_add_mc(paste0(id,'_filt'),mc_filt)

That takes a fair bit of redundancy as it runs after 'mcell_mc_split_filt' but not in it.

Hope that helps.
Best

from metacell.

Related Issues (20)

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.