{"id":19154517,"url":"https://github.com/bcgsc/ntroot","last_synced_at":"2025-07-27T04:39:55.787Z","repository":{"id":229706913,"uuid":"767869757","full_name":"bcgsc/ntRoot","owner":"bcgsc","description":"🌳 Human ancestry inference from genomic data","archived":false,"fork":false,"pushed_at":"2025-03-27T12:05:58.000Z","size":88342,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-19T19:34:47.550Z","etag":null,"topics":["ancestry","ancestry-inference","ancestrydna","genome","genome-assembly","genomic-data","genomic-data-analysis","sequencing-data","snv","snv-call"],"latest_commit_sha":null,"homepage":"https://github.com/bcgsc/ntRoot","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/bcgsc.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,"zenodo":null}},"created_at":"2024-03-06T03:23:41.000Z","updated_at":"2025-03-27T12:06:01.000Z","dependencies_parsed_at":"2025-03-27T13:32:43.313Z","dependency_job_id":null,"html_url":"https://github.com/bcgsc/ntRoot","commit_stats":null,"previous_names":["bcgsc/ntroot"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgsc%2FntRoot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgsc%2FntRoot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgsc%2FntRoot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgsc%2FntRoot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcgsc","download_url":"https://codeload.github.com/bcgsc/ntRoot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252826627,"owners_count":21810151,"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":["ancestry","ancestry-inference","ancestrydna","genome","genome-assembly","genomic-data","genomic-data-analysis","sequencing-data","snv","snv-call"],"created_at":"2024-11-09T08:27:11.177Z","updated_at":"2025-07-27T04:39:55.781Z","avatar_url":"https://github.com/bcgsc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Release](https://img.shields.io/github/release/bcgsc/ntRoot.svg)](https://github.com/bcgsc/ntRoot/releases)\n[![link](https://img.shields.io/badge/ntRoot-preprint-brightgreen)](https://doi.org/10.1101/2024.03.26.586646)\n[![link](https://img.shields.io/badge/HostSeq-preprint-yellow)](https://doi.org/10.1101/2025.06.10.658783)\n[![Zenodo](https://img.shields.io/badge/ntRoot-zenodo-red)](https://zenodo.org/doi/10.5281/zenodo.10869033)\n[![Conda](https://img.shields.io/conda/dn/bioconda/ntroot?label=Conda)](https://anaconda.org/bioconda/ntroot)\n\n![Logo](https://github.com/bcgsc/ntRoot/blob/main/ntroot-logo_colors.png)\n\n# ntRoot\n\nScalable Ancestry Predictions from Genomic Data\n\n## Contents\n\n1. [Credit](#credit)\n2. [Description](#description)\n3. [Installation](#install)\n4. [Dependencies](#dependencies)\n5. [Usage](#usage)\n6. [Human ancestry predictions](#data)\n7. [Demo](#demo)\n8. [Documentation](#docs)\t\n9. [Citing](#citing)\n10. [License](#license)\n\n## Credit  \u003ca name=credit\u003e\u003c/a\u003e\nWritten by René L Warren and Lauren Coombe\n\n## Description \u003ca name=description\u003e\u003c/a\u003e\nntRoot is a framework for ancestry inference from genomic data, offering both Local Ancestry Inference (LAI) and Global Ancestry Inference (GAI). Leveraging integrated variant call sets from the 1000 Genomes Project (1kGP), ntRoot provides accurate predictions(1) of human super-population ancestry with speed and efficiency from Whole Genome Sequencing (WGS) datasets and complete or draft-stage Whole Genome Assemblies (WGA). Through streamlined processing and flexible genomic input, ntRoot holds promises for human ancestry inference of small-to-large patient/individual cohorts, enabling association studies with demographics and facilitating deeper insights into population genetics and disease risk factors.\n\n(1) Tested on base-accurate quality data, including Illumina short read and newer nanopore (ONT, KitV14) \u0026 PacBio CCS HiFi long read datasets, complete reference genomes and polished, Oxford Nanopore Technology long read GoldRush, Flye and Shasta draft genome assemblies \n\n## Installation \u003ca name=install\u003e\u003c/a\u003e\n\nInstalling ntRoot using conda (recommended):\n```\nconda install -c bioconda -c conda-forge ntroot\n```\n\nInstalling ntRoot from the source code:\n```\ngit clone https://github.com/bcgsc/ntRoot.git\ncd ntRoot\n```\nNo compilation is required for ntRoot (only the dependencies), so simply add the ntRoot repository to your PATH.\n\n### Dependencies \u003ca name=dependencies\u003e\u003c/a\u003e\n- python 3.9+\n- perl\n- [ntEdit 2.0.2+](https://github.com/bcgsc/ntEdit)\n- [snakemake](https://snakemake.readthedocs.io/en/stable/)\n- [samtools](https://www.htslib.org/)\n- [bedtools](https://bedtools.readthedocs.io/en/latest/)\n\n\n## Usage \u003ca name=usage\u003e\u003c/a\u003e\n```\nusage: ntroot [-h] [-r REFERENCE] [--reads READS] [--genome GENOME [GENOME ...]] -l L [-k K] [--tile TILE] [--lai] [-t T] [-z Z] [-j J] [-Y Y] [--custom_vcf CUSTOM_VCF]\n              [--strip_info] [-v] [-V] [-n] [-f]\n\nntRoot: Ancestry inference from genomic data\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -r REFERENCE, --reference REFERENCE\n                        Reference genome (FASTA, Multi-FASTA, and/or gzipped compatible)\n  --reads READS         Prefix of input reads file(s) for detecting SNVs. All files in the working directory with the specified prefix will be used. (fastq, fasta, gz, bz, zip)\n  --genome GENOME [GENOME ...]\n                        Genome assembly file(s) for detecting SNVs compared to --reference\n  -l L                  input VCF file with annotated variants (e.g., clinvar.vcf, 1000GP_integrated_snv_v2a_27022019.GRCh38.phased_gt1.vcf.gz)\n  -k K                  k-mer size\n  --tile TILE           Tile size for ancestry fraction inference (bp) [default=5000000]\n  --lai                 Output ancestry predictons per tile in a separate output file\n  -t T                  Number of threads [default=4]\n  -z Z                  Minimum contig length [default=100]\n  -j J                  controls size of k-mer subset. When checking subset of k-mers, check every jth k-mer [default=3]\n  -Y Y                  Ratio of number of k-mers in the k subset that should be present to accept an edit (higher=stringent) [default=0.55]\n  --custom_vcf CUSTOM_VCF\n                        Input VCF for computing ancestry. When specified, ntRoot will skip the ntEdit step, and predict ancestry from the provided VCF.\n  --strip_info          When using --custom_vcf, strip the existing INFO field from the input VCF.\n  -v, --verbose         Verbose mode [default=False]\n  -V, --version         show program's version number and exit\n  -n, --dry-run         Print out the commands that will be executed\n  -f, --force           Run all ntRoot steps, regardless of existing output files\n\nNote: please specify --reads OR --genome (not both)\nIf you have any questions about ntRoot, please open an issue at https://github.com/bcgsc/ntRoot\n```\n\n## Human ancestry predictions \u003ca name=data\u003e\u003c/a\u003e\n\nUsing the 1kGP integrated variant call set.\n\nDownload this archive:\n\u003cpre\u003e\nwget https://zenodo.org/records/10976332/files/ntroot_supplementary_zenodo.tar.gz\n\u003c/pre\u003e\n  \nfrom:\n\u003cpre\u003e\nhttps://zenodo.org/doi/10.5281/zenodo.10869033\n\u003c/pre\u003e\n\nunzip and untar:\n\u003cpre\u003e\ntar xvzf ntroot_supplementary_zenodo.tar.gz\n\u003c/pre\u003e\n\naccess the files:\n\u003cpre\u003e\ncd ./ntroot_supplementary_zenodo/data\nls\n\n1000GP_integrated_snv_v2a_27022019.GRCh38.phased_gt1.vcf.gz\nGRCh38.fa.gz\nreadme\n\u003c/pre\u003e\n\n\nUsers will specify:\n\u003cpre\u003e\nntroot --reference GRCh38.fa.gz (--reads FILE_PREFIX OR --genome FILE) -l 1000GP_integrated_snv_v2a_27022019.GRCh38.phased_gt1.vcf.gz -k 55\n\u003c/pre\u003e\n\nExample command:\n\u003cpre\u003e\nntroot -k 55 --reference GRCh38.fa.gz --reads ERR3242308_ -t 48 -Y 0.55 -l 1000GP_integrated_snv_v2a_27022019.GRCh38.phased_gt1.vcf.gz\n\u003c/pre\u003e\n\nIf you would like to infer ancestry from a pre-existing VCF file:\n\u003cpre\u003e\nntroot -r GRCh38.fa.gz --custom_vcf third_party.vcf -l 1000GP_integrated_snv_v2a_27022019.GRCh38.phased_gt1.vcf.gz\n\u003c/pre\u003e\n\nNote: For more advanced users, and for ancestry predictions on organisms other than human, please contact us.\n\n\n## Demo \u003ca name=demo\u003e\u003c/a\u003e\nTo test your installation:\n```\ncd demo\n./run_ntroot_demo.sh\n```\nEnsure that the ntRoot installation is available on your PATH.\n\n\n## Documentation \u003ca name=docs\u003e\u003c/a\u003e\n\nRefer to the README.md file on how to install and run ntRoot.\nOur [preprint](https://doi.org/10.1101/2024.03.26.586646) contains information about the software and its performance.\n![ntRoot PSB poster](https://github.com/bcgsc/ntRoot/blob/main/ntRootPSB2025.png)\nThis [PSB2025 poster](https://f1000research.com/posters/13-1021), also available on [zenodo](https://doi.org/10.5281/zenodo.13844277), contains additional information, benchmarks and results.\n\n\n## Citing \u003ca name=citing\u003e\u003c/a\u003e\n\nThank you for your [![Stars](https://img.shields.io/github/stars/bcgsc/ntRoot.svg)](https://github.com/bcgsc/ntRoot/stargazers) and for using and promoting this free software! We hope that ntRoot is useful to you and your research.\n\nIf you use ntRoot, please cite:\n\n[ntRoot: human ancestry inference at scale, from genomic data](https://doi.org/10.1101/2024.03.26.586646)\n\u003cpre\u003e\nHuman ancestry inference at scale, from genomic data\nWarren RL, Coombe L, Wong J, Kazemi P, Birol I.\nbioRxiv 2024.03.26.586646; doi: https://doi.org/10.1101/2024.03.26.586646\n\u003c/pre\u003e\n\nCiting the poster:\n\u003cpre\u003e\nWarren R, Coombe L, Wong J et al. ntRoot: Scalable ancestry predictions from genome sequencing data [version 1]. F1000Research 2024, 13:1021 (poster) (https://doi.org/10.7490/f1000research.1119849.1)\n\u003c/pre\u003e\n\nSee how we applied `ntRoot` to [infer ancestry for 10,250 Canadian participants from the HostSeq cohort](https://doi.org/10.1101/2025.06.10.658783):\n\u003cpre\u003e\nConcordance and dissonance: A genome-wide analysis of self-declared versus inferred ancestry in 10,250 participants from the HostSeq cohort\nRené L Warren, Inanc Birol, CGEn HostSeq Initiative\nbioRxiv 2025.06.10.658783; doi: https://doi.org/10.1101/2025.06.10.658783\n\u003c/pre\u003e\n\n## License \u003ca name=license\u003e\u003c/a\u003e\n\nntRoot Copyright (c) 2024-present British Columbia Cancer Agency Branch.  All rights reserved.\n\nntRoot is released under the GNU General Public License v3\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, version 3.\n \nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\nFor commercial licensing options, please contact\nPatrick Rebstein \u003cprebstein@bccancer.bc.ca\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcgsc%2Fntroot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcgsc%2Fntroot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcgsc%2Fntroot/lists"}