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, 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

  • $\begingroup$ 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 $\endgroup$ – StupidWolf Apr 9 '20 at 9:41
  • $\begingroup$ 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 $\endgroup$ – StupidWolf Apr 9 '20 at 9:43
  • $\begingroup$ 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. $\endgroup$ – Thanh Nguyen Apr 9 '20 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.