{"id":13774451,"url":"https://github.com/bvieth/powsimR","last_synced_at":"2025-05-11T06:33:08.541Z","repository":{"id":49120570,"uuid":"88427309","full_name":"bvieth/powsimR","owner":"bvieth","description":"Power analysis is essential to optimize the design of RNA-seq experiments and to assess and compare the power to detect differentially expressed genes. PowsimR is a flexible tool to simulate and evaluate differential expression from bulk and especially single-cell RNA-seq data making it suitable for a priori and posterior power analyses.","archived":false,"fork":false,"pushed_at":"2023-08-01T09:59:42.000Z","size":76044,"stargazers_count":102,"open_issues_count":5,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-02-24T14:30:53.341Z","etag":null,"topics":["experimental-design","gene-expression","power","power-analysis","r","rna-seq","simulation","simulation-framework","single-cell"],"latest_commit_sha":null,"homepage":"https://bvieth.github.io/powsimR/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bvieth.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-04-16T16:22:12.000Z","updated_at":"2024-02-22T15:26:39.000Z","dependencies_parsed_at":"2023-10-20T19:00:39.610Z","dependency_job_id":null,"html_url":"https://github.com/bvieth/powsimR","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvieth%2FpowsimR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvieth%2FpowsimR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvieth%2FpowsimR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvieth%2FpowsimR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bvieth","download_url":"https://codeload.github.com/bvieth/powsimR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528407,"owners_count":21922623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["experimental-design","gene-expression","power","power-analysis","r","rna-seq","simulation","simulation-framework","single-cell"],"created_at":"2024-08-03T17:01:26.857Z","updated_at":"2025-05-11T06:33:06.972Z","avatar_url":"https://github.com/bvieth.png","language":"HTML","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n# `powsimR` \u003cbr/\u003e Power analysis for bulk and \u003cbr/\u003e single cell RNA-seq experiments \u003cimg src=\"vignettes/powsimR.png\" align=\"right\" width=\"200\" /\u003e\n\nPlease also consult my Github Page of [powsimR](https://bvieth.github.io/powsimR/) made with [pkgdown](http://pkgdown.r-lib.org/index.html)!\n\n## :arrow_double_down: Installation Guide\n\nFor the installation, the R package `devtools` is needed.\n\n```{r, echo=T, eval=F, tidy=T}\ninstall.packages('devtools')\nlibrary(devtools)\n```\n\nI recommend to install first the dependencies manually and then powsimR. If you plan to use MAGIC for imputation, then please follow their [instruction](https://github.com/KrishnaswamyLab/MAGIC) to install the python implementation before installing powsimR.  \n\n```{r, echo=T, eval=F, tidy=T}\nipak \u003c- function(pkg, repository=c('CRAN', 'Bioconductor', 'github')){\n  new.pkg \u003c- pkg[!(pkg %in% installed.packages()[, \"Package\"])]\n  # new.pkg \u003c- pkg\n  if (length(new.pkg)) {\n    if(repository=='CRAN') {\n      install.packages(new.pkg, dependencies = TRUE)\n    }\n    if(repository=='Bioconductor') {\n      if(strsplit(version[['version.string']], ' ')[[1]][3] \u003e \"4.0.0\"){\n        if (!requireNamespace(\"BiocManager\")){\n            install.packages(\"BiocManager\")\n        }\n            BiocManager::install(new.pkg, dependencies=TRUE, ask=FALSE)\n      }\n      if(strsplit(version[['version.string']], ' ')[[1]][3] \u003c \"3.6.0\"){\n        stop(message(\"powsimR depends on packages and functions that are only available in R 4.0.0 and higher.\"))\n      }\n    }\n    if(repository=='github') {\n      devtools::install_github(new.pkg, build_vignettes = FALSE, force = FALSE, dependencies=TRUE)\n    }\n  }\n}\n\n# CRAN PACKAGES\ncranpackages \u003c- c(\"broom\", \"cobs\", \"cowplot\", \n                  \"data.table\", \"doParallel\", \"dplyr\", \"DrImpute\", \n                  \"fastICA\", \"fitdistrplus\", \"foreach\", \"future\",\n                  \"gamlss.dist\", \"ggplot2\", \"ggpubr\", \"ggstance\", \"grDevices\",\n                  \"grid\", \"Hmisc\", \"kernlab\", \"MASS\", \"magrittr\", \"MBESS\", \"Matrix\",\n                  \"matrixStats\", \"mclust\", \"methods\", \"minpack.lm\", \"moments\", \"msir\", \n                  \"NBPSeq\", \"nonnest2\", \"parallel\", \"penalized\", \"plyr\", \"pscl\",\n                  \"reshape2\", \"Rmagic\", \"rsvd\", \"Rtsne\", \"scales\", \"Seurat\", \"snow\", \"sctransform\", \n                  \"stats\", \"tibble\", \"tidyr\", \"truncnorm\", \"VGAM\", \"ZIM\", \"zoo\")\nipak(cranpackages, repository='CRAN')\n\n# BIOCONDUCTOR\nbiocpackages \u003c- c(\"bayNorm\", \"baySeq\", \"BiocGenerics\", \"BiocParallel\", \n                  \"DESeq2\", \"EBSeq\", \"edgeR\", \"IHW\", \"iCOBRA\",\n                  \"limma\", \"Linnorm\", \"MAST\", \"monocle\", \"NOISeq\", \"qvalue\", \"ROTS\", \"RUVSeq\", \n                  \"S4Vectors\", \"scater\", \"scDD\", \"scde\", \"scone\", \"scran\", \"SCnorm\", \n                  \"SingleCellExperiment\", \"SummarizedExperiment\", \"zinbwave\")\nipak(biocpackages, repository='Bioconductor')\n\n# GITHUB\ngithubpackages \u003c- c('cz-ye/DECENT', 'nghiavtr/BPSC', \n                    'mohuangx/SAVER', 'statOmics/zingeR',\n                    'Vivianstats/scImpute')\nipak(githubpackages, repository = 'github')\n```\n\nTo check whether all dependencies are installed, you can run the following lines:\n\n```{r depcheck, echo = TRUE, eval = FALSE, tidy = FALSE}\n\npowsimRdeps \u003c- data.frame(Package = c(cranpackages, \n                                      biocpackages, \n                                      sapply(strsplit(githubpackages, \"/\"), \"[[\", 2)), \n                          stringsAsFactors = F)\n\nip \u003c- as.data.frame(installed.packages()[,c(1,3:4)], stringsAsFactors = F)\n\nip.check \u003c- cbind(powsimRdeps, \n                  Version = ip[match(powsimRdeps$Package, rownames(ip)),\"Version\"]) \n\ntable(is.na(ip.check$Version))  # all should be FALSE\n\n```\n\nAfter installing the dependencies, powsimR can be installed by using devtools as well.\n\n```{r, echo=T, eval=F, tidy=T}\ndevtools::install_github('bvieth/powsimR', \n                         build_vignettes = TRUE, \n                         dependencies=FALSE)\nlibrary(\"powsimR\")\n```\n\nAlternative, you can try to install powsimR and its dependencies directly using devtools:\n\n```{r, echo=T, eval=F, tidy=T}\ndevtools::install_github(\"bvieth/powsimR\")\n```\n\n## :book: User Guide\n\nFor examples and tips on using the package, please consult the vignette after successful installation by \n\n```{r, echo=T, eval=F, tidy=T}\nbrowseVignettes('powsimR')\n```\n\nSome users have experienced issues installing powsimR due to vignette compilation errors or because they are missing the necessary R packages to build the vignette, i.e. knitr and rmdformats.  If that is the case, you can either install these dependencies or leave out building the vignette (by setting build_vignettes to FALSE) and read it on my Github Page of [powsimR](https://bvieth.github.io/powsimR/articles/powsimR.html) or download it as a html file [here](https://github.com/bvieth/powsimR/blob/master/vignettes/powsimR.html).\n\n### DLLs and ulimit\n\nNote that the error \"maximal number of DLLs reached...\" might occur due to the loading of many shared objects by Bioconductor packages. Restarting the R session after installing dependencies / powsimR will help.\nStarting with R version 3.4.0, one can set the environmental variable 'R_MAX_NUM_DLLS' to a higher number. See `?Startup()` for more information. I recommend to increase the maximum number of DLLs that can be loaded to 500. The environmental variable R\\_MAX\\_NUM\\_DLLS can be set in R\\_HOME/etc/Renviron prior to starting R. For that locate the Renviron file and add the following line: R\\_MAX\\_NUM\\_DLLS=xy where xy is the number of DLLs.\nOn my Ubuntu machine, the Renviron file is in /usr/lib/R/etc/ and I can set it to 500.\n\nIn addition, the user limits for open files (unix: ulimit) might have to be set to a higher number to accomodate the increase in DLLs. Please check out the help pages for [MACs](https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c) and [Linux](https://glassonionblog.wordpress.com/2013/01/27/increase-ulimit-and-file-descriptors-limit/) for guidance.\n\n## :scroll: Citation\n\nPlease use the following entry for citing powsimR.\n\n```{r, echo=T, eval=F, tidy=T}\ncitation(\"powsimR\")\n```\n\npowsimR is published in [Bioinformatics](https://doi.org/10.1093/bioinformatics/btx435). \nA preprint paper is also on [bioRxiv](https://doi.org/10.1101/117150). \n\n## :incoming_envelope:  Notes\n\nPlease send bug reports and feature requests by opening a new issue on \n[this page](https://github.com/bvieth/powsimR/issues). \nI try to keep up to date with new developments / changes of methods implemented in powsimR, but if you encounter run errors while using a certain tool (e.g. for imputation), then I appreciate if you can post this as an [issue](https://github.com/bvieth/powsimR/issues).\n\n## `R` Session Info\n\n```{r}\nlibrary(powsimR)\nsessionInfo()\n```\n\n\n","funding_links":[],"categories":["Single Cell"],"sub_categories":["scRNA Analysis Pipelines"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbvieth%2FpowsimR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbvieth%2FpowsimR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbvieth%2FpowsimR/lists"}