Question: Unmapping Alternative reads
0
gravatar for godth13teen
7 weeks ago by
godth13teen10
godth13teen10 wrote:

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.

dna alignment • 102 views
ADD COMMENTlink written 7 weeks ago by godth13teen10

there are some technical problems

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

ADD REPLYlink written 7 weeks ago by genomax83k

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 REPLYlink written 7 weeks ago by godth13teen10

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 REPLYlink modified 7 weeks ago • written 7 weeks ago by genomax83k

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

ADD REPLYlink written 7 weeks ago by godth13teen10

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

ADD REPLYlink modified 7 weeks ago • written 7 weeks ago by genomax83k

The bam file is already sorted:

samtools view -H HG02082.final.bam |grep "@HD"
@HD     VN:1.5  GO:none SO:coordinate
ADD REPLYlink written 7 weeks ago by godth13teen10

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

ADD REPLYlink written 7 weeks ago by godth13teen10

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

ADD REPLYlink written 7 weeks ago by genomax83k

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

ADD REPLYlink written 7 weeks ago by godth13teen10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1224 users visited in the last hour