{"id":18256434,"url":"https://github.com/baderlab/poppathr","last_synced_at":"2026-06-29T18:05:03.773Z","repository":{"id":146738793,"uuid":"201321105","full_name":"BaderLab/POPPATHR","owner":"BaderLab","description":"Population-based pathway analysis of SNP-SNP coevolution","archived":false,"fork":false,"pushed_at":"2021-07-30T19:34:50.000Z","size":14739,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T03:45:35.438Z","etag":null,"topics":["coevoluton","enrichment","pathway-analysis","population-genetics","positive-selection"],"latest_commit_sha":null,"homepage":"","language":"R","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/BaderLab.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":"2019-08-08T19:08:10.000Z","updated_at":"2021-06-09T20:35:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e132886-7488-4fad-a14d-16b3a1aecb9c","html_url":"https://github.com/BaderLab/POPPATHR","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPOPPATHR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPOPPATHR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPOPPATHR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaderLab%2FPOPPATHR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaderLab","download_url":"https://codeload.github.com/BaderLab/POPPATHR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247937439,"owners_count":21021258,"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":["coevoluton","enrichment","pathway-analysis","population-genetics","positive-selection"],"created_at":"2024-11-05T10:21:54.198Z","updated_at":"2026-06-29T18:04:58.752Z","avatar_url":"https://github.com/BaderLab.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POPPATHR\n\nPOPPATHR is an R package that determines pathway-level SNP-SNP associations (coevolution) driven by population positive selection to better understand the evolution of human pathways.\n\n## Prerequisites\n\nR version \u003e 3.5.0\n\nSoftware:\n- [GenGen](https://github.com/WGLab/GenGen.git)\n- [PLINK v1.90](http://www.cog-genomics.org/plink2/)\n- [Cytoscape](https://cytoscape.org/download.html)\n\nOptional for genome assembly conversion:\n- [liftOver](https://genome.sph.umich.edu/wiki/LiftOver)\n- [liftOverPlink](https://github.com/sritchie73/liftOverPlink)\n\nR packages:\n- **CRAN**: tidyverse, dplyr, data.table, reshape2, gdata, RColorBrewer, cowplot, and argparse\n- **Bioconductor**: GenomicRanges, snpStats, and RCy3\n\n## Getting started\n\n### Cloning\n\nClone the package locally from Github using git:\n\n```\n# Run on the command line (Terminal)\ngit clone https://github.com/BaderLab/POPPATHR.git\n```\n\n### Software\n\nDownloading the software packages above may look something like this (on a Mac):\n\n```\n# Run the following lines on the command line (Terminal)\n\n# Enter POPPATHR software folder\ncd POPPATHR/\nPOPPATHR_DIR=$(pwd)\ncd ${POPPATHR_DIR}/data/software\n\n# Clone GenGen repository\ngit clone https://github.com/WGLab/GenGen.git\n\n# Download and unzip PLINK\nwget http://s3.amazonaws.com/plink1-assets/plink_mac_20200616.zip\nunzip *.zip -d plink\nrm *.zip\n\n# Download liftOver binary and hg18 to hg19 chain file\nrsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/macOSX.x86_64/liftOver ./\nrsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/macOSX.x86_64/hgsql ./\n\n# Clone liftOverPlink repository\ngit clone https://github.com/sritchie73/liftOverPlink.git\n\n# Add executables to PATH\necho '' \u003e\u003e ~/.bash_profile\necho '# POPPATHR software executables' \u003e\u003e ~/.bash_profile\necho 'export PATH=\"'${POPPATHR_DIR}/data/software'/GenGen:$PATH\"' \u003e\u003e ~/.bash_profile\necho 'export PATH=\"'${POPPATHR_DIR}/data/software'/plink:$PATH\"' \u003e\u003e ~/.bash_profile\necho 'export PATH=\"'${POPPATHR_DIR}/data/software'/liftOverPlink:$PATH\"' \u003e\u003e ~/.bash_profile\n\n# Source file for changes to take effect\nsource ~/.bash_profile\n```\n\nCytoscape needs to be downloaded from your browser using the link [above](#prerequisites).\n\n### Data inputs\n\nYou will need two types of data to use POPPATHR:\n- [SNP genotypes](#snp-genotypes)\n- [Gene set annotations](#gene-set-annotations)\n\nPlus optional data to dig deeper into your POPPATHR results:\n- [Functional genome annotations](#functional-genome-annotations)\n\n#### SNP genotypes\n\nIn the paper, we used population SNP genotype data from the International HapMap Project 3 (HM3). This data required a genome assembly conversion from hg18 to hg19, and needed to be converted to PLINK [binary format](http://www.cog-genomics.org/plink/1.9/formats) (bim, bed, fam).\n\n```\n# Enter POPPATHR genotypes folder\n# Assuming POPPATHR_DIR is defined as above\ncd ${POPPATHR_DIR}/data/genotypes\n\n# Define paths to HM3 genotype data and chain file for hg18 to hg19 build conversion\ngenotype_file=\"HM3_2010_05_phase3\"\nhome_folder=\"https://ftp.ncbi.nlm.nih.gov/hapmap/genotypes/2010-05_phaseIII\"\nchain_file=\"http://hgdownload.cse.ucsc.edu/goldenpath/hg18/liftOver/hg18ToHg19.over.chain\"\n\n# Download file defining individuals per population panel\npopulation_file=\"relationships_w_pops_041510.txt\"\nwget ${home_folder}/${population_file}\n\n# Re-define paths to HM3 genotype data\nhome_folder=${home_folder}/plink_format\nmap_file=\"hapmap3_r3_b36_fwd.consensus.qc.poly.map\"\nped_file=\"hapmap3_r3_b36_fwd.consensus.qc.poly.ped\"\n\n# Download files and unpack\nwget ${home_folder}/${map_file}.gz ${home_folder}/${ped_file}.gz ${chain_file}.gz\ngunzip *.gz\n\n# Run liftOverPlink to convert genome assembly\nliftOverPlink.py -m ${map_file} -p ${ped_file} -o ${genotype_file} \\\n                 -e ${POPPATHR_DIR}/data/software/liftOver \\\n                 -c ${POPPATHR_DIR}/data/genotypes/$(basename -- ${chain_file})\n\n# Convert to PLINK binary format\nplink --file ${genotype_file} --make-bed --out ${genotype_file}\n```\n\n#### Gene set annotations\n\nTo identify selection-enriched pathways by gene set enrichment analysis (implemented via GenGen), we used a set of gene set annotations from the [Bader lab](http://download.baderlab.org/EM_Genesets/).\n\nThe particular set we used contains only gene sets from GO biological process excluding annotations that have evidence code IEA (inferred from electronic annotation), ND (no biological data available), and RCA (inferred from reviewed computational analysis) and all pathway resources.\n\n```\n# Enter POPPATHR annotations folder\n# Assuming POPPATHR_DIR is defined as above\ncd ${POPPATHR_DIR}/data/annotations\n\n# Define path to file\nhome_folder=\"http://download.baderlab.org/EM_Genesets/\"\n\n# NOTE: we used the annotation file dated April 26 2016\ndate=\"April_24_2016\"\norganism=\"Human\"\nkey_type=\"symbol\"\nfile_path=\"${organism}_GOBP_AllPathways_no_GO_iea_${date}_${key_type}.gmt\"\n\n# Download file\nwget ${home_folder}/${date}/${organism}/${key_type}/${file_path}\n```\n\n#### Functional genome annotations\n\nTo assess the functionality of the identified selection-enriched pathways, we integrated the pathway variants with various genomic annotation features: [GWAS traits and diseases](https://www.ebi.ac.uk/gwas/), [expression quantitative trait loci (eQTLs)](https://www.gtexportal.org/home/), [disease phenotypes](https://omim.org/), and [drug targets](http://www.dgidb.org/).\n\nTo download data disease phenotype data from OMIM, you will need to request access and obtain a valid API key (do so [here](https://www.omim.org/api)).\n\n```\n# Enter POPPATHR annotations folder\n# Assuming POPPATHR_DIR is defined as above\ncd ${POPPATHR_DIR}/data/annotations\n\n# NHGRI-EBI GWAS file\ngwas_file=\"https://www.ebi.ac.uk/gwas/api/search/downloads/alternative\"\ngwas_out=\"nhgri_gwas_hits.txt\"\nwget ${gwas_file} -O ${gwas_out}\n\n# DGIdb drug-gene interaction file\ndrug_file=\"http://www.dgidb.org/data/interactions.tsv\"\ndrug_out=\"dgidb_drug_gene_interactions.txt\"\nwget ${drug_file} -O ${drug_out}\n\n# OMIM disease-gene association file\nomim_file=\"https://data.omim.org/downloads/[YOUR-API-KEY]/morbidmap.txt\"\nomim_out=\"omim_disease_gene_interactions.txt\"\nwget ${omim_file} -O ${omim_out}\n\n# GTEx genotype-tissue expression files\n# NOTE: large file after unpacking (5GB)\neqtl_file=\"https://storage.googleapis.com/gtex_analysis_v7/single_tissue_eqtl_data/GTEx_Analysis_v7_eQTL.tar.gz\"\neqtl_out=\"gtex_eqtl_V7\"\nmkdir ${eqtl_out}\nwget ${eqtl_file} -O ${eqtl_out}.tar.gz\ntar -zxvf ${eqtl_out}.tar.gz -C ${eqtl_out} --strip-components 1\ngzip -d ${eqtl_out}/*\nrm ${eqtl_out}.tar.gz\n```\n\n## Basic usage\n\nYou've made it to this step, hurray!\n\nRunning POPPATHR involves 3 parts that are split into the following scripts (used in this order):\n- get_enrichment.R\n- get_coevolution.R\n- get_properties.R\n\nThe pipeline is currently set up to run as default on the inputs we used for our paper: SNP genotypes for two population comparisons (**CEU_YRI** and **CEU_LWK**) along with the annotation files outlined above. You can run the complete pipeline with these defaults by executing the following shell script on the command line: `sh run_POPPATHR.sh`\n\nOtherwise, you can supply POPPATHR scripts with your own data. You can find detailed descriptions of all R script arguments in a handy command line interface:\n\n```\nRscript get_enrichment.R --help\n\nusage: get_enrichment.R [-h] [-v] [-p POPULATION_PAIR] [-g GENOTYPE_FILE]\n                        [-t POPULATION_TABLE] [-a ANNOTATION_FILE]\n                        [-r REFGENE_FILE] [-o OUTPUT_FOLDER]\n                        [--SET_PERM SET_PERM] [--MIN_GENE MIN_GENE]\n                        [--MAX_GENE MAX_GENE] [--SNP2GENE_DIST SNP2GENE_DIST]\n\nPOPPATHR: Population-based pathway analysis of SNP-SNP coevolution. This\nscript identifies selection-enriched pathways between two population cohorts.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --verbose         Print verbose output\n  -p POPULATION_PAIR, --population_pair POPULATION_PAIR\n                        Names of two population cohorts to test (e.g., CEU_YRI\n                        or CEU_LWK)\n  -g GENOTYPE_FILE, --genotype_file GENOTYPE_FILE\n                        Path to PLINK (bed, bim, fam formatted) SNP genotype\n                        files [default data/genotypes/HM3_2010_05_phase3]\n  -t POPULATION_TABLE, --population_table POPULATION_TABLE\n                        Path to table defining population genotypes [default\n                        data/genotypes/relationships_w_pops_041510.txt]\n  -a ANNOTATION_FILE, --annotation_file ANNOTATION_FILE\n                        Path to gmt file containing gene set annotations\n                        [default data/annotations/Human_GOBP_AllPathways_no_GO\n                        _iea_April_24_2016_symbol.gmt]\n  -r REFGENE_FILE, --refgene_file REFGENE_FILE\n                        Path to refGene genome annotation file [default\n                        data/annotations/refGene.hg19.header.txt]\n  -o OUTPUT_FOLDER, --output_folder OUTPUT_FOLDER\n                        Path to output folder [default output]\n  --SET_PERM SET_PERM   Number of GSEA permutation cycles to run [default\n                        10000]\n  --MIN_GENE MIN_GENE   Minimum number of genes permitted in gene set\n                        [default 10]\n  --MAX_GENE MAX_GENE   Maximum number of genes permitted in gene set\n                        [default 300]\n  --SNP2GENE_DIST SNP2GENE_DIST\n                        Maximum distance (bp) considered for SNP-to-gene\n                        mapping [default 500000.0]\n```\n\nYou will find two results folders in the **output** directory named by the population comparisons that were run. For example, if you ran `get_enrichment.R` on **CEU_YRI** and **CEU_LWK**, you will find two folders in **output** named accordingly with lots of data inside to peruse.\n\n## Versioning\n\nFor the versions available, see the [tags on this repository](https://github.com/BaderLab/POPPATHR/tags).\n\n## Authors\n\n- **Catherine Ross**\n- **Shraddha Pai**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaderlab%2Fpoppathr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaderlab%2Fpoppathr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaderlab%2Fpoppathr/lists"}