diff --git a/.github/workflows/ancestry.yml b/.github/workflows/ancestry.yml index 988e9054..ec9eb9ad 100644 --- a/.github/workflows/ancestry.yml +++ b/.github/workflows/ancestry.yml @@ -17,7 +17,7 @@ on: env: NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/singularity SINGULARITY_VERSION: 3.8.3 - + jobs: docker: if: ${{ inputs.docker }} @@ -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() diff --git a/conf/modules.config b/conf/modules.config index eef253af..1c15f5c3 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -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 { diff --git a/docs/getting-started.rst b/docs/getting-started.rst index ff4faf08..a7867124 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -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. @@ -149,7 +155,7 @@ they match the scoring file genome build. -profile \ --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:| diff --git a/docs/how-to/ancestry.rst b/docs/how-to/ancestry.rst index 834fa385..a60f3dad 100644 --- a/docs/how-to/ancestry.rst +++ b/docs/how-to/ancestry.rst @@ -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. diff --git a/docs/how-to/index.rst b/docs/how-to/index.rst index 7e34b724..9451a87f 100644 --- a/docs/how-to/index.rst +++ b/docs/how-to/index.rst @@ -42,6 +42,7 @@ Working in different environments bigjob arm offline + mount Working with complex datasets ----------------------------- diff --git a/docs/how-to/mount.rst b/docs/how-to/mount.rst new file mode 100644 index 00000000..bd8cc9d4 --- /dev/null +++ b/docs/how-to/mount.rst @@ -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. diff --git a/environments/pgscatalog_utils/environment.yml b/environments/pgscatalog_utils/environment.yml index b2be6204..e7aeb1fe 100644 --- a/environments/pgscatalog_utils/environment.yml +++ b/environments/pgscatalog_utils/environment.yml @@ -3,4 +3,4 @@ dependencies: - python=3.10 - pip - pip: - - pgscatalog_utils==0.4.2 + - pgscatalog_utils==0.4.3 diff --git a/nextflow.config b/nextflow.config index 5892f786..4adc2fc7 100644 --- a/nextflow.config +++ b/nextflow.config @@ -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 diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index bfb8aeb7..bb92272f 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -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") {