{"id":44836022,"url":"https://github.com/grenaud/bam2prof","last_synced_at":"2026-02-17T01:36:04.743Z","repository":{"id":148182256,"uuid":"137918942","full_name":"grenaud/bam2prof","owner":"grenaud","description":"the subprogram in schmutzi but rewritten using htslib","archived":false,"fork":false,"pushed_at":"2025-05-22T19:19:01.000Z","size":2233,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-22T20:41:41.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/grenaud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-06-19T16:41:56.000Z","updated_at":"2025-05-22T19:19:05.000Z","dependencies_parsed_at":"2025-02-14T14:27:06.203Z","dependency_job_id":"96cf6336-7fa5-404a-a6dc-73b44f3f1398","html_url":"https://github.com/grenaud/bam2prof","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grenaud/bam2prof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grenaud%2Fbam2prof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grenaud%2Fbam2prof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grenaud%2Fbam2prof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grenaud%2Fbam2prof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grenaud","download_url":"https://codeload.github.com/grenaud/bam2prof/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grenaud%2Fbam2prof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29529513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"ssl_error","status_checked_at":"2026-02-17T00:54:25.811Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-02-17T01:36:04.102Z","updated_at":"2026-02-17T01:36:04.718Z","avatar_url":"https://github.com/grenaud.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# bam2prof\n\nbam2prof is a tool designed to analyze BAM files and generate substitution profiles, particularly useful for assessing ancient DNA damage patterns. This standalone version is derived from the subprogram in schmutzi (https://github.com/grenaud/schmutzi) but has been rewritten to utilize htslib (https://github.com/samtools/htslib).\n\n## Features\n\n- Substitution Profiling: Computes substitution rates at both 5' and 3' ends of reads to assess DNA damage patterns.\n- Customizable Parameters: Allows users to set minimum base quality scores, minimum read lengths, and specify the length of the profile to generate.\n\n## Requirements\n\n- htslib: Ensure that htslib (https://github.com/samtools/htslib) is installed on your system, as bam2prof depends on it for BAM file processing.\n\n## Installation\n\nTo build bam2prof, follow these steps:\n\n1. Clone the Repository:\n\ngit clone https://github.com/grenaud/bam2prof.git\n\n2. Navigate to the Source Directory:\n\ncd bam2prof/src\n\n3. Compile the Program:\n\nmake\n\nThis will generate the bam2prof executable in the src directory.\n\n## Usage\n\nThe general syntax for running bam2prof is:\n\nbam2prof [options] \u003cinput.bam\u003e\n\nKey Options:\n\n- -minq \u003cint\u003e: Set the minimum base quality score to consider. Bases with quality scores below this threshold will be ignored.\n- -minl \u003cint\u003e: Define the minimum read length to process. Reads shorter than this length will be skipped.\n- -length \u003cint\u003e: Specify the length of the profile to generate. This determines how many bases from the ends of reads are analyzed.\n- -5p \u003cfile\u003e: Output file for the 5' end substitution profile.\n- -3p \u003cfile\u003e: Output file for the 3' end substitution profile.\n\nExample:\n\nTo analyze a BAM file with a minimum base quality of 30, minimum read length of 35, and generate profiles of length 10 for both 5' and 3' ends:\n\nbam2prof -minq 30 -minl 35 -length 10 -5p output_5p.prof -3p output_3p.prof input.bam\n\nThis command will produce two files:\n\n- output_5p.prof: Contains the substitution profile for the 5' end.\n- output_3p.prof: Contains the substitution profile for the 3' end.\n\n## Notes\n\n- Ensure that your BAM files are properly indexed and that the reference genome used for alignment is accessible.\n- For optimal results, consider subsampling your BAM file to a manageable size before running bam2prof. This can help in determining the ideal parameters for your specific dataset.\n\nFor more detailed information and updates, visit the bam2prof GitHub repository (https://github.com/grenaud/bam2prof).\n\n\n# Developers \n\n- Gabriel Renaud\n- Louis Kraft\n- Thorfinn Korneliussen\n\n\n\n\n## Citing\n\nbam2prof is released as part of AdDeam, please cite:\n\nAdDeam: A Fast and Scalable Tool for Estimating and Clustering Reference-Level Damage Profiles Louis Kraft, Thorfinn Sand Korneliussen, Peter Wadd Sackett, Gabriel Renaud *bioRxiv* 2025.03.20.644297; doi: https://doi.org/10.1101/2025.03.20.644297\n\nor in Bibtex:\n\n    @article {Kraft2025.03.20.644297,\n    \tauthor = {{Kraft, Louis and Korneliussen, Thorfinn Sand and Sackett, Peter Wadd and Renaud, Gabriel}], \n \t    title = {{AdDeam: A Fast and Scalable Tool for Estimating and Clustering Reference-Level Damage Profiles}},\n\t    elocation-id = {2025.03.20.644297},\n\t    year = {2025},\n\t    doi = {10.1101/2025.03.20.644297},\n\t    publisher = {Cold Spring Harbor Laboratory},\t   \n\t    URL = {https://www.biorxiv.org/content/early/2025/03/24/2025.03.20.644297},\n\t    eprint = {https://www.biorxiv.org/content/early/2025/03/24/2025.03.20.644297.full.pdf},\n\t    journal = {bioRxiv}\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrenaud%2Fbam2prof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrenaud%2Fbam2prof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrenaud%2Fbam2prof/lists"}