{"id":18598289,"url":"https://github.com/cmdoret/tinycov","last_synced_at":"2025-08-04T14:34:50.110Z","repository":{"id":35895007,"uuid":"219757225","full_name":"cmdoret/tinycov","owner":"cmdoret","description":"Command line tool to plot genomic coverage from a BAM file","archived":false,"fork":false,"pushed_at":"2023-04-05T10:13:51.000Z","size":36535,"stargazers_count":13,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T14:59:11.418Z","etag":null,"topics":["coverage","genomics-visualization","rolling-windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmdoret.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-05T13:54:11.000Z","updated_at":"2024-03-26T00:19:51.000Z","dependencies_parsed_at":"2023-02-14T12:46:16.045Z","dependency_job_id":null,"html_url":"https://github.com/cmdoret/tinycov","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdoret%2Ftinycov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdoret%2Ftinycov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdoret%2Ftinycov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdoret%2Ftinycov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmdoret","download_url":"https://codeload.github.com/cmdoret/tinycov/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223442765,"owners_count":17145829,"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":["coverage","genomics-visualization","rolling-windows"],"created_at":"2024-11-07T01:31:59.857Z","updated_at":"2024-11-07T01:32:16.610Z","avatar_url":"https://github.com/cmdoret.png","language":"Python","readme":"### tinycov\n[![PyPI version](https://badge.fury.io/py/tinycov.svg)](https://badge.fury.io/py/tinycov) [![build](https://github.com/cmdoret/tinycov/actions/workflows/python-tests.yml/badge.svg)](https://github.com/cmdoret/tinycov/actions/workflows/python-tests.yml) [![codecov](https://codecov.io/gh/cmdoret/tinycov/branch/master/graph/badge.svg)](https://codecov.io/gh/cmdoret/tinycov) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/7878334fde574216bea3efd9a91b00fc)](https://www.codacy.com/gh/cmdoret/tinycov/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=cmdoret/tinycov\u0026amp;utm_campaign=Badge_Grade) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nTinycov is a small standalone command line utility written in python to plot the coverage of a BAM file quickly.\nThis software was inspired by [Matt Edwards' genome coverage plotter](https://github.com/matted/genome_coverage_plotter).\n\n\n### Installation\n\nTo install the stable version:\n```pip3 install --user tinycov```\n\nTo install the development version:\n```\ngit clone https://github.com/cmdoret/tinycov.git\ncd tinycov\npip install .\n```\n\n### Input\n\nOnly a [BAM](https://www.htslib.org/) file alignment is required as input. If it is not coordinate-sorted, tinycov will make a sorted copy named `input.sorted.bam` if the file is named `input.bam`.\n\n### Output\n\nIf no output is provided, the coverage plot will be displayed interactively using matplotlib. If `--out` is used, the plot will be saved in a format determined by the output file's extension.\n\nAdditionally, if `--text` is provided, an output text file will be saved in the [bedgraph](https://genome.ucsc.edu/goldenPath/help/bedgraph.html) format with overlapping windows (depending on the values of `--res` and `--skip`).\n\n### Usage\n\nThe `tinycov` commands can be invoked from the command line to list subcommands.\n```\n\nUsage: tinycov [OPTIONS] COMMAND [ARGS]...\n\n  tinycov: visualisation of coverage from BAM files using rolling window\n  averages.\n\nOptions:\n  --version  Show the version and exit.\n  --help     Show this message and exit.\n\nCommands:\n  covhist  Visualise the histogram of coverage in rolling windows.\n  covplot  Visualise coverage in rolling windows, optionally save results\n           to...\n```\n\nThe covplot subcommand plots the coverage in sliding windows along the genome. A bedgraph file with the coverage of each window can be generated using the `--text` option.\n\n```\n\nUsage: tinycov covplot [OPTIONS] BAM\n\n  Visualise coverage in rolling windows, optionally save results to a\n  bedgraph file.\n\nOptions:\n  -N, --no-filter          Use all reads. By default, PCR duplicates and\n                           secondary alignments are excluded\n\n  -m, --max-depth INTEGER  Maximum read depth permitted. Position with higher\n                           coverage will set to this value\n\n  -o, --out PATH           Output file where to write the plot. If not\n                           provided, the plot is shown interactively\n\n  -w, --whitelist TEXT     Only include those chromosomes in the plot. List of\n                           comma-separated chromosome names.\n\n  -b, --blacklist TEXT     Exclude those chromosomes from the plot. List of\n                           comma-separated chromosome names.\n\n  -n, --name TEXT          Name of the sample (plot title). Base name of input\n                           file by default\n\n  -B, --bins TEXT          Tab-separated file of three columns (chromosome,\n                           start, end) without header containing a custom\n                           binning to use. Overrides --res and --skip,\n                           optional.\n\n  -s, --skip INTEGER       Stride between windows, in basepairs.  [default:\n                           1000]\n\n  -r, --res INTEGER        Size of windows in which to compute coverage, in\n                           basepairs.  [default: 10000]\n\n  -t, --text PATH          Output file where to write the raw data table.\n  -p, --ploidy INTEGER     Ploidy of input sample, used to estimate coverage\n                           threshold for aneuploidies. Setting to 0 disables\n                           estimations.\n\n  --version                Show the version and exit.\n  --help                   Show this message and exit.\n```\n\nThe covhist subcommands generates a histogram of coverage values by window. To get a histogram of coverage by basepair, just set `--res` to 1.\n```\n\nUsage: tinycov covhist [OPTIONS] BAM\n\n  Visualise the histogram of coverage in rolling windows.\n\nOptions:\n  -N, --no-filter          Use all reads. By default, PCR duplicates and\n                           secondary alignments are excluded\n\n  -m, --max-depth INTEGER  Maximum read depth permitted. Position with higher\n                           coverage will set to this value\n\n  -o, --out PATH           Output file where to write the plot. If not\n                           provided, the plot is shown interactively\n\n  -w, --whitelist TEXT     Only include those chromosomes in the plot. List of\n                           comma-separated chromosome names.\n\n  -b, --blacklist TEXT     Exclude those chromosomes from the plot. List of\n                           comma-separated chromosome names.\n\n  -n, --name TEXT          Name of the sample (plot title). Base name of input\n                           file by default\n\n  -B, --bins TEXT          Tab-separated file of three columns (chromosome,\n                           start, end) without header containing a custom\n                           binning to use. Overrides --res and --skip,\n                           optional.\n\n  -s, --skip INTEGER       Stride between windows, in basepairs.  [default:\n                           1000]\n\n  -r, --res INTEGER        Size of windows in which to compute coverage, in\n                           basepairs.  [default: 10000]\n\n  --version                Show the version and exit.\n  --help                   Show this message and exit.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdoret%2Ftinycov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmdoret%2Ftinycov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdoret%2Ftinycov/lists"}