### Install POP-TOOLS Source: https://github.com/qlu-lab/pop-tools/blob/main/README.md Installs the POP-TOOLS toolkit and its required modules using Git and pip. This involves cloning the repository and installing dependencies from a requirements file. ```Shell git clone https://github.com/qlu-lab/POP-TOOLS cd POP-TOOLS pip install -r requirements.txt ``` -------------------------------- ### Install POP-TOOLS Dependencies with Pip Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Installs the Python dependencies for POP-TOOLS using pip by referencing the requirements.txt file. Ensure Python 3.8+ is installed. ```shell pip install -r requirements.txt ``` -------------------------------- ### Clone POP-TOOLS Repository Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Clones the POP-TOOLS repository from GitHub using git and navigates into the project directory. This is the initial step for installation. ```shell git clone https://github.com/qlu-lab/POP-TOOLS cd POP-TOOLS ``` -------------------------------- ### Test POP-GWAS Installation Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Runs the POP-GWAS script with the -h flag to display command-line options, verifying a successful installation. ```python python ./POP-GWAS.py -h ``` -------------------------------- ### Install POP-TOOLS Dependencies with Mamba Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Creates a Conda environment with POP-TOOLS dependencies using an environment.yml file. Requires Mamba or Conda to be installed. ```shell mamba env create --file environment.yml ``` -------------------------------- ### Run POP-GWAS for Quantitative Phenotype Source: https://github.com/qlu-lab/pop-tools/wiki/1.-POP‐GWAS This snippet demonstrates how to execute POP-GWAS for a quantitative phenotype, using Head Bone Mineral Density (Head_BMD) as an example. It specifies the required GWAS summary statistics files and the output directory. ```Shell cd POP-TOOLS trait=Head_BMD python3 ./POP-GWAS.py \ --gwas-yhat-unlab ./test/data/${trait}_yhat_unlab.txt.gz \ --gwas-y-lab ./test/data/${trait}_y_lab.txt.gz \ --gwas-yhat-lab ./test/data/${trait}_yhat_lab.txt.gz \ --out ./test/result/${trait} ``` -------------------------------- ### Run POP-GWAS for Binary Phenotype Source: https://github.com/qlu-lab/pop-tools/wiki/1.-POP‐GWAS This snippet illustrates how to run POP-GWAS for a binary phenotype, using Type-2 Diabetes (T2D) as an example. It includes the `--bt` flag to indicate a binary trait and specifies the necessary input files and output path. ```Shell cd POP-TOOLS trait=T2D python3 ./POP-GWAS.py \ --gwas-yhat-unlab ./test/data/${trait}_yhat_unlab.txt.gz \ --gwas-y-lab ./test/data/${trait}_y_lab.txt.gz \ --gwas-yhat-lab ./test/data/${trait}_yhat_lab.txt.gz \ --bt \ --out ./test/result/${trait} ``` -------------------------------- ### Update POP-TOOLS Python Dependencies Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Updates the Python dependencies for POP-TOOLS using pip, ensuring all requirements are up-to-date. ```shell pip install --upgrade -r requirements.txt ``` -------------------------------- ### Activate POP-TOOLS Conda Environment Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Activates the Conda environment created for POP-TOOLS. Replace '' with the actual path obtained from 'conda info --envs'. ```shell conda activate ``` -------------------------------- ### Update POP-TOOLS with Git Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Updates the local POP-TOOLS repository to the latest version from the remote repository using git pull. ```shell git pull ``` -------------------------------- ### Run POP-GWAS with ML-assisted GWAS Source: https://github.com/qlu-lab/pop-tools/wiki/1.-POP‐GWAS This snippet shows how to execute the POP-GWAS script with essential and optional flags for conducting ML-assisted GWAS. It requires paths to GWAS summary statistics for imputed and observed phenotypes in both labeled and unlabeled datasets, along with an output prefix. An optional flag indicates if the phenotype is binary. ```python python3 ./POP-GWAS.py \ --gwas-yhat-unlab \ --gwas-y-lab \ --gwas-yhat-lab \ --out \ --bt ``` -------------------------------- ### View POP-GWAS Output for Quantitative Phenotype Source: https://github.com/qlu-lab/pop-tools/wiki/1.-POP‐GWAS This command shows how to view the initial lines of the output file generated by POP-GWAS for a quantitative phenotype analysis. The output includes standard GWAS columns like CHR, BP, SNP, BETA, SE, P, and N_eff. ```Shell head ./test/result/Head_BMD_POP-GWAS.txt ``` -------------------------------- ### View POP-GWAS Output for Binary Phenotype Source: https://github.com/qlu-lab/pop-tools/wiki/1.-POP‐GWAS This command displays the beginning of the output file from a POP-GWAS analysis on a binary phenotype. The output columns are similar to the quantitative case but include additional metrics relevant to binary traits, such as N_eff_case and N_eff_control. ```Shell head ./test/result/T2D_POP-GWAS.txt ``` -------------------------------- ### Update POP-TOOLS Conda Environment Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS Updates the POP-TOOLS Conda environment using the environment.yml file, applying any changes to dependencies. ```shell mamba env update --file environment.yml ``` -------------------------------- ### GWAS Binary Phenotype Summary Statistics (with BETA and SE) Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS This snippet illustrates GWAS summary statistics for a binary phenotype, including BETA (effect size) and SE (standard error) in addition to the basic required columns. This format is useful for more detailed downstream analyses. ```text CHR BP SNP A1 A2 EAF BETA SE Z P N_case N_control 22 16051249 rs62224609 C T 0.0985074 0.0813246 0.0366686 2.21782669641055 0.0279080826194481 4482 96886 22 16057417 rs62224618 T C 0.100879 0.0739664 0.0362431 2.04084087729802 0.0428913780659107 4513 97555 22 16495833 rs79847867 A C 0.0769438 0.0335083 0.0417085 0.803392593835789 0.421746998039787 4513 97555 ... ``` -------------------------------- ### GWAS Binary Phenotype Summary Statistics (Basic) Source: https://github.com/qlu-lab/pop-tools/wiki/0.-Preparation-for-POP‐TOOLS This snippet shows the basic required columns for GWAS summary statistics when analyzing a binary phenotype. It includes chromosome, base pair position, SNP identifier, alleles, effect allele frequency, z-score, p-value, and sample sizes for cases and controls. ```text CHR BP SNP A1 A2 EAF Z P N_case N_control 22 16051249 rs62224609 C T 0.0985074 2.21782669641055 0.0279080826194481 4482 96886 22 16057417 rs62224618 T C 0.100879 2.04084087729802 0.0428913780659107 4513 97555 22 16495833 rs79847867 A C 0.0769438 0.803392593835789 0.421746998039787 4513 97555 ... ``` -------------------------------- ### Gene-Level Burden Test RVAS with POP-RARE Source: https://github.com/qlu-lab/pop-tools/wiki/2.-POP‐GWAS-for-Rare‐Variant-Association-Studies Conducts ML-assisted gene-level burden test RVAS for quantitative or binary phenotypes. It takes three burden test summary statistics files as input and requires the --burden flag. Results are saved to a specified output file. ```bash cd POP-TOOLS trait=Head_BMD python3 ./POP-RARE.py \ --gwas-yhat-unlab ./test/data/${trait}_yhat_unlab.Burden.txt.gz \ --gwas-y-lab ./test/data/${trait}_y_lab.Burden.txt.gz \ --gwas-yhat-lab ./test/data/${trait}_yhat_lab.Burden.txt.gz \ --burden \ --out ./test/result/${trait} ``` -------------------------------- ### Single-Variant RVAS with POP-RARE Source: https://github.com/qlu-lab/pop-tools/wiki/2.-POP‐GWAS-for-Rare‐Variant-Association-Studies Performs ML-assisted RVAS on a quantitative or binary phenotype using single-variant summary statistics. Requires three RVAS summary statistics files (unlabeled imputed, labeled observed, labeled imputed) and outputs results to a specified file. ```bash cd POP-TOOLS trait=Head_BMD python3 ./POP-RARE.py \ --gwas-yhat-unlab ./test/data/${trait}_yhat_unlab.RVAS.txt.gz \ --gwas-y-lab ./test/data/${trait}_y_lab.RVAS.txt.gz \ --gwas-yhat-lab ./test/data/${trait}_yhat_lab.RVAS.txt.gz \ --out ./test/result/${trait} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.