Aligning Reads To Specific Chromosome Using Bwa
3
3
Entering edit mode
11.2 years ago
KS ▴ 380

Hello Everyone,

I have whole genome illumina paired end reads and I want to align my reads to specific chromosome (chr 21) using BWA.

I was thinking of aligning the entire reads to fasta file of the human chromosome 21. Is this the appropriate way to solve my problem or is there any specific command for BWA to solve this.

Any kind of help is appreciated

Thanks Suz

bwa paired-end • 9.9k views
ADD COMMENT
8
Entering edit mode
11.2 years ago

Are you sure this is actually what you want to do? If you align reads from the whole genome to only chromosome 21, you will get false alignments.

There are many regions with high similarity in the genome. For the purposes of illustration, let's imagine small regions on chromosome 1 and chromosome 21 that differ only by two base pairs. If you align only to chromosome 21, reads drawn from chromosome 1 will get matched up with their best alignment, which will be the highly similar region on chromosome 21. If you aligned against the whole genome, though, they would find a better (and correct) match on chr1. Thus, in many cases, it makes sense to align to the whole genome first, then subset out your chromosome 21 reads from the alignment file.

If aligning to chr21 is really what you want to do, you should follow the instructions given by Sangwoo Kim - just create a new BWA index using only the chromosome 21 fasta.

ADD COMMENT
3
Entering edit mode
11.2 years ago
Sangwoo Kim ▴ 420

You can do this simply by giving a specific chromosome instead the whole genome assembly as a reference fasta. For example, you can download an individual human reference at http://hgdownload.soe.ucsc.edu/goldenPath/hg19/chromosomes/ Please check the reference version is right.

And you can proceed like this.

bwa aln chr21.fa your_read.fastq > your_read.sai
bwa samse chr21.fa your_read.sai your_read.fastq > yours.sam

As the above answer commented, you might need to index it differently if the chromosome is very short. But even the shortest human chromosome is still larger than 10MB, I think the bwtsw algorithm should work. (except the mitochondrial chromosome or other short unassembled contigs)

bwa index -a bwtsw chr21.fa
ADD COMMENT
1
Entering edit mode
11.2 years ago
fo3c ▴ 450

As far as I know there is no way to tell bwa to use a specific chromosome as reference. I would thus bwa index chromosome 21 with an appropriate algorithm (very small "genome") and align against it.

ADD COMMENT

Login before adding your answer.

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