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
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:
the log shows
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.