# PRS Pipeline

### PRS - Polygenic Risk Score

A PRS, also known as **genetic risk score** or **genome-wide score**, is a value based on variation in multiple genetic loci and their associated weights. It renders the *best prediction* for the trait that can be made when taking into account variation in multiple genetic variants.

Single variant association analysis requires very large sample sizes to detect more than a few of SNPs for many complex traits. In contrast, PRS analysis aims to identify aggregates genetic risk across the genome in a single individual polygenic score for a trait of interest. In this approach, a large discovery sample is required to determine how much each SNP is expected to contribute to the polygenic score of a specific trait. Subsequently, in an independent target sample, which can be more modest in size, polygenic scores can be determined based on genetic DNA profiles and these weights.<br>

### Workflow

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M5M0wN2UEgTSjcHrYLu%2F-M5M31YvfWFopDUra1NP%2Fimage.png?alt=media\&token=d2a939fd-01e3-4eeb-9052-f40806d0f156)

#### User Journey

A few simple steps are needed to run this pipeline:

1. search the dataset using a therapeutic tag of interest in the search dataset page;
2. select the data that you want to perform the analysis on;
3. select PRS pipeline card;
4. choose the parameters from the configuration page;
5. provide the job name and run the analysis;

then, you will be redirected to the results page.

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-MDyLWB5NtRF2dFyACKT%2F-MDyOS0Q80eDXyjvzT3p%2Fimage.png?alt=media\&token=5037c2cb-fb8c-4369-9245-eb79ef35d6f5)

The design is always the same as the previous pipelines since they share all the same characteristics.

You can find an in-depth explanation of GWAS parameters [here](https://app.gitbook.com/@shivom/s/documentation/~/drafts/-M5SP1CfCeje9exOpQgZ/pipelines/gwas-pipeline).

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-MDyLWB5NtRF2dFyACKT%2F-MDyOayCfTqgUNUo3D-g%2Fimage.png?alt=media\&token=367cd265-a85a-416f-8285-dd2a85fdb769)

You can choose to use a **Shivom Dataset** by switching *on*, or upload your dataset; in this case, the file to be uploaded must contain the GWAS summary stats.&#x20;

There are two ways to select this dataset, either output from Shivom GWAS pipeline or if the GWAS was run on a Plink based program/software:

* Directly from GWAS output /results/assoc/xxx.assoc (extension, .assoc)
* you can upload a file from your own GWAS output computed via a non-Plink based software, then you will have to state the format of their GWAS text file or instead, and more preferably, we would state the format of the file itself.&#x20;

In order for you to trigger the upload of a file of your own GWAS, you would have to toggle ‘ON’ index.

Then, you will have to specify the columns for the base file using a 0-based **index**: you can do this using the drop-down menu in which the names of the columns will be specified.

The **Target Dataset Folder** will contain the bed, bim and fam files (Plink Binary Files).&#x20;

**Target Dataset**: the PRS that is generated in the Base dataset will be applied on a different dataset for the same trait or a completely different trait. Target dataset can either be on Shivom’s Dataset or a third party GWAS summary statistics.&#x20;

Or, if this pipeline is connected to the GWAS pipeline, then this can then automatically be selected. The flag to set the file input for the target dataset is stated below.

A phenotype will be required which will be associated with the target dataset. This file format will be the same as the GWAS pheno file, with FID, IID. \
If the Target Dataset is Shivom’s GWAS, then we can associate the pheno-file directly from the platform automatically. However, if it isn’t, then we offer a file upload button. Regarding the **Phenotype file**, the format will be two columns, the first being ‘FID’ and the next being ‘IID’.

If you want to **ignore FID column**, *switch on* the button: when **ignore-fid** is set, the first column should be the IID. The rest of the columns can be the phenotype(s).&#x20;

To specify a trait within the **phenotype file**, the column name for the trait can be specified using **Column name**, providing that the phenotype file contains a header.

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-MDyLWB5NtRF2dFyACKT%2F-MDyOqUsHc-rbpO8I079%2Fimage.png?alt=media\&token=5119ee35-020d-4dec-be7a-2be90e58135c)

If you would like to use covariates as part of your calculation, then you would have to upload a **Covariate File**. The format will be the same as the phenotype file, with FID and then IID as the first two columns followed by the covariate columns.

You can choose from the options **Clumping** and **no-Clumping**: this is an integral part of the pre-processing of the data set. This feature allows the SNPs with the greatest signal (lowest p-value) to be kept in all calculations.

> **Clumping** is a procedure in which only the most significant SNP in each LD block is identified and selected for further analyses. This reduces the correlation between the remaining SNPs, while retaining SNPs with the strongest statistical evidence.

For **MissingData**, you will have to select from the options in the dropdown menu how you would like to deal and handle missing genotype data:

* MEAN\_IMPUTE;
* SET\_ZERO;
* CENTER.

If the target dataset is small (<500) then it will be useful to use a LD reference file, such as 1000 Genome to improve clumping.

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-MDyLWB5NtRF2dFyACKT%2F-MDyP1XrNiMbesg6Fb6a%2Fimage.png?alt=media\&token=ac0733f0-d94c-4e8c-8712-ef08928d0b59)

All Linkage Disequilibrium parameters accept any integer / float as input, except **LD info value** which must be between *0.0* and *1.0*.

> &#x20;**Linkage disequilibrium** is a measure of non‐random association between alleles at different loci at the same chromosome in a given population. SNPs are in LD when the frequency of association of their alleles is higher than expected under random assortment. LD concerns patterns of correlations between SNPs.
>
> &#x20;**Minor allele frequency (MAF)** is the frequency of the least often occurring allele at a specific location. Most studies are underpowered to detect associations with SNPs with a low MAF and therefore exclude these SNPs.

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-MDyLWB5NtRF2dFyACKT%2F-MDyP8Yfsqw6UH2A1skx%2Fimage.png?alt=media\&token=94714c5b-fa98-46cb-b503-6d8a87b5a599)

The next section requires configuration of the parameters that will be used to compute the analysis.

\
If you switch off the **No Regression** option, you can choose from the following **Regression models**:

* **add**: additive model;
* **dom**: dominant model;
* **rec**: recessive model;
* **het**: heterozygous only.

You can also select one of these **Scoring methods**:

* **avg**: average;
* **std**: standard deviation;
* **sum**.

You can add additional parameters: **Number of permutations** to perform, the **Quantile plot** and to print the first 10 rows of the **SNP file**.

The **default parameters set** recommended is:

Target Dataset Folder:

* Ignore FID Column: *switch off.*

Clumping (if *ON*):

* Clumping distance in kb: *250;*
* Clumping r2 value: *0.1;*
* Clumping p-value threshold: *0.1.*

Missing Data:

* PRS calc. Method for missing samples: *mean\_impute.*

LD parameters:

* LD info value: *must be between 0.0 and 1.0.*

Polygenic Risk Calculations:

* No Regression: *switch off;*
* Model for Regression: *Add - additive model;*
* Scoring Method: *Avg;*
* Score for individual samples: *switch off.*

Additional parameters:

* Number of permutations: *enter at least 10000;*
* Print the SNP to the file: *switch on;*
* Print the Quantile Plot: *switch on.*

### Results

Once you have selected the dataset to be used, chosen the pipeline and set all the parameters, you can start your analysis using the *Run Analysis* box; at this point, you will be redirected to this page, where you can keep an eye on which works are *In Progress*, which are *Completed*, and choose to carry out a new analysis.&#x20;

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-ME3RTcdn0x8-jxQVEbq%2F-ME3S3HQbJfzDdiKFdRV%2FLight%20-%20Dashboard%402x.png?alt=media\&token=0092011a-43fb-4673-9d66-0b9942c4ab74)

By clicking on your *JobName*, you will have access to a page where you can monitor all the processes involved in your analysis:

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-ME3RTcdn0x8-jxQVEbq%2F-ME3Rj_M3uekxa18wcRx%2FLight%20-%20Pipeline%20Job%402x.png?alt=media\&token=1ec23184-4d03-4aee-9030-ed55bb200481)

Now, selecting the *Results* box on the right, let's take a look at the demo results obtained using the Default Parameters Set:&#x20;

**Bar Plot**

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M5gGntqm1IaLTLdJFiO%2F-M5gK2ztqhivK4-q3QnV%2Fimage.png?alt=media\&token=ba1cea26-8205-480d-a293-fb28b5064453)

**High Resolution Plot**

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M5gGntqm1IaLTLdJFiO%2F-M5gKBKijeUdklvEiCov%2Fimage.png?alt=media\&token=cda04179-ba3a-4770-aaca-40e88c04fc79)

**Quantile Plot**

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M5gGntqm1IaLTLdJFiO%2F-M5gKRWYBenydNycVE1h%2Fimage.png?alt=media\&token=ef104a72-91a9-4c79-a862-a6dcd459b1a4)

By clicking on the Interactive Graphs option, another way of displaying the results is made available:

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M7DXRGupcjbR_icWzWe%2F-M7DXp8s95mBi9G1Bhsd%2Fimage.png?alt=media\&token=341e68e3-86c1-4c94-ab8e-aacd65f13c12)

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M7DXRGupcjbR_icWzWe%2F-M7DXwMsC-a5oCicVw42%2Fimage.png?alt=media\&token=050d9835-8184-45c3-a23d-6a6b6ce8759f)

![](https://335305010-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Sm7H8vvZ4Rwarnfru%2F-M7DXRGupcjbR_icWzWe%2F-M7DY1ki5DUsJgFZ-XQo%2Fimage.png?alt=media\&token=483570a1-e2c0-4fd5-971f-28a0d683ee43)

Finally, using the *Export* box, you will be able to download the results of your analysis in a *.pdf* format file.

#### Reference

1. [**Pipeline Reference**](https://github.com/choishingwan/PRSice)
2. [**Data quality control in genetic case-control association studies**](https://www.nature.com/nprot/journal/v5/n9/abs/nprot.2010.116.html), Anderson CA et al, 2010
3. [**A tutorial on conducting genome‐wide association studies: Quality control and statistical analysis**](https://onlinelibrary.wiley.com/doi/abs/10.1002/mpr.1608), Marees AT et al, 2018
4. [**PRSice-2: Polygenic Risk Score software for biobank-scale data**](https://academic.oup.com/gigascience/article-abstract/8/7/giz082/5532407), Choi SW et al, 2019
