<p>I want to do some HLA typing, most of the tools require the bam file is aligned to primary genome without alternative read handling. From the International Genome Sample Resource project, I can get the high coverage file, but they are all aligned to primary genome with hla, decoy and alternative reads. I want to make the alternative reads into unmapped reads.</p>

<p>I think about unmapping the whole file to fastq, and then realigning according to different assembly, but it's time-consuming and also costs a lot of storage, so I don't want to follow that approach.</p>

<p>I also tried <a href="https://github.com/humanlongevity/HLA/blob/master/bin/get-reads-alt-unmap.sh" rel="nofollow noreferrer">this script</a>, but so far it's not working (I have all requirement packages installed).</p>

<p>Any help, tool or insight for this problem is warmly welcome. </p>

<p>Thank you</p>

CC BY-SA 4.0
2020-04-09T09:41:47.250Z
hmmm are you familiar with samtools? you can convert unmapped reads on the fly (on the console) and then remap it and output a bam file
StupidWolf
CC BY-SA 4.0
2020-04-09T09:43:07.483Z
the only thing i am not sure about where do your HLA reads go in the genome, if they are multimapping or you know that they map to a specific location, you can also do something similar to above
StupidWolf
CC BY-SA 4.0
2020-04-09T10:17:34.427Z
thank you for your comment. I'm not so familiar with samtools, actually, any answer for me is valuable. For the HLA allele, I use package like optitype and kourami, they can handle it if I can give them the correct input.
Thanh Nguyen
<phylogenetics>
Unmapping Alternative reads in BAM file
# Unmapping Alternative reads in BAM file

(Asked by: username_0 on 2020-04-09)

I want to do some HLA typing, most of the tools require the bam file is aligned to primary genome without alternative read handling. From the International Genome Sample Resource project, I can get the high coverage file, but they are all aligned to primary genome with hla, decoy and alternative reads. I want to make the alternative reads into unmapped reads.

I think about unmapping the whole file to fastq, and then realigning according to different assembly, but it's time-consuming and also costs a lot of storage, so I don't want to follow that approach.

I also tried [this script](https://github.com/humanlongevity/HLA/blob/master/bin/get-reads-alt-unmap.sh), but so far it's not working (I have all requirement packages installed).

Any help, tool or insight for this problem is warmly welcome.

Thank you

**Tags:** phylogenetics
> **Comments:**
> **username_1**: hmmm are you familiar with samtools? you can convert unmapped reads on the fly (on the console) and then remap it and output a bam file  
> **username_1**: the only thing i am not sure about where do your HLA reads go in the genome, if they are multimapping or you know that they map to a specific location, you can also do something similar to above  
> **username_0**: thank you for your comment. I'm not so familiar with samtools, actually, any answer for me is valuable. For the HLA allele, I use package like optitype and kourami, they can handle it if I can give them the correct input.  

---

## 0 answers

