Giter Club home page Giter Club logo

Comments (3)

enblacar avatar enblacar commented on June 16, 2024 1

Hi @kaizen89,

Thanks for using my package!

Regarding SCpubr::do_EnrichmentHeatmap() with flavor = "UCell", the requirement of having R v4.2.0 is set by the UCell developers and I have no saying on that. I hope you understand.

The function SCpubr::do_ExpressionHeatmap() is still an in-development function that will be added in the next CRAN update. If you still want to use it, make sure that you have updated SCpubr to the latest commit. The error log that you have there stems from the fact that the function is not exported in your current version-commit of the development package. You can access the function via the last commit:

devtools::install_github("enblacar/SCpubr", ref = "41d1fb451fd17e0a55a2d4881f8d315b516841c7")

However, since you are using the development version outside the specific releases pinned here, errors are to be expected.

Having all this said, this function is designed to work with genes only (more precisely, with the features of the provided assay), as the idea of it is to see the expression on a common color scale. So far I did not anticipate people trying to use it with other metadata variables, but this is something I will probably restrict via a specific error message before update v1.1.0, as otherwise you might include a gene than ranges expression from 0 to 1 and the include the UMI column that might bring the scale from 0 to 8000.

If you still want to use the UCell scorings that you seem to have already computed in the object, I'd suggest creating a specific assay with them:

# Retrieve your scores.
scores <- sample@meta.data[, paste0(names(top50_signature),"_UCell_sig")]

# Turn it into a matrix (scorings become the features, cells remain as cells).
scores <- t(as.matrix(scores))

# Create an assay object.
scores_assay <- Seurat::CreateAssayObject(counts = scores)

# Add it to your Seurat object.
sample@assays$UCell_scoring <- scores_assay

# Plot the features.
p <- SCpubr::do_ExpressionHeatmap(sample = sample, 
                                  features = paste0(names(top50_signature),"_UCell_sig"), 
                                  assay = "UCell_scoring")
p

That should do the trick for you!

Best,
Enrique

from scpubr.

enblacar avatar enblacar commented on June 16, 2024 1

Hi @kaizen89,

SCpubr version 1.1.0 is already on CRAN!

Please consider updating to get all the new functionalities:

install.packages("SCpubr")

Thanks again for using the package!
Enrique

from scpubr.

kaizen89 avatar kaizen89 commented on June 16, 2024

Thanks for your prompt response

from scpubr.

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.