Giter VIP home page Giter VIP logo

gggsea's People

Contributors

nicolash2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gggsea's Issues

Wrapping pathway names in the strip at the top of GSEA subplots

Hello, is there a way to break the names of long pathways into multiple lines of text in the strips associated with each pathway results in gggsea. I love the tool but sometimes it is becoming hard to read the pathway names above the enrichment plots.
Thanks in advance.
Sujoy
pathway_crop2_011624
pathway_crop1_011624
pathway_crop2_011624
pathway_crop1_011624

gseaCurve function throwing a `dplyr::nth()`: error

I am running fgsea and then using gggsea to generate enrichment plots. The fgsea function runs fine and generates the expected output. But when I try to run gseaCurve on the results, I am getting the following error:
Error in dplyr::nth():
! Can't convert from n to due to loss of precision.
• Locations: 1
#the code I used is given below
#----------------------------------------------------------------------------------------------------
#run fgsea

fgseaRes = fgsea(pathways = wiki,
stats = ranks,
eps = 0,
minSize = 15,
maxSize = 250)
#---------------------------------------------------------------------------------------------------------------
#see top 6 rows of fgsea output
head(fgseaRes[order(pval),])
pathway pval padj log2err ES NES size
1: WP_CYTOPLASMIC_RIBOSOMAL_PROTEINS 1.447420e-06 0.0006064688 0.6435518 0.5371137 2.041871 86
2: WP_MIRNA_TARGETS_IN_ECM_AND_MEMBRANE_RECEPTORS 1.549642e-04 0.0324649906 0.5188481 -0.7044984 -2.018585 21
3: WP_PI3KAKT_SIGNALING_PATHWAY 5.404412e-04 0.0754816230 0.4772708 -0.3456294 -1.521484 210
4: WP_FOCAL_ADHESION 8.625880e-04 0.0903560961 0.4772708 -0.3736142 -1.577802 156
5: WP_FOCAL_ADHESION_PI3KAKTMTORSIGNALING_PATHWAY 1.350562e-03 0.1042326774 0.4550599 -0.3365220 -1.481279 208
6: WP_OXIDATIVE_PHOSPHORYLATION 1.646682e-03 0.1042326774 0.4550599 0.4791410 1.705835 59
leadingEdge
1: RPL18A,RPS15,RPL29,RPL10,RPS11,RPL28,...
2: COL3A1,COL5A3,THBS2,LAMA4,COL4A1,COL1A2,...
3: PIK3CD,IL7R,PGF,EFNA1,FGF1,KDR,...
4: PIK3CD,PGF,HCK,KDR,COL1A1,ITGA8,...
5: PIK3CD,IL7R,PGF,EFNA1,FGF1,KDR,...
6: NDUFA4L2,NDUFA3,NDUFS7,ATP5F1D,ATP5MC2,NDUFS6,...
#-------------------------------------------------------------------------------------------------------------------------
#run gggsea
devtools::install_github("nicolash2/gggsea")
library(gggsea)
#call sorted ranked file and selected pathways file
rl = ranks
setlist = wiki[topPathways]
res = gseaCurve(rl, setlist, fgseaRes)
Error in dplyr::nth():
! Can't convert from n to due to loss of precision.
• Locations: 1
Run rlang::last_error() to see where the error occurred.
#backtrace of the error
Backtrace:

  1. └─gggsea::gseaCurve(rl, setlist, fgseaRes)
  2. └─base::mapply(...)
  3. └─gggsea (local) `<fn>`(set = dots[[1L]][[1L]], setname = dots[[2L]][[1L]])
    
  4.   ├─base::merge(...)
    
  5.   ├─base::merge.data.frame(...)
    
  6.   │ ├─base::nrow(y <- as.data.frame(y))
    
  7.   │ └─base::as.data.frame(y)
    
  8.   └─gggsea:::.colorGradient(rl, lowestPoint, sizeFactor)
    
  9.     ├─base::unlist(...)
    
  10.     └─base::lapply(...)
    
  11.       └─gggsea (local) FUN(X[[i]], ...)
    
  12.         └─**dplyr::nth(sort(abs(rl)), length(rl) * x)**
    
  13.           └─vctrs::vec_cast(n, to = integer(), x_arg = "n")
    
  14.             └─vctrs (local) `<fn>`()
    
  15.               └─vctrs:::vec_cast.integer.double(...)
    
  16.                 └─vctrs::maybe_lossy_cast(...)
    
  17.                   ├─base::withRestarts(...)
    
  18.                   │ └─base (local) withOneRestart(expr, restarts[[1L]])
    
  19.                   │   └─base (local) doWithOneRestart(return(expr), restart)
    
  20.                   └─vctrs:::stop_lossy_cast(...)
    
  21.                     └─vctrs::stop_incompatible_cast(...)
    
  22.                       └─vctrs::stop_incompatible_type(...)
    
  23.                         └─vctrs:::stop_incompatible(...)
    
  24.                           └─vctrs:::stop_vctrs(...)
    
  25.                             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
    

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.