Answers.Body: <p>This would be a hard feature to support natively, because some PRSs have 10 million+ SNPs.</p>
  <p>There is a tool that does this, but I don't want to recommend it because it will require debugging their source code upon running, and it is less accurate than what you are using here.</p>
  <p>I suggest doing --scorefile &quot;my_custom_scores/*.txt&quot; if you are interested in only a few variants. Add only one score to this file. This may cause some error especially if some of your samples do not have all positions defined.</p>
  <p>If you have more variants, there is a way to combine multiple scores in a single scorefile instead of a directory.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-07T05:56:53.803Z
Answers.LastActivityDate: 2023-10-07T05:56:53.803Z
Answers.UserDisplayName: BigMistake
Body: <p>I am using the PGS Calculator (<a href="https://github.com/PGScatalog/pgsc_calc/" rel="nofollow noreferrer">https://github.com/PGScatalog/pgsc_calc/</a>) to compute the polygenic scores of individuals based on a scoring file.</p>
  <p>PGS Calculator works wonderfully and outputs the aggregated score for each individual.</p>
  <p>However, I am interested in the contribution of each variant to the score of each individual.</p>
  <p>At the moment, I have:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>IID</th>
  <th>PGS</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>33432984732</td>
  <td>10</td>
  </tr>
  <tr>
  <td>32432809751</td>
  <td>20</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like the following table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>IID</th>
  <th>Variant 1</th>
  <th>Variant 2</th>
  <th>Variant 3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>33432984732</td>
  <td>3</td>
  <td>4</td>
  <td>3</td>
  </tr>
  <tr>
  <td>32432809751</td>
  <td>6</td>
  <td>8</td>
  <td>6</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>in which I can see the contribution of each variant to the overall score.</p>
  <p>Is this possible with PGS Calculator? If not, is there a tool other than PGS Calculator that I can use? Or should I use my own scripts?</p>
  
Tags: <polygenic-risk-score>
Title: Can the PGS Calculator give the contribution of each variant to the overall PGS?
ThreadText: # Can the PGS Calculator give the contribution of each variant to the overall PGS?
  
  (Asked by: username_0 on 2023-07-28)
  
  I am using the PGS Calculator (<https://github.com/PGScatalog/pgsc_calc/>) to compute the polygenic scores of individuals based on a scoring file.
  
  PGS Calculator works wonderfully and outputs the aggregated score for each individual.
  
  However, I am interested in the contribution of each variant to the score of each individual.
  
  At the moment, I have:
  
  | IID | PGS |
  | --- | --- |
  | 33432984732 | 10 |
  | 32432809751 | 20 |
  
  I would like the following table:
  
  | IID | Variant 1 | Variant 2 | Variant 3 |
  | --- | --- | --- | --- |
  | 33432984732 | 3 | 4 | 3 |
  | 32432809751 | 6 | 8 | 6 |
  
  in which I can see the contribution of each variant to the overall score.
  
  Is this possible with PGS Calculator? If not, is there a tool other than PGS Calculator that I can use? Or should I use my own scripts?
  
  **Tags:** polygenic-risk-score
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-10-07. Score: 0
  
  This would be a hard feature to support natively, because some PRSs have 10 million+ SNPs.
  
  There is a tool that does this, but I don't want to recommend it because it will require debugging their source code upon running, and it is less accurate than what you are using here.
  
  I suggest doing --scorefile "my\_custom\_scores/\*.txt" if you are interested in only a few variants. Add only one score to this file. This may cause some error especially if some of your samples do not have all positions defined.
  
  If you have more variants, there is a way to combine multiple scores in a single scorefile instead of a directory.
  
  
  ---
  
  