Entering edit mode
4.7 years ago
godth13teen
▴
70
Hi, 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 unmap those alternative reads, I tried this script https://github.com/humanlongevity/HLA/blob/master/bin/get-reads-alt-unmap.sh, but there are some technical problems, so I want to know is there any other way or tools to do this task?
Thank you very much.
What kind of problems. It may be easy to solve them.
Hi,
I made a github issue in here: https://github.com/humanlongevity/HLA/issues/51
In short, there's an [E::bwa_idx_load_from_disk] fail to locate the index files error, and the script output nothing
Have you created an index for the BAM files you downloaded (
samtools index
, you would likely need tosamtools sort
before that)? If you use latestsamtools
thensort --write-index
to do this in one step.yes, I made the index *.bam.bai for the bam file beforehand
Looks like you did not name sort (
samtools sort -n
) your files before indexing them.The bam file is already sorted:
but you mean that I need to sort it by name, not coordinate, am I right?
Based on the errors you posted in GitHub issue, yes.
I tried sorting it by queryname and index it, but the script still does not work