{"id":42399748,"url":"https://github.com/treangenlab/methphaser","last_synced_at":"2026-01-28T01:14:18.755Z","repository":{"id":161381775,"uuid":"629978219","full_name":"treangenlab/methphaser","owner":"treangenlab","description":"MethPhaser: methylation-based haplotype phasing of human genomes","archived":false,"fork":false,"pushed_at":"2025-03-05T01:04:03.000Z","size":202,"stargazers_count":45,"open_issues_count":11,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-05T01:31:22.255Z","etag":null,"topics":["bioinformatics-tool","haplotype-blocks","methylation"],"latest_commit_sha":null,"homepage":"https://www.nature.com/articles/s41467-024-49588-0","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treangenlab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-19T12:16:29.000Z","updated_at":"2025-03-05T00:52:26.000Z","dependencies_parsed_at":"2024-07-17T20:27:05.001Z","dependency_job_id":null,"html_url":"https://github.com/treangenlab/methphaser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/treangenlab/methphaser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treangenlab%2Fmethphaser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treangenlab%2Fmethphaser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treangenlab%2Fmethphaser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treangenlab%2Fmethphaser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treangenlab","download_url":"https://codeload.github.com/treangenlab/methphaser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treangenlab%2Fmethphaser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["bioinformatics-tool","haplotype-blocks","methylation"],"created_at":"2026-01-28T01:14:18.135Z","updated_at":"2026-01-28T01:14:18.742Z","avatar_url":"https://github.com/treangenlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MethPhaser\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/methphaser/badges/license.svg)](https://anaconda.org/bioconda/methphaser)\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/methphaser/badges/version.svg)](https://anaconda.org/bioconda/methphaser)\n[![Anaconda-Server Badge](https://anaconda.org/bioconda/methphaser/badges/downloads.svg)](https://anaconda.org/bioconda/methphaser)\n## Install:\n  1. Through mamba or conda: `mamba install -c bioconda methphaser`, `conda install -c bioconda methphaser`\n  2. Through github download: \n      1. Need to put the executable `methphasing` into `~/.bashrc` for `meth_phaser_parallel` to call it. exact command: `export \"PATH=/path/to/methphaser/:$PATH\"`\n      2. Other package requirements: check `methphaser.yaml`\n\n## Usage\n!!! NOTE: MethPhaser won't work on sex chromosomes because of random X inactivation! Please only consider autosomes. !!!\n\n!!! We recommend using MethPhaser for at least 30X coverage ONT reads since most of the SNV phasing methods (HapCUT2, Whatshap) only work reasonably above that coverage !!!\n### Example \nTest data at https://zenodo.org/record/8360845 \nStep 1: Run MethPhaser to get block relationship. MethPhaser default ignores the largest unphased region (`-ml -1`), if the input data does not contain any large poorly mapped region like centromere, please use `-ml -2` to not ignore any gap. \n\n        ./meth_phaser_parallel -b test_data/HLA.R10.haplotagged.bam -r test_data/GCA_000001405.15_GRCh38_no_alt_analysis_set.chr6.fna -g test_data/LSK.filtered.gtf -vc test_data/HLA.R10.phased.vcf.gz  -o test_data/work \n\nStep 2: Run post processing script to get modified reads and vcf file\n\n        ./meth_phaser_post_processing -ib test_data/HLA.R10.haplotagged.bam -if test_data/work/ -ov test_data/output.vcf -ob test_data/output -vc test_data/HLA.R10.phased.vcf.gz \n\n```\n        usage: meth_phaser_parallel [-h] -b  -r  -g  -vc  [-vt] [-t] [-ml] [-c] [-a] [-o] [-k]\n\n        methphaser: phase reads based on methlytion informaiton\n\n        optional arguments:\n          -h, --help            show this help message and exit\n          -vt , --vcf_truth     Truth vcf file for benchmarking\n          -t , --threads        threads\n          -ml , --max_len       maximum homozygous region length for phasing, default: -1 (ignore the largest homozygous\n                                region, centromere), input -2 for not skipping anything\n          -c , --cut_off        the minimum percentage of vote to determine a read's haplotype\n          -a , --assignment_min\n                                minimum assigned read number for ranksum test\n          -o , --output_dir     output_directory\n          -k , --k_iterations   use at most k iterations, use -1 for unlimited iterations.\n\n        Required arguments:\n          -b , --bam_file       input methylation annotated bam file\n          -r , --reference      reference genome\n          -g , --gtf            gtf file from whatshap visualization\n          -vc , --vcf_called    called vcf file from HapCUT2\n```\n\n\nNote: The BAM file should only contain primary alignment (no secondary alignment and supplementary alignment), otherwise it will trigger pysam MM tag reading error. Suggested command:\n`samtools view -bF 2304 -o output.bam input.bam`\n\n\nThanks to Timothy Mosbruger for bug catching the post processing script\n\n\nRecomanded phasing flow: \n\n   ![flowchart drawio](https://github.com/treangenlab/methphaser/assets/13065758/c74e5a1d-1c24-49c0-abe3-5b125f43f7eb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreangenlab%2Fmethphaser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreangenlab%2Fmethphaser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreangenlab%2Fmethphaser/lists"}