What's the correct way to map to hg38 with alternative contigs?
1
1
Entering edit mode
13 months ago
PeterWu ▴ 20

I'm trying to do mapping to hg38. And I'm a bit confused how to handle alternative (random, fix, ...) contigs. From documents of bwa seemingly there is a proposed way (https://github.com/lh3/bwa/blob/master/README-alt.md), but there are some obstructions.

1.If you use hg38 directly (I download from https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/latest/hg38.fa.gz). The log from bwa shows

[M::bwa_idx_load_from_disk] read 0 ALT contigs

which indicates that bwa do not identify alternative contigs.

2.follow instructions from bwakit(https://github.com/lh3/bwa/tree/master/bwakit), those hadn't been updated since 2014, and some links becames invalid. I'm not sure if simply change links would work correctly.

So are there a proposed way to perform alt-aware mapping? Thanks a lot

NGS bwa • 1.5k views
ADD COMMENT
0
Entering edit mode

Sorry I can't add apply or comment, I have to answer myself. Here's a method to open the ALT-aware mode for bwa, and the result looks good for me.

In the same path of your reference, say hg38.fa do:

grep 'alt' hg38.fa | sed 's/>//g' > hg38.fa.alt

the log shows

[M::bwa_idx_load_from_disk] read 333 ALT contigs
ADD REPLY
3
Entering edit mode

You may want to verify that alt aware mapping is working. You seem to be simply removing the fasta headers with word alt in them. What is likely messing up the sequence.

ADD REPLY
1
Entering edit mode
13 months ago

As far as I know, bwa mem is the only alt-aware aligner. Details are here:

https://github.com/lh3/bwa/blob/master/README-alt.md

Your approach is only messing up the headers of the alt contigs. Don't do that. If you want to pick another human genome version to align to consider this doc carefully:

https://lh3.github.io/2017/11/13/which-human-reference-genome-to-use

ADD COMMENT

Login before adding your answer.

Traffic: 1882 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