{"id":22021693,"url":"https://github.com/lieberinstitute/megadepth","last_synced_at":"2025-05-07T06:42:07.448Z","repository":{"id":110030194,"uuid":"296330762","full_name":"LieberInstitute/megadepth","owner":"LieberInstitute","description":"R interface to megadepth: BigWig and BAM related utilities","archived":false,"fork":false,"pushed_at":"2024-12-12T21:45:05.000Z","size":695,"stargazers_count":12,"open_issues_count":6,"forks_count":2,"subscribers_count":5,"default_branch":"devel","last_synced_at":"2025-03-31T07:22:10.967Z","etag":null,"topics":["bam","bigwig","daspter","megadepth","recount2","recount3","rstats"],"latest_commit_sha":null,"homepage":"https://lieberinstitute.github.io/megadepth","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LieberInstitute.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-17T13:13:33.000Z","updated_at":"2025-01-23T07:44:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2ec3db4-c416-4271-a626-44fab53cf117","html_url":"https://github.com/LieberInstitute/megadepth","commit_stats":{"total_commits":137,"total_committers":7,"mean_commits":"19.571428571428573","dds":0.3722627737226277,"last_synced_commit":"9136079a86675adb82158e9d13a3423073103104"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2Fmegadepth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2Fmegadepth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2Fmegadepth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LieberInstitute%2Fmegadepth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LieberInstitute","download_url":"https://codeload.github.com/LieberInstitute/megadepth/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831069,"owners_count":21810775,"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":["bam","bigwig","daspter","megadepth","recount2","recount3","rstats"],"created_at":"2024-11-30T06:13:42.643Z","updated_at":"2025-05-07T06:42:07.443Z","avatar_url":"https://github.com/LieberInstitute.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n    collapse = TRUE,\n    comment = \"#\u003e\",\n    fig.path = \"man/figures/README-\",\n    out.width = \"100%\"\n)\n```\n\n# megadepth\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n[![Bioc release status](http://www.bioconductor.org/shields/build/release/bioc/megadepth.svg)](https://bioconductor.org/checkResults/release/bioc-LATEST/megadepth)\n[![Bioc devel status](http://www.bioconductor.org/shields/build/devel/bioc/megadepth.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/megadepth)\n[![Bioc downloads rank](https://bioconductor.org/shields/downloads/release/megadepth.svg)](http://bioconductor.org/packages/stats/bioc/megadepth/)\n[![Bioc support](https://bioconductor.org/shields/posts/megadepth.svg)](https://support.bioconductor.org/tag/megadepth)\n[![Bioc history](https://bioconductor.org/shields/years-in-bioc/megadepth.svg)](https://bioconductor.org/packages/release/bioc/html/megadepth.html#since)\n[![Bioc last commit](https://bioconductor.org/shields/lastcommit/devel/bioc/megadepth.svg)](http://bioconductor.org/checkResults/devel/bioc-LATEST/megadepth/)\n[![Bioc dependencies](https://bioconductor.org/shields/dependencies/release/megadepth.svg)](https://bioconductor.org/packages/release/bioc/html/megadepth.html#since)\n[![Codecov test coverage](https://codecov.io/gh/LieberInstitute/megadepth/branch/devel/graph/badge.svg)](https://codecov.io/gh/LieberInstitute/megadepth?branch=devel)\n[![R build status](https://github.com/LieberInstitute/megadepth/actions/workflows/check-bioc.yml/badge.svg)](https://github.com/LieberInstitute/megadepth/actions/workflows/check-bioc.yml)\n[![GitHub issues](https://img.shields.io/github/issues/LieberInstitute/megadepth)](https://github.com/LieberInstitute/megadepth/issues)\n[![GitHub pulls](https://img.shields.io/github/issues-pr/LieberInstitute/megadepth)](https://github.com/LieberInstitute/megadepth/pulls)\n\u003c!-- badges: end --\u003e\n\nThe goal of `megadepth` is to provide an R interface to the command line tool [Megadepth](https://github.com/ChristopherWilks/megadepth) for BigWig and BAM related utilities created by [Christopher Wilks](https://twitter.com/chrisnwilks). This R package enables **fast** processing of BigWig files on downstream packages such as [dasper](https://bioconductor.org/packages/dasper) and [recount3](https://bioconductor.org/packages/recount3). The [Megadepth](https://github.com/ChristopherWilks/megadepth) software also provides utilities for processing BAM files and extracting coverage information from them.\n\nHere is an illustration on how fast `megadepth` is compared to other tools for processing local and remote BigWig files.\n\n\u003ca href=\"https://github.com/LieberInstitute/megadepth/tree/devel/analysis\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/LieberInstitute/megadepth/devel/analysis/md_rt_pybw_runtime.png\" width=\"800px\" \u003e\u003c/a\u003e\n\nThroughout the documentation we use a capital `M` to refer to the software by Christopher Wilks and a lower case `m` to refer to this R/Bioconductor package.\n\n## Installation instructions\n\nGet the latest stable `R` release from [CRAN](http://cran.r-project.org/). Then install `megadepth` from [Bioconductor](http://bioconductor.org/) using the following code:\n\n```{r 'install', eval = FALSE}\nif (!requireNamespace(\"BiocManager\", quietly = TRUE)) {\n    install.packages(\"BiocManager\")\n}\n\nBiocManager::install(\"megadepth\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n```{r 'install_dev', eval = FALSE}\nBiocManager::install(\"LieberInstitute/megadepth\")\n```\n\n## Example\n\nIn the following example, we install [Megadepth](https://github.com/ChristopherWilks/megadepth) with `install_megadepth()`, which downloads a binary for your OS (Linux, Windows or macOS). We can then use with an example BigWig file to compute the coverage at a set of regions.\n\n```{r example, eval = requireNamespace('megadepth')}\n## Load the R package\nlibrary(\"megadepth\")\n\n## Install Megadepth's pre-compiled binary on your system\ninstall_megadepth()\n\n## Next, we locate the example BigWig and annotation files\nexample_bw \u003c- system.file(\"tests\", \"test.bam.all.bw\",\n    package = \"megadepth\", mustWork = TRUE\n)\nannotation_file \u003c- system.file(\"tests\", \"testbw2.bed\",\n    package = \"megadepth\", mustWork = TRUE\n)\n\n## We can then use megadepth to compute the coverage\nbw_cov \u003c- get_coverage(example_bw, op = \"mean\", annotation = annotation_file)\nbw_cov\n```\n\n## Full set of utilities\n\n[Megadepth](https://github.com/ChristopherWilks/megadepth) is very powerful and can do a lot of different things. The R/Bioconductor package provides two functions for interfacing with [Megadepth](https://github.com/ChristopherWilks/megadepth), `megadepth_cmd()` and `megadepth_shell()`. For the first one, `megadepth_cmd()`, you need to know the actual command syntax you want to use and format it accordingly. If you are more comfortable with R functions, `megadepth_shell()` uses `r BiocStyle::CRANpkg(\"cmdfun\")` to power this interface and capture the standard output stream into R.\n\nTo make it easier to use, `megadepth` includes functions that simplify the number of arguments, read in the output files, and converts them into R/Bioconductor friendly objects, such as `get_coverage()` illustrated above.\n\nWe hope that you'll find `megadepth` and [Megadepth](https://github.com/ChristopherWilks/megadepth) useful for your work. If you are interested in checking how **fast** `megadepth` is, check out the [**speed analysis**](https://github.com/LieberInstitute/megadepth/tree/devel/analysis) comparison against other tools. Note that the size of the files used and the number of genomic regions queried will affect the speed comparisons.\n\n```{r \"interface_options\"}\n## R-like interface\n## that captures the standard output into R\nhead(megadepth_shell(help = TRUE))\n\n## Command-like interface\nmegadepth_cmd(\"--help\")\n```\n\n```{r \"show_help\", echo = FALSE}\nx \u003c- megadepth_shell(help = TRUE)\ncat(paste0(x, \"\\n\"))\n```\n\n\n\n## Citation\n\nBelow is the citation output from using `citation('megadepth')` in R. Please\nrun this yourself to check for any updates on how to cite __megadepth__.\n\n```{r 'citation', eval = requireNamespace('megadepth')}\nprint(citation(\"megadepth\"), bibtex = TRUE)\n```\n\nPlease note that the `megadepth` was only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.\n\n## Code of Conduct\n\nPlease note that the `megadepth` project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n## Development tools\n\n* Continuous code testing is possible thanks to [GitHub actions](https://www.tidyverse.org/blog/2020/04/usethis-1-6-0/)  through `r BiocStyle::CRANpkg('usethis')`, `r BiocStyle::CRANpkg('remotes')`, `r BiocStyle::Githubpkg('r-hub/sysreqs')` and `r BiocStyle::CRANpkg('rcmdcheck')` customized to use [Bioconductor's docker containers](https://www.bioconductor.org/help/docker/) and `r BiocStyle::Biocpkg('BiocCheck')`.\n* Code coverage assessment is possible thanks to [codecov](https://codecov.io/gh) and `r BiocStyle::CRANpkg('covr')`.\n* The [documentation website](http://LieberInstitute.github.io/megadepth) is automatically updated thanks to `r BiocStyle::CRANpkg('pkgdown')`.\n* The code is styled automatically thanks to `r BiocStyle::CRANpkg('styler')`.\n* The documentation is formatted thanks to `r BiocStyle::CRANpkg('devtools')` and `r BiocStyle::CRANpkg('roxygen2')`.\n\nFor more details, check the `dev` directory.\n\nThis package was developed using `r BiocStyle::Biocpkg('biocthis')`.\n\n## `ReCount` project\n\nThe **main documentation website** for all the `recount3`-related projects is available at [**recount.bio**](https://LieberInstitute/github.io/recount3-docs). Please check that website for more information about how this R/Bioconductor package and other tools are related to each other.\n\n## Teams involved\n\n`r BiocStyle::Biocpkg('megadepth')` was made possible to [David Zhang](https://twitter.com/dyzhang32), the author of `r BiocStyle::Biocpkg(\"dasper\")`, and a member of the [Mina Ryten](https://snca.atica.um.es/)'s lab at UCL.\n\nThe `ReCount` family involves the following teams:\n\n* [Ben Langmead's lab](http://www.langmead-lab.org/) at JHU Computer Science\n* [Kasper Daniel Hansen's lab](https://www.hansenlab.org/)  at JHBSPH Biostatistics Department\n* [Leonardo Collado-Torres](http://lcolladotor.github.io/) and [Andrew E. Jaffe](http://aejaffe.com/) from [LIBD](https://www.libd.org/)\n* [Abhinav Nellore's lab](http://nellore.bio/)  at OHSU\n* [Jeff Leek's lab](http://jtleek.com/) at JHBSPH Biostatistics Deparment\n* Data hosted by [SciServer from IDIES at JHU](https://www.sciserver.org/)\n\n| | | | |\n| --- | --- | --- | --- |\n| \u003ca href=\"http://www.langmead-lab.org/\"\u003e\u003cimg src=\"http://www.langmead-lab.org/wp-content/uploads/2014/01/Screen-Shot-2014-02-02-at-5.20.13-PM-1024x199.png\" width=\"250px\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.libd.org/\"\u003e\u003cimg src=\"http://lcolladotor.github.io/img/LIBD_logo.jpg\" width=\"250px\"\u003e\u003c/a\u003e | \u003ca href=\"http://nellore.bio/\"\u003e\u003cimg src=\"https://seekvectorlogo.net/wp-content/uploads/2018/08/oregon-health-science-university-ohsu-vector-logo.png\" width=\"250px\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.sciserver.org/\"\u003e\u003cimg src=\"https://skyserver.sdss.org/dr14/en/images/sciserver_logo_inverted_vertical.png\" width=\"250px\"\u003e\u003c/a\u003e |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieberinstitute%2Fmegadepth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flieberinstitute%2Fmegadepth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieberinstitute%2Fmegadepth/lists"}