{"id":15704344,"url":"https://github.com/poisonalien/annovar2maf","last_synced_at":"2025-05-12T16:44:11.273Z","repository":{"id":182576231,"uuid":"668734285","full_name":"PoisonAlien/annovar2maf","owner":"PoisonAlien","description":"Tiny python script to generate MAF files from output generated by standard annotation programs","archived":false,"fork":false,"pushed_at":"2023-07-20T13:31:07.000Z","size":76,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T00:41:20.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PoisonAlien.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-07-20T13:24:55.000Z","updated_at":"2024-09-21T03:55:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c6c3a65-551f-4998-a900-d35a2a487010","html_url":"https://github.com/PoisonAlien/annovar2maf","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"bce2debd59c22b0772136623eccfa54dee84c6fe"},"previous_names":["poisonalien/anovar2maf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoisonAlien%2Fannovar2maf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoisonAlien%2Fannovar2maf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoisonAlien%2Fannovar2maf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoisonAlien%2Fannovar2maf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PoisonAlien","download_url":"https://codeload.github.com/PoisonAlien/annovar2maf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253778507,"owners_count":21962879,"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":[],"created_at":"2024-10-03T20:11:27.597Z","updated_at":"2025-05-12T16:44:11.252Z","avatar_url":"https://github.com/PoisonAlien.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\nThis is a tiny python script to generate MAF files from output generated by stadard annotation programs.\nCurrently, annovar - [table_annovar.pl](https://annovar.openbioinformatics.org/en/latest/user-guide/startup/) output and [bcftools csq](https://samtools.github.io/bcftools/howtos/csq-calling.html) outputs can be converted to [maf](https://docs.gdc.cancer.gov/Data/File_Formats/MAF_Format/#:~:text=Mutation%20Annotation%20Format%20(MAF)%20is,through%20the%20Somatic%20Aggregation%20Workflow.).\n\n```\n$ python annovar2maf.py -h\nusage: annovar2maf [-h] [-t TSB] [-b BUILD] [-p {refGene,ensGene}] [-c] input\n\nConvert annovar and bcftools-csq annotations to MAF\n\npositional arguments:\n  input                 Annovar anotations file [Ex: myanno.hg19_multianno.txt] or a csq formatted file.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t TSB, --tsb TSB     Sample name. Default parses from the file name\n  -b BUILD, --build BUILD\n                        Reference genome build [Default: hg38]\n  -p {refGene,ensGene}, --protocol {refGene,ensGene}\n                        Protocol used to generate annovar annotations [Default: refGene]\n  -c, --csq             Input file is a bcftools csq formatted output\n```\n\n### annovar2maf\n\n```\npython annovar2maf.py -t foo -b GRCh37 tests/test_mutect.refseq.hg19_multianno.txt \n\n# For annovar annotations generated with ensGene as a protocol\npython annovar2maf.py -p ensGene -t foo -b GRCh37 tests/test_mutect.ens.hg19_multianno.txt\n```\n\n### csq2maf\n\nSimilar to VEP, `bcftools csq` command can annotate variants with consequences. The program is lightweight and extremely [fast](https://samtools.github.io/bcftools/howtos/csq-calling.html)\nOutput can be converted to tsv with [split-vep](https://samtools.github.io/bcftools/howtos/plugin.split-vep.html) and then converted to MAF.\n\n```\nref=\"Homo_sapiens.GRCh37.dna.primary_assembly.fa\"\n\n# Get the GFF files for your ref build\n## GRCh38 with and without the chr prefix\n#wget ftp://ftp.ensembl.org/pub/current_gff3/homo_sapiens/Homo_sapiens.GRCh38.110.chr.gff3.gz\n#wget ftp://ftp.ensembl.org/pub/current_gff3/homo_sapiens/Homo_sapiens.GRCh38.110.gff3.gz\n\n## GRCh37 with and without the chr prefix\n#wget ftp://ftp.ensembl.org/pub/grch37/release-84/gff3/homo_sapiens/Homo_sapiens.GRCh37.82.chr.gff3.gz\nwget ftp://ftp.ensembl.org/pub/grch37/release-84/gff3/homo_sapiens/Homo_sapiens.GRCh37.82.gff3.gz\n\n## Step-1: Below commands left normalizes the VCF, splits multi-alleleic variants, annotates vcf with variant consequences while prioritizing variants with worst consequences. \nbcftools norm -f ${ref} -m -both -Oz tests/test_mutect.vcf.gz | bcftools csq -c CSQ -f ${ref} -g Homo_sapiens.GRCh37.82.gff3.gz -p a | \\\nbcftools +split-vep /dev/stdin -Oz -o tests/test_mutect.csq.vcf.gz -c - -s worst\n\n## Step-2: Below command converts csq annotated vcf to tsv\nbcftools query -f '%CHROM\\t%POS\\t%REF\\t%ALT\\t%gene\\t%transcript\\t%Consequence\\t%amino_acid_change\\t%dna_change\\n' tests/test_mutect.csq.vcf.gz \u003e tests/test_mutect.csq.tsv\n\n## Step-3: Now Covert tsv to maf\npython annovar2maf.py -c -t foo -b GRCh37 tests/test_mutect.csq.tsv\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoisonalien%2Fannovar2maf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoisonalien%2Fannovar2maf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoisonalien%2Fannovar2maf/lists"}