{"id":24436237,"url":"https://github.com/yhoogstrate/bam-lorenz-coverage","last_synced_at":"2026-01-17T07:01:56.895Z","repository":{"id":70626807,"uuid":"147340752","full_name":"yhoogstrate/bam-lorenz-coverage","owner":"yhoogstrate","description":"Generate Lorenz plots and Coverage plots directly from BAM files","archived":false,"fork":false,"pushed_at":"2021-12-07T08:03:01.000Z","size":320,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T17:44:26.664Z","etag":null,"topics":["dna-seq","ginicoverage","lorenz","ngs","quality-control","rna-seq","wgs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yhoogstrate.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-04T12:13:08.000Z","updated_at":"2022-09-06T15:27:32.000Z","dependencies_parsed_at":"2023-06-02T11:30:18.862Z","dependency_job_id":null,"html_url":"https://github.com/yhoogstrate/bam-lorenz-coverage","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/yhoogstrate/bam-lorenz-coverage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhoogstrate%2Fbam-lorenz-coverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhoogstrate%2Fbam-lorenz-coverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhoogstrate%2Fbam-lorenz-coverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhoogstrate%2Fbam-lorenz-coverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhoogstrate","download_url":"https://codeload.github.com/yhoogstrate/bam-lorenz-coverage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhoogstrate%2Fbam-lorenz-coverage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28503021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dna-seq","ginicoverage","lorenz","ngs","quality-control","rna-seq","wgs"],"created_at":"2025-01-20T17:38:11.299Z","updated_at":"2026-01-17T07:01:56.873Z","avatar_url":"https://github.com/yhoogstrate.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"bam-lorenz-coverage\n===================\n\nThis is a free software package that very easily allows you to generate\nLorenz plots and Coverage plots, directly from a BAM file. It can also\noutput the tables as text documents so you can generate custom plots.\nThere is also support to only analyse specific regions.\n\nImplemented in:\n * Python3 + Matplotlib + Pysam\n\n### Citing bam-lorenz-coverage ###\n\nWhen using bam-lorenz-coverage for scientific applications, please\ncite the following manuscript:\n\n[10.1093/gigascience/giab080](http://dx.doi.org/10.1093/gigascience/giab080)\n```\nHoogstrate Y; Komor MA; Böttcher R; van Riet J; van de Werken HJG;\nvan Lieshout S; Hoffmann R; van den Broek E; Bolijn AS; Dits N; Sie D;\nvan der Meer D; Pepers F; Bangma CH; van Leenders GJLH; Smid M;\nFrench PJ; Martens JWM; van Workum W; van der Spek PJ; Janssen B;\nCaldenhoven E; Rausch C; de Jong M; Stubbs AP; Meijer GA; Fijneman RJA;\nJenster GW:\n\nFusion transcripts and their genomic breakpoints in poly(A)+ and\nrRNA-minus RNA sequencing data. GigaScience (2021).\n\nhttp://dx.doi.org/10.1093/gigascience/giab080\n```\n\nThis will indirectly help me further maintaining this software package.\nThank you in advance, Youri\n\n### Note (how this works) ####\n\nBy the time of writing, pysam.tools.depth could not write sequentially\nto a python variable. As work around, the tools spawns one thread\nwriting the output of pysam.tools.depth to a FIFO (named pipe) in the \n/tmp folder whereas the other thread parses this FIFO. This is why the\ntool runs two parallel threads.\n\n\n## Installation: ##\n\n```\n$ git clone https://github.com/yhoogstrate/bam-lorenz-coverage.git\n$ cd bam-lorenz-coverage\n$ virtualenv -p python3 .venv\n$ source .venv/bin/activate\n$ python setup.py install\n\n$ bam-lorenz-coverage --help\n```\n\nPossible issues:\n - pysam is currently incompatible with python 3.7 - manual installation of pysam is still possible (git clone + python setup.py install)\n   * This issue has been resolved\n - matplotlib depends on Tk but does not throw an error if it is missing during installation, only at runtime\n   * debian/ubuntu: sudo apt-get install python3-tk\n   * arch: pacman -Sy tk\n\n## Usage: ##\n\n```\nUsage: bam-lorenz-coverage [OPTIONS] INPUT_ALIGNMENT_FILE\n\nOptions:\n  --version                  Show the version and exit.\n  -l, --lorenz-table TEXT    Output table Lorenz-curve (for stdout use: -)\n  -c, --coverage-table TEXT  Output table Coverage-graph (for stdout use: -)\n  -L, --lorenz-svg TEXT      Output figure Lorenz-curve (SVG).\n  -C, --coverage-svg TEXT    Output figure Coverage-graph (SVG).\n  -s, --stats TEXT           Output additional stats to text-file\n  -r, --region TEXT          Scan depth only in selected region \u003cchr:from-to\u003e\n                             (all positions: 1-based)\n  -b, --bed-regions TEXT     Scan depth only in selected positions or regions\n                             (BED file: start: 0-based \u0026 end: 1-based)\n  --help                     Show this message and exit.\n```\n\nThe lowercase arguments (-l, -c) allow extraction of the raw data tables for custom plotting. The uppercase arguments (-L, -C) directly generate a plot. The implemented plot only contains one sample per plot. For multi-sample plots, use the column tables and your imagination.\n\n## Examples: ##\n### Default: ###\n\nThe default SVG output figures (`-C`, `-L`) show one sample per figure, and look as follows:\n\n![Default Lorenz plot](share/example_lorenz.png)\n\n\n![Default Coverage plot](share/example_coverage.png)\n\n### Custom, using the tables: ###\n\nUsing the output tables (`-l`, `-c`) you can also create custom plots, for instance:\n\n![Custom multi-sample plots of the tables](share/custom_plots.png)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhoogstrate%2Fbam-lorenz-coverage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhoogstrate%2Fbam-lorenz-coverage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhoogstrate%2Fbam-lorenz-coverage/lists"}