Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #106

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Dev #106

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/build_deploy_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release'
required: true

jobs:
build-and-deploy:
Expand All @@ -16,7 +20,8 @@ jobs:
DOCKER_IMAGE_NAME: opaino/genopred_pipeline
SINGULARITY_IMAGE_NAME: library://opain/genopred
IMAGE_TAG: ${{ github.ref_name }}

DOCKERFILE_PATH: pipeline/misc/docker/Dockerfile

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -29,7 +34,7 @@ jobs:

- name: Build and Push Docker Image
run: |
docker buildx build --platform linux/amd64 -t $DOCKER_IMAGE_NAME:latest -t $DOCKER_IMAGE_NAME:$IMAGE_TAG --push .
docker buildx build --platform linux/amd64 -f $DOCKERFILE_PATH -t $DOCKER_IMAGE_NAME:latest -t $DOCKER_IMAGE_NAME:${{ github.event.inputs.tag }} --push .

- name: Install Singularity
run: |
Expand All @@ -47,5 +52,6 @@ jobs:
- name: Push Singularity Image to Singularity Library
run: |
singularity push ${GITHUB_WORKSPACE}/image.sif $SINGULARITY_IMAGE_NAME:latest
singularity build ${GITHUB_WORKSPACE}/image_$IMAGE_TAG.sif docker-daemon://${DOCKER_IMAGE_NAME}:$IMAGE_TAG
singularity push ${GITHUB_WORKSPACE}/image_$IMAGE_TAG.sif $SINGULARITY_IMAGE_NAME:$IMAGE_TAG
singularity build ${GITHUB_WORKSPACE}/image_${{ github.event.inputs.tag }}.sif docker-daemon://${DOCKER_IMAGE_NAME}:${{ github.event.inputs.tag }}
singularity push ${GITHUB_WORKSPACE}/image_${{ github.event.inputs.tag }}.sif $SINGULARITY_IMAGE_NAME:${{ github.event.inputs.tag }}

5 changes: 3 additions & 2 deletions docs/pipeline_overview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ The pipeline uses the Snakemake workflow manager and conda environments providin

***

**Please cite the following paper** when you use the GenoPred pipeline:
Pain, Oliver, et al. "Evaluation of polygenic prediction methodology within a reference-standardized framework." PLoS genetics 17.5 (2021): e1009021.
# Preprint

Check out our preprint describing the pipeline: "The GenoPred Pipeline: A Comprehensive and Scalable Pipeline for Polygenic Scoring." - <a href="https://doi.org/10.1101/2024.06.12.24308843" class="inline_button">Link</a>

***

Expand Down
13 changes: 8 additions & 5 deletions docs/pipeline_overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<title>GenoPred Pipeline</title>

<script src="site_libs/header-attrs-2.25/header-attrs.js"></script>
<script src="site_libs/header-attrs-2.26/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
Expand Down Expand Up @@ -389,10 +389,13 @@ <h1>Promo Video</h1>
<iframe width="560" height="315" src="https://www.youtube.com/embed/dKiG8Udz0rI?si=umolv53Scyh1a4fL" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen>
</iframe>
<hr />
<p><strong>Please cite the following paper</strong> when you use the
GenoPred pipeline: Pain, Oliver, et al. “Evaluation of polygenic
prediction methodology within a reference-standardized framework.” PLoS
genetics 17.5 (2021): e1009021.</p>
</div>
<div id="preprint" class="section level1">
<h1>Preprint</h1>
<p>Check out our preprint describing the pipeline: “The GenoPred
Pipeline: A Comprehensive and Scalable Pipeline for Polygenic Scoring.”
-
<a href="https://doi.org/10.1101/2024.06.12.24308843" class="inline_button">Link</a></p>
<hr />
</div>
<div id="any-questions" class="section level1">
Expand Down
8 changes: 6 additions & 2 deletions docs/pipeline_readme.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ For a technical details of the GenoPred pipeline, click [here](pipeline_technica

**Citations**

Please cite our paper describing the reference-standardised approach used by the GenoPred pipeline:
Please cite our preprint when using the pipeline:

- Pain, Oliver, et al. "Evaluation of polygenic prediction methodology within a reference-standardized framework." PLoS genetics 17.5 (2021): e1009021.
- "Pain, O. et al. "The GenoPred Pipeline: A Comprehensive and Scalable Pipeline for Polygenic Scoring." MedRxiv 2024. https://doi.org/10.1101/2024.06.12.24308843

If relevant, please also cite our paper comparing polygenic scoring methods and describing the reference-standardised approach:

- Pain, O. et al. "Evaluation of polygenic prediction methodology within a reference-standardized framework." PLoS genetics. https://doi.org/10.1371/journal.pgen.1009021

Please also cite the relevant studies for the tools and data used by the GenoPred pipeline.

Expand Down
18 changes: 13 additions & 5 deletions docs/pipeline_readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,20 @@ <h1 class="title toc-ignore">GenoPred Pipeline - Instructions</h1>
GenoPred pipeline, click <a href="pipeline_technical.html">here</a>.</p>
<hr />
<p><strong>Citations</strong></p>
<p>Please cite our paper describing the reference-standardised approach
used by the GenoPred pipeline:</p>
<p>Please cite our preprint when using the pipeline:</p>
<ul>
<li>Pain, Oliver, et al. “Evaluation of polygenic prediction methodology
within a reference-standardized framework.” PLoS genetics 17.5 (2021):
e1009021.</li>
<li>“Pain, O. et al. ”The GenoPred Pipeline: A Comprehensive and
Scalable Pipeline for Polygenic Scoring.” MedRxiv 2024. <a
href="https://doi.org/10.1101/2024.06.12.24308843"
class="uri">https://doi.org/10.1101/2024.06.12.24308843</a></li>
</ul>
<p>If relevant, please also cite our paper comparing polygenic scoring
methods and describing the reference-standardised approach:</p>
<ul>
<li>Pain, O. et al. “Evaluation of polygenic prediction methodology
within a reference-standardized framework.” PLoS genetics. <a
href="https://doi.org/10.1371/journal.pgen.1009021"
class="uri">https://doi.org/10.1371/journal.pgen.1009021</a></li>
</ul>
<p>Please also cite the relevant studies for the tools and data used by
the GenoPred pipeline.</p>
Expand Down
11 changes: 9 additions & 2 deletions docs/pipeline_technical.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ library(data.table)

This document provides technical details of the GenoPred pipeline. The GenoPred pipeline automates the process of calculating polygenic scores. The pipeline aims to implement the current practises for polygenic scoring. See [here](pipeline_overview.html) more general information regarding the GenoPred pipeline.

**Please cite the following paper** when you use the GenoPred pipeline:
Pain, Oliver, et al. "Evaluation of polygenic prediction methodology within a reference-standardized framework." PLoS genetics 17.5 (2021): e1009021.
Please cite our preprint when using the pipeline:

- "Pain, O. et al. "The GenoPred Pipeline: A Comprehensive and Scalable Pipeline for Polygenic Scoring." MedRxiv 2024. https://doi.org/10.1101/2024.06.12.24308843

If relevant, please also cite our paper comparing polygenic scoring methods and describing the reference-standardised approach:

- Pain, O. et al. "Evaluation of polygenic prediction methodology within a reference-standardized framework." PLoS genetics. https://doi.org/10.1371/journal.pgen.1009021

Please also cite the relevant studies for the tools and data used by the GenoPred pipeline.

***

Expand Down
21 changes: 17 additions & 4 deletions docs/pipeline_technical.html
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,23 @@ <h1>Introduction</h1>
scores. The pipeline aims to implement the current practises for
polygenic scoring. See <a href="pipeline_overview.html">here</a> more
general information regarding the GenoPred pipeline.</p>
<p><strong>Please cite the following paper</strong> when you use the
GenoPred pipeline: Pain, Oliver, et al. “Evaluation of polygenic
prediction methodology within a reference-standardized framework.” PLoS
genetics 17.5 (2021): e1009021.</p>
<p>Please cite our preprint when using the pipeline:</p>
<ul>
<li>“Pain, O. et al. ”The GenoPred Pipeline: A Comprehensive and
Scalable Pipeline for Polygenic Scoring.” MedRxiv 2024. <a
href="https://doi.org/10.1101/2024.06.12.24308843"
class="uri">https://doi.org/10.1101/2024.06.12.24308843</a></li>
</ul>
<p>If relevant, please also cite our paper comparing polygenic scoring
methods and describing the reference-standardised approach:</p>
<ul>
<li>Pain, O. et al. “Evaluation of polygenic prediction methodology
within a reference-standardized framework.” PLoS genetics. <a
href="https://doi.org/10.1371/journal.pgen.1009021"
class="uri">https://doi.org/10.1371/journal.pgen.1009021</a></li>
</ul>
<p>Please also cite the relevant studies for the tools and data used by
the GenoPred pipeline.</p>
<hr />
</div>
<div id="software" class="section level1">
Expand Down
82 changes: 41 additions & 41 deletions pipeline/misc/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Use the base image
FROM ubuntu:latest

# Run commands in a single RUN layer to reduce the image size
RUN apt-get update && \
apt-get install -y git curl wget zip gzip vim build-essential zlib1g-dev jq && \

# Create a wrapper script for tar that includes --no-same-owner
echo '#!/bin/sh' > /usr/local/bin/tar && \
echo 'exec /bin/tar --no-same-owner "$@"' >> /usr/local/bin/tar && \
chmod +x /usr/local/bin/tar

# Install Mambaforge
RUN wget https://github.com/conda-forge/miniforge/releases/download/4.10.3-10/Mambaforge-4.10.3-10-Linux-x86_64.sh && \
bash Mambaforge-4.10.3-10-Linux-x86_64.sh -b -p /opt/mambaforge && \
rm Mambaforge-4.10.3-10-Linux-x86_64.sh

# Download GenoPred
RUN mkdir -p /tools/GenoPred && \
cd /tools/GenoPred && \
git clone --depth 1 --branch v2.2.7 https://github.com/opain/GenoPred.git . && \
git fetch --tags

# Create genopred env
RUN /opt/mambaforge/bin/conda init bash && \
echo "source /opt/mambaforge/etc/profile.d/conda.sh" >> /etc/bash.bashrc && \
. /opt/mambaforge/etc/profile.d/conda.sh && \
mamba env update -n genopred -f /tools/GenoPred/pipeline/envs/pipeline.yaml && \
mamba clean -a -y

# Run initial snakemake command to setup dependencies
RUN /opt/mambaforge/bin/conda init bash && \
echo "source /opt/mambaforge/etc/profile.d/conda.sh" >> /etc/bash.bashrc && \
. /opt/mambaforge/etc/profile.d/conda.sh && \
conda activate genopred && \
cd /tools/GenoPred/pipeline && \
snakemake --restart-times 3 -j1 --use-conda --conda-frontend mamba install_r_packages resources/software/pgscatalog_utils/download_pgscatalog_utils.done && \
mamba clean -a -y

ENTRYPOINT ["/bin/bash"]
CMD ["-c", "source /opt/mambaforge/etc/profile.d/conda.sh && conda init && source ~/.bashrc && conda activate genopred && cd /tools/GenoPred/pipeline && exec /bin/bash"]
# Use the base image
FROM ubuntu:latest
# Run commands in a single RUN layer to reduce the image size
RUN apt-get update && \
apt-get install -y git curl wget zip gzip vim build-essential zlib1g-dev jq && \
# Create a wrapper script for tar that includes --no-same-owner
echo '#!/bin/sh' > /usr/local/bin/tar && \
echo 'exec /bin/tar --no-same-owner "$@"' >> /usr/local/bin/tar && \
chmod +x /usr/local/bin/tar
# Install Mambaforge
RUN wget https://github.com/conda-forge/miniforge/releases/download/4.10.3-10/Mambaforge-4.10.3-10-Linux-x86_64.sh && \
bash Mambaforge-4.10.3-10-Linux-x86_64.sh -b -p /opt/mambaforge && \
rm Mambaforge-4.10.3-10-Linux-x86_64.sh
# Download GenoPred
RUN mkdir -p /tools/GenoPred && \
cd /tools/GenoPred && \
git clone --depth 1 https://github.com/opain/GenoPred.git . && \
git fetch --tags
# Create genopred env
RUN /opt/mambaforge/bin/conda init bash && \
echo "source /opt/mambaforge/etc/profile.d/conda.sh" >> /etc/bash.bashrc && \
. /opt/mambaforge/etc/profile.d/conda.sh && \
mamba env update -n genopred -f /tools/GenoPred/pipeline/envs/pipeline.yaml && \
mamba clean -a -y
# Run initial snakemake command to setup dependencies
RUN /opt/mambaforge/bin/conda init bash && \
echo "source /opt/mambaforge/etc/profile.d/conda.sh" >> /etc/bash.bashrc && \
. /opt/mambaforge/etc/profile.d/conda.sh && \
conda activate genopred && \
cd /tools/GenoPred/pipeline && \
snakemake --restart-times 3 -j1 --use-conda --conda-frontend mamba install_r_packages resources/software/pgscatalog_utils/download_pgscatalog_utils.done && \
mamba clean -a -y
ENTRYPOINT ["/bin/bash"]
CMD ["-c", "source /opt/mambaforge/etc/profile.d/conda.sh && conda init && source ~/.bashrc && conda activate genopred && cd /tools/GenoPred/pipeline && exec /bin/bash"]
Loading