Skip to content

Commit

Permalink
v2.0.0-alpha.4 (#217)
Browse files Browse the repository at this point in the history
* add mount docs

* mount tmpdir in test

* move env

* how did tabs get in here!!

* fix reference link (#214)

* Update FTP links

* Additional docs re: panel

* -profile test + --run_ancestry = bad

* fix trait parameter (#196)

* fix reference link

* update ref paths

---------

Co-authored-by: smlmbrt <[email protected]>

* bump workflow version

* Bump pgscatalog utils (#219)

* bump pgscatalog_utils

* bump pgscatalog-utils

---------

Co-authored-by: smlmbrt <[email protected]>
  • Loading branch information
nebfield and smlmbrt authored Dec 5, 2023
1 parent 8631668 commit 83326a1
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ancestry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
env:
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/singularity
SINGULARITY_VERSION: 3.8.3

jobs:
docker:
if: ${{ inputs.docker }}
Expand Down Expand Up @@ -135,6 +135,8 @@ jobs:

- name: Run ancestry test
run: TMPDIR=~ PROFILE=singularity pytest --kwdof --symlink --git-aware --wt 2 --tag "ancestry" --ignore tests/bin
env:
TMPDIR: ${{ runner.temp }}

- name: Upload logs on failure
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ process {
ext.conda = "$projectDir/environments/pgscatalog_utils/environment.yml"
ext.docker = 'ghcr.io/pgscatalog/pgscatalog_utils'
ext.singularity = 'oras://ghcr.io/pgscatalog/pgscatalog_utils'
ext.docker_version = ':v0.4.2'
ext.singularity_version = ':v0.4.2-singularity'
ext.docker_version = ':v0.4.3'
ext.singularity_version = ':v0.4.3-singularity'
}

withLabel: plink2 {
Expand Down
12 changes: 9 additions & 3 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,17 @@ for more information). If your custom PGS was in GRCh37 an example would look li
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To enable genetic ancestry similarity calculations and PGS normalisation,
download our pre-built reference database:
download one of our pre-built reference databases:

.. code-block:: console
$ wget https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/pgsc_calc.tar.zst
$ wget https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/pgsc_HGDP+1kGP_v1.tar.zst
This database contains a merged 1000 Genomes and Human Genome Diversity Project reference panel, and is the recommended default panel.

You may prefer to use 1000 Genomes only:

$ wget https://ftp.ebi.ac.uk/pub/databases/spot/pgs/resources/pgsc_1000G_v1.tar.zst

See :ref:`ancestry` for more details.

Expand All @@ -149,7 +155,7 @@ they match the scoring file genome build.
-profile <docker/singularity/conda> \
--input samplesheet.csv --target_build GRCh37 \
--pgs_id PGS001229 \
--run_ancestry pgsc_calc.tar.zst
--run_ancestry pgsc_HGDP+1kGP_v1.tar.zst
Congratulations, you've now (`hopefully`) calculated some scores!
|:partying_face:|
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/ancestry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ To enable genetic similarity analysis and score normalisation, just include the
.. code-block:: console
$ nextflow run pgscatalog/pgsc_calc -profile test,docker \
--run_ancestry path/to/reference/pgsc_calc.tar.zst
--run_ancestry path/to/reference/pgsc_HGDP+1kGP_v1.tar.zst
The ``--run_ancestry`` parameter requires the path to the reference database.
1 change: 1 addition & 0 deletions docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Working in different environments
bigjob
arm
offline
mount

Working with complex datasets
-----------------------------
Expand Down
33 changes: 33 additions & 0 deletions docs/how-to/mount.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

.. _mount:

How do I mount non-standard directories in singularity?
=======================================================

In some situations you may get ``FileNotFound`` errors with the singularity profile even if the file definitely exists.

If your sensitive genomic data are stored in a non-standard Linux directory, then containers may need extra configuration to mount the directory correctly

This problem probably affects you if:

- you can run the test profile OK on singularity
- you get ``FileNotFound`` errors when working with your own data
- you are certain the file path reported in the error does exist and is accessible to you

Create a new nextflow configuration file `as described here`_:

.. code-block:: text
singularity {
enabled = true
autoMounts = true
runOptions = '-B /path/to/genomes'
}
.. _`as described here`: https://github.com/PGScatalog/pgsc_calc/issues/158#issuecomment-1713783129

You will need to edit ``runOptions`` to match the path to your local directory containing sensitive data.

And run the calculator with the extra parameter ``-c mount.config``.

Another possible solution is to test your own data with the ``conda`` profile, which doesn't require extra configuration to work with non-standard directories.
2 changes: 1 addition & 1 deletion environments/pgscatalog_utils/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dependencies:
- python=3.10
- pip
- pip:
- pgscatalog_utils==0.4.2
- pgscatalog_utils==0.4.3
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ manifest {
description = 'The Polygenic Score Catalog Calculator is a nextflow pipeline for polygenic score calculation'
mainScript = 'main.nf'
nextflowVersion = '>=22.10.0'
version = '2.0.0-alpha.2'
version = '2.0.0-alpha.4'
}

// Load modules.config for DSL2 module specific options
Expand Down
1 change: 1 addition & 0 deletions tests/config/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def mount_home = "-v $HOME:$HOME -v /private/var/folders/"
if ("$PROFILE" == "singularity") {
singularity.enabled = true
singularity.autoMounts = true
singularity.runOptions = "--bind $TMPDIR:$TMPDIR"
} else if ("$PROFILE" == "conda") {
conda.enabled = true
} else if ("$PROFILE" == "mamba") {
Expand Down

0 comments on commit 83326a1

Please sign in to comment.