Get started
pgsc_calc has a few important software dependencies:
- Nextflow
- Docker, Singularity, or Anaconda
- Linux or macOS
Without these dependencies installed you won't be able to run pgsc_calc.
Step by step setupโ
$ java -version # java 17 or later required
$ curl -fsSL get.nextflow.io | bash
$ ./nextflow run hello
-
Install one of Docker, Singularity/Apptainer, or conda
-
Run the
pgsc_calctest profile:
$ nextflow run pgscatalog/pgsc_calc -r v3-alpha.1 -profile test,<docker|singularity|conda>
Please note the test profile genomes are not biologically meaningful, won't produce valid scores, and aren't compatible with other scores on the PGS Catalog. We bundle this test data to simplify installation and automatic tests.
Calculate your first polygenic scoresโ
If you've completed the setup guide successfully then you're ready to calculate scores with your genomic data, which are probably genotypes from real people. Exciting! ๐งฌ๐งช
1. Set up a samplesheetโ
- Your target genomes must be indexed VCF/BCF or BGEN files
- Indexes (csi / tbi / bgi files) must be in the same directory as the target genome file
- Your target genomes should be multi-sample for best calculation efficiency
First, you need to describe the structure of your genomic data in a standardised way. To do this, set up a spreadsheet that looks like:
| sampleset | path | chrom | file_format | genotyping_method |
|---|---|---|---|---|
| 1000G | tests/data/bgen/PGS000586_GRCh38.vcf.gz | vcf | array |
Samplesheets can be in CSV, TSV, JSON, or YAML format.
Samplesheets can describe other ways your data are organised, like genomes split per chromosome or BGEN files. See here for more details.
2. Select scoring filesโ
It's simple to work with polygenic scores that have been published in
the PGS Catalog. You can specify one or more scores using the
--pgs_id parameter:
--pgs_id PGS001229 # one score
--pgs_id PGS001229,PGS001405 # many scores separated by , (no spaces)
You can also select scores associated with traits (--efo_id) and publications (--pgp_id)
If you would like to use your own scoring file that's not published in the PGS Catalog, that's OK too.
3. Set your target genome buildโ
Users are required to specify the genome build that to their genotyping calls are in reference
to using the --target_build parameter. The --target_build parameter only supports builds
GRCh37 (hg19) and GRCh38 (hg38).
--target_build GRCh38 # โ
--target_build GRCh37 # โ
--target_build GRCh36 # โ no
- A PGS Catalog score might have been submitted in a different genome build to your target genomes
- The PGS Catalog makes all scoring files available in GRCh37 and GRCh38 by remapping author-submitted data
- The pipeline will use the target build parameter to fetch a scoring file that aligns with your target genomes
4. Putting it all togetherโ
For this example, we'll assume that the input genomes are in build GRCh38 and you want to use a scoring file in the PGS Catalog:
$ nextflow run pgscatalog/pgsc_calc \
-profile <docker/singularity/apptainer/conda> \
-r v3-alpha.1 \
--input samplesheet.csv \
--target_build GRCh38 \
--pgs_id PGS001229
Congratulations, you've now (hopefully) calculated some scores! ๐ฅณ
Finallyโ
After the workflow executes successfully, the calculated scores and a summary
report should be available in the results/ directory in your current
working directory ($PWD) by default.
If you're interested in more information, see the explanations section of the documentation.
When interpreting results users should ensure that the samples used for calculation were not used for PGS development (see Wray et al. (2013)).
Next stepsโ
- If you're interested in deploying
pgsc_calcon population-scale biobanks like UK Biobank or All of Us, please see the tutorials section - Many common use cases are described in the how-to section
- If you have any questions, please see our discussion forum
- If you experience any problems that you can't fix after checking this documentation, please open an issue
Good luck!