Unmapping Alternative reads
0
0
Entering edit mode
2.3 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.

alignment DNA • 537 views
ADD COMMENT
0
Entering edit mode

there are some technical problems

What kind of problems. It may be easy to solve them.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Have you created an index for the BAM files you downloaded (samtools index, you would likely need to samtools sort before that)? If you use latest samtools then sort --write-index to do this in one step.

ADD REPLY
0
Entering edit mode

yes, I made the index *.bam.bai for the bam file beforehand

ADD REPLY
0
Entering edit mode

Looks like you did not name sort (samtools sort -n) your files before indexing them.

ADD REPLY
0
Entering edit mode

The bam file is already sorted:

samtools view -H HG02082.final.bam |grep "@HD"
@HD     VN:1.5  GO:none SO:coordinate
ADD REPLY
0
Entering edit mode

but you mean that I need to sort it by name, not coordinate, am I right?

ADD REPLY
0
Entering edit mode

Based on the errors you posted in GitHub issue, yes.

ADD REPLY
0
Entering edit mode

I tried sorting it by queryname and index it, but the script still does not work

ADD REPLY

Login before adding your answer.

Traffic: 1233 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6