Code Monkey home page Code Monkey logo

Comments (3)

enblacar avatar enblacar commented on June 15, 2024 1

Hi @rbutleriii,

Thanks for using my package!

The error seems to arise due to recent implementations in liana. With version 0.1.6 the code you provided works perfectly.
I assume this is related to the changes in how interactions are sorted depending on different parameters.

I will have to go back to the code and update it to match the newest version of liana. Sorry for the inconveniences!

You can download a version of liana compatible with the function here.

Will update this once I fix it!
Best,
Enrique

from scpubr.

dbdimitrov avatar dbdimitrov commented on June 15, 2024

@enblacar this relates to my other issue, perhaps having SCpubr as a dependency of liana, and hence doing my unittests with it would resolve any such potential inconsistencies :)

from scpubr.

enblacar avatar enblacar commented on June 15, 2024

Hi @rbutleriii,

Sorry for taking that long in implementing the changes!

I have updated the code for SCpubr::do_LigandReceptorPlot() to work perfectly with liana v0.1.12 and will roll out in the next, big, SCpubr v2.0.0 update.

Here is an example output with your same code, adapted to the various modifications added to the function:

library(magrittr)
library(liana)
library(SCpubr)

liana_path <- system.file(package="liana")
testdata <- readRDS(file.path(liana_path , "testdata", "input", "testdata.rds"))
liana_test <- liana::liana_wrap(testdata) %>% liana::liana_aggregate()

# Chord diagram of the total significant interactions from each cluster and all the rest.
out <- do_LigandReceptorPlot(liana_output = liana_test, 
                             top_interactions = 25, 
                             return_interactions = TRUE)

# Retrieve Plot.
out$Plot

LR1

And now, you need to plot the chord diagrams yourself with the output tibbles:

## Total number of interactions per group.
SCpubr::do_ChordDiagramPlot(from_df = TRUE, 
                            df = out$`Group Interactions`, 
                            link.border.color = "black", 
                            z_index = TRUE)

LR2

## Total number of interactions per LR pair.
SCpubr::do_ChordDiagramPlot(from_df = TRUE, 
                            df = out$`LR Interactions`, 
                            link.border.color = "black", 
                            z_index = TRUE)

LR3

I hope this helps! Stay tuned for the update on CRAN! If you want to use it right now, please be aware that downloading the latest commits effectively downloads a v2.0.0 of SCpubr with all the breaking changes this involves.

Best,
Enrique

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.