Answers.Body: <p>You are correct that differences in ploidy between autosomes (always ploidy=2) and X chromosome mean that the same VQSR model cannot be applied to both cases equally.</p>
  <p>However, this is the case only for male X chromosomes (in human species).</p>
  <p>Therefore, yes, I'd recommend building a separate VQSR model when it comes to male X chromosomes. Importantly, the processing has to be different not only at the VQSR step, but from the very beginning at the HaplotypeCaller step (if you are using GATK also for variant calling), which has to be used with the option ploidy = 1.</p>
  <p>So,</p>
  <p>On one hand -&gt; Processing of autosomes (females and males) and x chromosomes (females only) can be done altogether with no differences all the way to VQSR (SNPs + INDELs as in best practices)</p>
  <p>On the other hand -&gt; Processing of X chromosomes (only males) goes in separate, from variant calling to VQSR (SNPs + INDELs as in best practices)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-31T14:10:27.620Z
Answers.Text: If you're going to go for this, do remember that you will need to break up the X chromosome into three sections, as there are two pseudoautosomal regions PAR1 and PAR2 at the beginning and the end. See https://en.wikipedia.org/wiki/Pseudoautosomal_region
Answers.UserDisplayName: winni2k
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-13T07:39:47.297Z
Answers.LastActivityDate: 2021-08-13T07:39:47.297Z
Answers.UserDisplayName: JRodrigoF
Body: <p>According to GATK best practice, it is recommended that different VQSR models be built for SNPs and INDELs, because the annotations for high-quality SNPs and INDELs are systematically different (if I understand it correctly). Since annotations for good variants on autosomes could be different from those on X chromosome, e.g., DP for good variants on X chromosome could be substantially smaller than DP on autosomes due to having large number of male samples, it seems reasonable to build VQSR models separately for X chromosome and autosomes. However, no such advice is proposed on GATK website.</p>
  <p><strong>My question is</strong>:</p>
  <p>Should we build VQSR models separately for autosomes and X chromosome? If yes, we will have 4 VQSR models: Auto SNPs, Auto INDELs, X SNPs and X INDELs.</p>
  <p>Cross-posting: <a href="https://www.biostars.org/p/9483110/" rel="nofollow noreferrer">https://www.biostars.org/p/9483110/</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-09T09:03:31.503Z
Comments.Text: I see no reason to treat different as long as all samples are derived from the same sex in  humans or have the same ploidy generally speaking. I agree males differ in DP values, which are about halved compared to females, and this might impact other covariates, so for X chromosome I would do VQSR on only males, and in separate for only females. But I would not make any distinction between autosomes and X for females,
Comments.UserDisplayName: JRodrigoF
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T01:37:30.977Z
Comments.Text: @JRodrigoF Could you elaborate on your workflow? Since VQSR is a site filtering procedure, once you have joint-called X chromosome with both male and female samples, there is no meaningful way to "separate" them for VQSR.
Comments.UserDisplayName: wdg
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-12T08:08:32.673Z
Comments.Text: From the very beginning of the GATK workflow you have to make a difference between females and males if you ought to be inclusive of the X chromosome. Males have to go through haplotycaller using the argument ploidy = 1 , whereas females can use default value = 2 , ... then from there you already have them in separate , even if you joint call them altogether at the genotypeGVCF level, you always know which of your samples are females and which males, right? So of course you can separate them again into two different multi-sample VCFs using bcftools for instance,
Comments.UserDisplayName: JRodrigoF
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-13T06:48:18.690Z
Comments.Text: @JRodrigoF Thanks for your comment. What I meant in the last comment is that, if I joint call male and female samples together, there will be only one value per site for each site annotation that is considered by VQSR. Even if I separate male from female samples, the site annotations will not change except trivial ones such as AC, AF, etc.. Did you suggest joint calling X chromosomes for males and females separately and combining them after VQSR? If you feel confident about your comments, would you consider converting it to an answer?
Comments.UserDisplayName: wdg
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-13T07:21:41.047Z
Comments.Text: Yes. Essentially boils down to treat X chromosomes from males in separate and from the very beginning, that is at the haplotypecaller step, then you follow by joint calling (genotypeGVCF), then VQSR (SNPs and INDELs) , and only after this merge with the rest of the autosomes from both males and females and with the X chromosomes from females, 
  
  OK. Will turn it into an answer,
Comments.UserDisplayName: JRodrigoF
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-31T14:23:48.897Z
Comments.Text: Have you had a look at the thousand genomes papers? The VQSR was used for that dataset, including on the X chromosome (PAR1, PAR2, and all). The supplementary methods sections are extensive.
Comments.UserDisplayName: winni2k
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-02T01:43:52.900Z
Comments.Text: @winni2k Did you mean the 2015 1000G phase 3 paper? Or newer technical updates to 1000G? (GRCh38 realigned version, high-coverage version, etc.)
Comments.UserDisplayName: wdg
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-02T08:32:36.213Z
Comments.Text: I mean the phase 1 and phase 3 papers from way back ;) VQSR is old. This should not be a new problem :)
Comments.UserDisplayName: winni2k
Tags: <wgs><gatk>
Title: Best practice for running GATK VQSR on X chromosome
ThreadText: # Best practice for running GATK VQSR on X chromosome
  
  (Asked by: username_0 on 2021-08-05)
  
  According to GATK best practice, it is recommended that different VQSR models be built for SNPs and INDELs, because the annotations for high-quality SNPs and INDELs are systematically different (if I understand it correctly). Since annotations for good variants on autosomes could be different from those on X chromosome, e.g., DP for good variants on X chromosome could be substantially smaller than DP on autosomes due to having large number of male samples, it seems reasonable to build VQSR models separately for X chromosome and autosomes. However, no such advice is proposed on GATK website.
  
  **My question is**:
  
  Should we build VQSR models separately for autosomes and X chromosome? If yes, we will have 4 VQSR models: Auto SNPs, Auto INDELs, X SNPs and X INDELs.
  
  Cross-posting: <https://www.biostars.org/p/9483110/>
  
  **Tags:** wgs, gatk
  
  > **Comments:**
  > **username_1**: I see no reason to treat different as long as all samples are derived from the same sex in  humans or have the same ploidy generally speaking. I agree males differ in DP values, which are about halved compared to females, and this might impact other covariates, so for X chromosome I would do VQSR on only males, and in separate for only females. But I would not make any distinction between autosomes and X for females,  
  > **username_0**: @username_1 Could you elaborate on your workflow? Since VQSR is a site filtering procedure, once you have joint-called X chromosome with both male and female samples, there is no meaningful way to "separate" them for VQSR.  
  > **username_1**: From the very beginning of the GATK workflow you have to make a difference between females and males if you ought to be inclusive of the X chromosome. Males have to go through haplotycaller using the argument ploidy = 1 , whereas females can use default value = 2 , ... then from there you already have them in separate , even if you joint call them altogether at the genotypeGVCF level, you always know which of your samples are females and which males, right? So of course you can separate them again into two different multi-sample VCFs using bcftools for instance,  
  > **username_0**: @username_1 Thanks for your comment. What I meant in the last comment is that, if I joint call male and female samples together, there will be only one value per site for each site annotation that is considered by VQSR. Even if I separate male from female samples, the site annotations will not change except trivial ones such as AC, AF, etc.. Did you suggest joint calling X chromosomes for males and females separately and combining them after VQSR? If you feel confident about your comments, would you consider converting it to an answer?  
  > **username_1**: Yes. Essentially boils down to treat X chromosomes from males in separate and from the very beginning, that is at the haplotypecaller step, then you follow by joint calling (genotypeGVCF), then VQSR (SNPs and INDELs) , and only after this merge with the rest of the autosomes from both males and females and with the X chromosomes from females,   OK. Will turn it into an answer,  
  > **username_2**: Have you had a look at the thousand genomes papers? The VQSR was used for that dataset, including on the X chromosome (PAR1, PAR2, and all). The supplementary methods sections are extensive.  
  > **username_0**: @username_2 Did you mean the 2015 1000G phase 3 paper? Or newer technical updates to 1000G? (GRCh38 realigned version, high-coverage version, etc.)  
  > **username_2**: I mean the phase 1 and phase 3 papers from way back ;) VQSR is old. This should not be a new problem :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-13. Score: 2
  
  You are correct that differences in ploidy between autosomes (always ploidy=2) and X chromosome mean that the same VQSR model cannot be applied to both cases equally.
  
  However, this is the case only for male X chromosomes (in human species).
  
  Therefore, yes, I'd recommend building a separate VQSR model when it comes to male X chromosomes. Importantly, the processing has to be different not only at the VQSR step, but from the very beginning at the HaplotypeCaller step (if you are using GATK also for variant calling), which has to be used with the option ploidy = 1.
  
  So,
  
  On one hand -> Processing of autosomes (females and males) and x chromosomes (females only) can be done altogether with no differences all the way to VQSR (SNPs + INDELs as in best practices)
  
  On the other hand -> Processing of X chromosomes (only males) goes in separate, from variant calling to VQSR (SNPs + INDELs as in best practices)
  
  > **Comments:**
  > **username_2**: If you're going to go for this, do remember that you will need to break up the X chromosome into three sections, as there are two pseudoautosomal regions PAR1 and PAR2 at the beginning and the end. See https://en.wikipedia.org/wiki/Pseudoautosomal_region  
  
  ---
  
  