This is a test version of Biostars. For the public version, visit https://www.biostars.org.
combining fasta files

I have downloaded the assembly fasta files for all chromosomes for an organism from NCBI. Now I want to map my unique data (WGS) to the genome. How to combine the chromosome-wise fasta files to give a fasta file for the whole genome? This needs to be done to run BWA, right?

alignment

Thanks a lot. That was useful.

How to combine the chromosome-wise fasta files to give a fasta file for the whole genome? what was the answer to this question?

This question has been asked multiple times. You can simply do cat chr*.fa > genome.fa. (replace chr* with whatever names you have). If the names follow no pattern then do cat file1.fa file2.fa ... file_last.fa > genome.fa.

genomax posted the command you would use in your command line.

I m using Windows 10, where i have to put these commands?

Do you have Ubuntu bash for Windows 10 installed? Otherwise you may be able to do copy file1 file2 > final in a windows command prompt. You can't get much done with plain Windows 10 in terms of NGS data analysis (unless you use one of the commercial software packages).

1 answer

cat *.fa > genome.fa

You'll need to index that with bwa or whatever aligner you plan to use then.

As far as I remember bwa index -p myindex *.fa would also work.

Log in to answer this question.