UK Biobank Research Application Platform (UKB RAP) Educational Materials

repository·main·Indexed 42 days ago

https://github.com/dnanexus-archive/ukb_rap

Educational materials, tutorials, and resources for the UK Biobank Research Application Platform. Includes workflows for GWAS and PheWAS analysis using regenie, WDL compilation via dxCompiler, genotype liftover from GRCh37 to GRCh38, and Docker application integration on the DNAnexus platform.

Tokens
25.6K
Snippets
85
Records
117
Agent score
46%

What's inside UKB RAP

  1. Overview of Docker applications in UKB_RAP

    main

    The docker_apps directory contains resources for reproducible research using Docker within the DNAnexus environment. It includes basic scripts for managing Docker images and example applications that utilize Docker snapshot files.

    Key components include:

    • Docker Image Management: Instructions for pulling and saving Docker snapshot images to a project.
    • Swiss Army Knife Integration: Basics for running Docker images using Swiss Army Knife.
    • Example Applications: A sample application (samtools_count_docker) demonstrating how to use a Docker snapshot file.
  2. Overview of UKB_RAP supplementary material

    main

    This repository contains supplementary materials related to two specific resources:

    1. DNAnexus Blog Post: Discusses infrastructure challenges for machine learning in the cloud using UK Biobank data. Link to Blog Post
    2. Seminar "Jak stary je vas mozek": Materials for the seminar held at the Faculty of Mathematics and Physics, Prague (28 Feb 2024). Information can be found at the MFF Seminar website or via the seminar poster.
  3. Liftover UKB array genotype data from GRCh37 to GRCh38

    main

    This workflow converts UK Biobank (UKB) array genotyping data from the GRCh37 reference build to the GRCh38 (specifically hs38DH) assembly. This is necessary for performing association testing (Step 2 of GWAS) using sequencing data (WES/WGS) which is released on GRCh38.

    The pipeline uses Picard LiftoverVcf to handle scenarios where an ALT allele in the source build equals the target's REF allele by swapping REF/ALT variants. To optimize memory, the pipeline disables variant sorting within Picard LiftoverVcf and instead uses bcftools sort on intermediate VCFs.

    Key Resource Requirements:

    • Disk Space: Up to 200 GB per chromosome (approximately 30x the original BED file size).
    • Memory: Approximately 50 GB per chromosome.
    • Tools used: bcftools, picard, plink, and plink2.
  4. Proteomics analysis example folders

    main

    The proteomics directory contains two primary analysis examples:

    • protein_DE_analysis: Contains JupyterLab notebooks for performing differential expression analysis on UKB-RAP data.
    • protein_pQTL: Contains a notebook designed to prepare data for input into the REGENIE app on the UKB-RAP.
  5. Access UK Biobank Research Application Platform (UKB RAP) resources

    main

    This repository serves as a collection of tutorials and webinar materials for the UK Biobank Research Application Platform (UKB RAP).

    To get started with the platform or find community support, use the following resources:

  6. Perform GWAS on the Research Analysis Platform using regenie

    main
    This repository contains materials and workflows for conducting Genome-Wide Association Studies (GWAS) on the DNAnexus Research Analysis Platform (RAP) specifically utilizing regenie. The materials are based on a webinar regarding GWAS implementation on the platform.
  7. Estimate REGENIE runtime and resource requirements

    main

    The REGENIE app automatically selects an instance type based on an internal formula. You can use this formula to approximate the RAM required for your analysis to estimate costs and choose appropriate instance types.

    RAM (Storage in MB) Formula: RAM = (#samples * (#vas / block_size) / 1048576) * 40 * #traits + 7000

    Example benchmark: Running REGENIE on 1 chromosome (chr22) with 200 protein traits took ~19.5 hours using:

    • Step 1: mem3_ssd2_v2_x4 (4500 MB / 30000 MB)
    • Step 2: mem1_ssd1_v2_x2 (800 MB / 47000 MB)
  8. Run REGENIE via UI

    main

    When using the REGENIE app through the DNAnexus User Interface, provide the following input options:

    ParameterDescription
    Genotype BED for Step 1Path to array data after liftOver
    Genotype BIM for Step 1Path to array data after liftOver
    Genotype FAM for Step 1Path to array data after liftOver
    Genotype BGEN files for Step 2/Bulk/Imputation/Imputation from genotype (GEL)/ukb21008_c22_b0_v1.bgen
    Genotype BGI index files for Step 2/Bulk/Imputation/Imputation from genotype (GEL)/ukb21008_c22_b0_v1.bgen.bgi
    Sample files for Step 2/Bulk/Imputation/Imputation from genotype (GEL)/ukb21008_c22_b0_v1.sample (may require header correction)
    Phenotypes filepheno_200.txt (generated by notebook 1)
    Variant IDs to extract (Step 1)snplist file from Array data QC
    Variant IDs to extract (Step 2)snplist file from Impute data QC
    Sample ID filepheno_200.txt (generated by notebook 1)
  9. Run the samtools_count_apt applet via CLI

    main

    The samtools_count_apt applet uses samtools to count alignments from a CRAM file and outputs the count into a separate TXT file. You can execute this app on the DNAnexus Platform using the dx run command.

    To run the app, provide the path to your CRAM file using the -imappings_cram input flag and use the -y flag to run it immediately.

    dx run samtools_count_apt -imappings_cram=<path_to_your_cram_file> -y
  10. Convert BGEN files using the DNAnexus UI

    main

    To convert BGEN files using the web interface:

    1. Open the Tool library.
    2. Select Swiss-Army-Knife.
    3. On the Swiss-Army-Knife home page, click the Versions tab and select version 4.1.1.
    4. Click Run.
    5. Select your project and the required files in the pop-up menu.
    6. In the Analysis Inputs 1 tab, set the following:
      • Input files: <filename>.bgen and <filename>.sample.
      • Command line: qctool -g *.bgen -s *.sample -og <filename>_converted.bgen -os <filename>_converted.sample -ofiletype bgen -bgen-bits 8 -bgen-compression zlib -bgen-omit-sample-identifier-block