Git Product home page Git Product logo

Comments (3)

LuyiTian avatar LuyiTian commented on July 18, 2024

The data in logcounts data slot are log normalized expression using scran package, not just log2 transformed count value.
The code I used looks like:

sce <- computeSumFactors(sce)
sce <- normalize(sce)

The scran webpage have more detail: bioconductor.org/packages/release/bioc/vignettes/scran/inst/doc/scran.html

from sc_mixology.

lovivi avatar lovivi commented on July 18, 2024

Sorry, I still can't get the result of logcounts. What parameters did I miss? Or I have a suspicious warning when I run it.

load('./bulk_sc/CellBench_script/data/sincell_with_class.RData')
max(c(sce_sc_CELseq2_qc@assays$data@listData$logcounts)) ## 11.84594
[1] 11.84594
max(log2(c(sce_sc_CELseq2_qc@assays$data@listData$counts)+1))
[1] 11.53819
max(log2(c(sce_sc_CELseq2_qc@assays$data@listData$counts)))
[1] 11.5377
#######################
sce <- sce_sc_CELseq2_qc
logcounts(sce) <- NULL
#counts(sce) <- counts(sce)+1
sce <- scran::computeSumFactors(sce)
sce <- scater::normalize(sce)
Warning message:
In .get_all_sf_sets(object) :
spike-in set 'ERCC' should have its own size factors
max(c(sce@assays$data@listData$logcounts)) ## 11.84798
[1] 11.84798
########################
sce <- sce_sc_CELseq2_qc
logcounts(sce) <- NULL
sce <- scran::computeSumFactors(sce)
sce <- BiocGenerics::normalize(sce)
Warning message:
In .get_all_sf_sets(object) :
spike-in set 'ERCC' should have its own size factors
max(c(sce@assays$data@listData$logcounts)) ## 11.84798
[1] 11.84798

from sc_mixology.

lovivi avatar lovivi commented on July 18, 2024

ok, i find the method!

sce2 <- scran::computeSpikeFactors(sce, general.use=FALSE)
sce2 <- normalize(sce2)

from sc_mixology.

Related Issues (15)

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.