Giter Site home page Giter Site logo

Comments (17)

plger avatar plger commented on June 23, 2024

Thanks a lot for reporting this, yes they should be the same. Fortunately the error was only in the reporting, and shouldn't have affected the doublet scores.

It error should be fixed now on the github version (would be happy if you could confirm with your dataset), and I'll push it to Bioc devel once the checks have passed.

from scdblfinder.

plger avatar plger commented on June 23, 2024

Hi @Yunuuuu ,
could you confirm that this solved your problem? Will close the issue if there's no answer.
Pierre-Luc

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

Hi, I downloaded the latest plger/scDblFinder using pak::pkg_install and restart R, it remains here:

image

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

I checked the source code of scDblFindeer function, which indicates this has been modified:

image

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

I try to understand the code, but I'm not familiar with the internal function:
image

when samples is not NULL and returnType is "sce" or "full", following code won't run in scDblFinder funtion:

        if (returnType == "counts") {
            for (s in names(d)) d[[s]]$sample <- s
            return(do.call(cbind, d))
        }

from scdblfinder.

plger avatar plger commented on June 23, 2024

You're absolutely right, I did this too quickly... should hopefully be fixed for real in the latest push :)

from scdblfinder.

plger avatar plger commented on June 23, 2024

@Yunuuuu , hopefully everything is as expected now?

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

I'll try this again @plger

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

It remains here:
image

the package GithubSHA1 is here:
image

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

Thanks for the development of this package @plger, I'll do more test this weekend, I cannot find what's wrong now

from scdblfinder.

plger avatar plger commented on June 23, 2024

Hi @Yunuuuu , okay now I don't get why you're having this problem, as I can't reproduce it with my toy data. Could you share a minimal example, e.g. SCE with only count matrix and sample id, only 2-300 genes, perhaps subsampling the cells? (you can rename genes & remove other cell metadata if you're worried about the data)

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

Is there any method to share rds data ?

from scdblfinder.

plger avatar plger commented on June 23, 2024

You can email it to [email protected] if it's <20mb, otherwise if you don't have a platform for sharing of larger files you can write me an email and I'll send you some details.
Thanks!

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

hi, I have uploaded it to the Google Drive,and the link has been emailed to [email protected]. I can confirm this data can induce the problem. Thanks!

[R]> set.seed(221113L)
[R]> anyDuplicated(colnames(test_data))
[1] 3466
[R]> sce_qc <- scDblFinder::scDblFinder(
         test_data,
         clusters = TRUE, dims = 50L,
         nfeatures = 2000L,
         samples = "Sample",
         multiSampleMode = "split",
         returnType = "sce"
     )
There were 26 warnings (use warnings() to see them)

[R]> data.frame(colData(sce_qc)) %>%
         dplyr::select(Sample, scDblFinder.sample
     ) %>% 
         dplyr::filter(Sample != scDblFinder.samp
     le) %>% 
         head()
                      Sample scDblFinder.sample
TTTCCTCTCAACTCTT-1   sample3            sample2
GTCAAACTCCACGAAT-1   sample3            sample1
GGTTAACCAGCGCTTG-1   sample3            sample2
AGCATCATCGGCTTGG-1.1 sample3            sample1
TGGAACTGTGACAGCA-1.1 sample3            sample1

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

It seems the column cell names matters, for I have some duplicated column names ? By changing colnames with colnames(test_data) <- paste0("cell_", seq_len(ncol(test_data))), this problem can be figured out.


[R]> colnames(test_data) <- paste0("cell_", seq_l
     en(ncol(test_data)))
[R]> anyDuplicated(colnames(test_data)) 
[1] 0
[R]> set.seed(221113L)

[R]> sce_qc <- scDblFinder::scDblFinder(
         test_data,
         clusters = TRUE, dims = 50L,
         nfeatures = 2000L,
         samples = "Sample",
         multiSampleMode = "split",
         returnType = "sce"
     )
There were 28 warnings (use warnings() to see them)

[R]> # logNormCounts
     data.frame(colData(sce_qc)) %>%
         dplyr::select(Sample, scDblFinder.sample
     ) %>% 
         dplyr::filter(Sample != scDblFinder.samp
     le) %>% 
         head()
[1] Sample             scDblFinder.sample
<0 rows> (or 0-length row.names)

from scdblfinder.

plger avatar plger commented on June 23, 2024

Ok, thanks @Yunuuuu , that explains a lot.
I'm afraid I'm going to have to throw an error msg on duplicated colnames, because I need to match the cells with the original object (to provide the full original object with added slots).

from scdblfinder.

Yunuuuu avatar Yunuuuu commented on June 23, 2024

@plger Thanks a lot, enforcing unique colnames have already solved this.

from scdblfinder.

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.