beginner question BWA program
2
0
Entering edit mode
7.9 years ago
reza ▴ 300

hi

i want to map my own reads (illumina hiseq) to reference using "bwa mem". i have 2 lane of paired end data (read1.fastq, read2.fastq, read11.fastq and read22.fastq). in bwa tutorial, command for map to reference of paired end reads is "bwa mem ref.fa read1.fq read2.fq > aln-pe.sam". now i have 4 read files for mapping to reference, what is command for my reads?

"bwa mem ref.fa read1.fq read2.fq read11.fq read22.fq> aln-pe.sam" is true?

genome alignment • 3.8k views
ADD COMMENT
2
Entering edit mode
7.9 years ago

your choice is:

1) merge the forward and the reverse fastq files

cat read1.fq read11.fq > R1.fq
cat read2.fq read22.fq > R2.fq
bwa mem ref.fa R1.fq R2.fq> aln-pe.sam

or

bwa mem ref.fa <(cat read1.fq read11.fq ) <( cat read2.fq read22.fq ) > aln-pe.sam

2) align both pairs

bwa mem ref.fa R1.fq R2.fq | samtools sort -T tmp -O bam -o f1.bam -
bwa mem ref.fa R11.fq R22.fq | samtools sort -T tmp -O bam -o f2.bam -

and then merge the sorted pairs.

samtools merge merged.bam f1.bam f2.bam
ADD COMMENT
0
Entering edit mode

-O is unnecessary when -o is specified because the extension will be used to determine the out-type.

ADD REPLY
0
Entering edit mode

thanks a lot Pierre, your answer is complete

ADD REPLY
0
Entering edit mode

If he answered your question, then accept his answer as the solution.

ADD REPLY
0
Entering edit mode
7.9 years ago
reza ▴ 300

hi again dear Pierre

After mapping to reference using "bwa mem", downstream analysis in my project are variant calling using samtools and CNV detection using CNV-seq. In your opinion, default setting in bwa is proper for my goal? i must use -M in "bwa mem" (after mapping i want to mark duplicates via Picard) ?

thanks in advance for your kindly helps

ADD COMMENT

Login before adding your answer.

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