Question: beginner question BWA program
0
gravatar for reza
2.3 years ago by
reza210
Iran
reza210 wrote:

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?

alignment genome • 1.3k views
ADD COMMENTlink modified 2.2 years ago • written 2.3 years ago by reza210
2
gravatar for Pierre Lindenbaum
2.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum118k wrote:

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 COMMENTlink modified 2.3 years ago • written 2.3 years ago by Pierre Lindenbaum118k

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

ADD REPLYlink written 2.3 years ago by WouterDeCoster37k

thanks a lot Pierre, your answer is complete

ADD REPLYlink written 2.3 years ago by reza210

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

ADD REPLYlink written 2.3 years ago by WouterDeCoster37k
0
gravatar for reza
2.2 years ago by
reza210
Iran
reza210 wrote:

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 COMMENTlink written 2.2 years ago by reza210
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1496 users visited in the last hour