This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can I bulid a new reference for bwa ?

Hi, I wanna use a specified gene sequence to build a reference , and then mapp PE fastq files (fq1,fq2) to this new reference gene genome via BWA .

that's just a thought ,I do not konw it's availble ? if availble, which algorthims should I choose from BWA ??

BEST

genome alignment gene

2 answers

HI winter_li, Here's how you can create a custom reference genome:

  1. Make a tab delimited CSV file where the first column is chr<chromosome number=""> (chr6 for example), the second is the start position and third is the end position.

  2. Rename as .bed file.

  3. Use BED tools with the following command:

bedtools getfasta -fi (complete reference fasta file).fa -bed (bed file).bed -fo (custom reference fasta file).fa.out

  • ^ You can leave out the .out.

FInally, you index the new file using bwa.

You're welcome! if it worked out for you, please consider accepting my answer by pressing the "V" (accept) button next to my post, it might help others in the future to easily find the solution they were looking for. Good luck!

Read the Manual - First Command in the synopsis is building an index.

Hi, I mean I do not use the complete human genome as a reference ,I use a gene sequence as a reference ,It's available ?

Yes, that's fine too.

Log in to answer this question.