Answers.Body: <p>I believe you may be able to map your reads, but I don't know how to do that with minimap2. </p>
  
  <p>I recommend running gsnap, which is more SNP tolerant and provides a number of parameters which are likely to help.</p>
  
  <p>For instance, I believe that most aligners will treat 'N' characters as mismatches when you align. GSNAP has parameters to account for this. </p>
  
  <pre><code>--query-unk-mismatch=INT       Whether to count unknown (N) characters in the query as a mismatch
                                 (0=no (default), 1=yes)
  --genome-unk-mismatch=INT      Whether to count unknown (N) characters in the genome as a mismatch
                                 (0=no, 1=yes (default))
  </code></pre>
  
  <p>It also has a mismatch parameter similar to the one you described for minimap2.</p>
  
  <pre><code>-m, --max-mismatches=FLOAT     Maximum number of mismatches allowed
  </code></pre>
  
  <p>Try running with the 'genome-unk-mismatch' parameter above (with the masked reference). That may be your best bet. There are also other parameters that may help, but this should be a good start.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T14:15:12.180Z
Answers.LastActivityDate: 2019-02-19T14:15:12.180Z
Answers.UserDisplayName: LucasBoatwright
Body: <p>I have short (67bp) Hi-C reads from a highly heterozygous organism (~15% between-haplotype SNP divergence) and I have both reference haplotypes.</p>
  
  <p>I wanted to try and compare different haplotyping softwares for Hi-C reads using these reads as benchmarking dataset. When mapping the reads separately to each haplotype, I get good mapping statistics. When I map the reads to a single haplotype with all the heterozygous SNPs masked (into N's), I get  very poor mapping rates.</p>
  
  <p>I would like to be able to map the reads when the real haplotypes are unknown (reference is a mix of haplotypes).</p>
  
  <p>I use minimap2 to map the reads with the sr preset. I tried decreasing the mismatch penalty (-B) to 1 and increasing the --score-N value, but this had no effect.</p>
  
  <p>As shown in the attached IGV screenshot, coverage drops to 0 when the SNP density increases.<a href="https://i.sstatic.net/ycZ4G.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ycZ4G.png" alt="enter image description here"></a>
  Is it feasible to map reads with such a high heterozygosity on a single (masked) reference ? Should I use another tool ?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-13T15:16:29.583Z
Comments.Text: Could you describe your reads a bit more? DNA/mRNA? SE/PE? 50bp/100bp/etc? If I were to make a guess, I'd say you're having issues with properly seeding your reads for alignment. Also, it might be helpful to know why you need to map masked reads when mapping separately works fine.
Comments.UserDisplayName: LucasBoatwright
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-19T09:16:47.470Z
Comments.Text: Thanks for the feedback ! I updated the question to add more background and infos.
Comments.UserDisplayName: cmdoret
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-19T10:10:18.377Z
Comments.Text: Just to confirm it is heterozygous and not highly repetitive?
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-19T10:13:09.013Z
Comments.Text: Yup, just highly heterozygous, it is a hybrid yeast
Comments.UserDisplayName: cmdoret
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-20T10:50:49.083Z
Comments.Text: With this levels of heterozygosity you can just assemble everything and get the haplotypes separated. I am not sure if this is an optimal benchmarking dataset.
Comments.UserDisplayName: Kamil S Jaron
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-21T11:31:55.023Z
Comments.Text: You're right, I'll be using another dataset for this, but I was still curious about the feasibility :)
Comments.UserDisplayName: cmdoret
Tags: <read-mapping><haplotypes>
Title: Highly heterozygous reads mapping
ThreadText: # Highly heterozygous reads mapping
  
  (Asked by: username_0 on 2019-01-10)
  
  I have short (67bp) Hi-C reads from a highly heterozygous organism (~15% between-haplotype SNP divergence) and I have both reference haplotypes.
  
  I wanted to try and compare different haplotyping softwares for Hi-C reads using these reads as benchmarking dataset. When mapping the reads separately to each haplotype, I get good mapping statistics. When I map the reads to a single haplotype with all the heterozygous SNPs masked (into N's), I get very poor mapping rates.
  
  I would like to be able to map the reads when the real haplotypes are unknown (reference is a mix of haplotypes).
  
  I use minimap2 to map the reads with the sr preset. I tried decreasing the mismatch penalty (-B) to 1 and increasing the --score-N value, but this had no effect.
  
  As shown in the attached IGV screenshot, coverage drops to 0 when the SNP density increases.[![enter image description here](https://i.sstatic.net/ycZ4G.png)](https://i.sstatic.net/ycZ4G.png)
  Is it feasible to map reads with such a high heterozygosity on a single (masked) reference ? Should I use another tool ?
  
  **Tags:** read-mapping, haplotypes
  
  > **Comments:**
  > **username_1**: Could you describe your reads a bit more? DNA/mRNA? SE/PE? 50bp/100bp/etc? If I were to make a guess, I'd say you're having issues with properly seeding your reads for alignment. Also, it might be helpful to know why you need to map masked reads when mapping separately works fine.  
  > **username_0**: Thanks for the feedback ! I updated the question to add more background and infos.  
  > **username_2**: Just to confirm it is heterozygous and not highly repetitive?  
  > **username_0**: Yup, just highly heterozygous, it is a hybrid yeast  
  > **username_3**: With this levels of heterozygosity you can just assemble everything and get the haplotypes separated. I am not sure if this is an optimal benchmarking dataset.  
  > **username_0**: You're right, I'll be using another dataset for this, but I was still curious about the feasibility :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-02-19. Score: 4 | Accepted answer
  
  I believe you may be able to map your reads, but I don't know how to do that with minimap2.
  
  I recommend running gsnap, which is more SNP tolerant and provides a number of parameters which are likely to help.
  
  For instance, I believe that most aligners will treat 'N' characters as mismatches when you align. GSNAP has parameters to account for this.
  
  ```
  --query-unk-mismatch=INT       Whether to count unknown (N) characters in the query as a mismatch
                                 (0=no (default), 1=yes)
  --genome-unk-mismatch=INT      Whether to count unknown (N) characters in the genome as a mismatch
                                 (0=no, 1=yes (default))
  
  ```
  
  It also has a mismatch parameter similar to the one you described for minimap2.
  
  ```
  -m, --max-mismatches=FLOAT     Maximum number of mismatches allowed
  
  ```
  
  Try running with the 'genome-unk-mismatch' parameter above (with the masked reference). That may be your best bet. There are also other parameters that may help, but this should be a good start.
  
  
  ---
  
  