This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Creating custom ALT references for BWA

I am looking for a guide on how to produce custom ALT references for BWA. Maybe I am missing something, but I can't find anything on google. I am working on a segmentally duplicated region of hg38 in which there are haplotypes I have established to be significantly different than the reference. I want to test my haplotypes by mapping reads to custom references.

How can I create a BWA reference with ALT haplotypes?

bwa

1 answer

I am not completely sure of this, but try to name the alternative contig the way alternative contigs are named in the fasta file of GRCh38. I think BWA will notice it is an alternative contig.

E.g.:

chr2_GL383521v1_alt AC:GL383521.1 gi:302201750 LN:143390 rg:chr2:36225959-36363315 rl:alt-scaffold M5:8c6f0a214ddbfbd52be574a566e4b21a AS:GRCh38

I tried producing a FASTA with the format ${chrname}_alt and generating a BWA index. BWA did not recognize the alts.

If you look at the bwakit readme, and in particular the file list, he mentions having ALT alignments. There also appears to be an additional index file in ALT indicies.

https://github.com/lh3/bwa/tree/master/bwakit

I see. In run-gen-ref (bwakit) it says: Usage: /Users/fa8/bwa-0.7.12/bwakit/run-gen-ref <hs38|hs38a|hs38dh|hs37|hs37d5> Analysis sets: hs38 primary assembly of GRCh38 (incl. chromosomes, unplaced and unlocalized contigs) and EBV hs38a hs38 plus ALT contigs hs38DH hs38a plus decoy contigs and HLA genes (recommended for GRCh38 mapping) hs37 primary assembly of GRCh37 (used by 1000g phase 1) plus the EBV genome hs37d5 hs37 plus decoy contigs (used by 1000g phase 3)

Note: This script downloads human reference genomes. For hs38a and hs38DH, it needs additional sequences and ALT-to-REF mapping included in the bwa.kit package.

It seems the mappings are part of BWAkit... It looks it may be trickier. Sorry for not being of much help In case you don't find the answer, you may try the BWA list: bio-bwa-help@lists.sourceforge.net

Log in to answer this question.