As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [bwa]

bwa (Burrows-Wheeler Aligner) is a software for aligning reads obtained with Next Generation Sequencing.

Filter by
Sorted by
Tagged with
19 votes
2 answers
12k views

Obtaining uniquely mapped reads from BWA mem alignment

This is based on a question from betsy.s.collins on BioStars. The original post can be found here. Does anyone have any suggestions for other tags or filtering steps on BWA-generated BAM files that ...
gringer's user avatar
  • 13k
15 votes
2 answers
12k views

Meaning of BWA-MEM MAPQ scores

Does anyone know what the MAPQ values produced by BWA-MEM mean? I'm looking for something similar to what Keith Bradnam ...
ijoseph's user avatar
  • 253
15 votes
1 answer
4k views

Why is bwa-mem the standard algorithm when using bwa?

The industry standard for aligning short reads seems to be bwa-mem. However, in my tests I have seen that using bwa backtrack (bwa-aln + bwa-sampe + bwa-samse) performs better. It is slightly slower, ...
terdon's user avatar
  • 9,352
14 votes
1 answer
4k views

How does the BWA-MEM algorithm assign its mapping qualities?

Is there any resource (paper, blogpost, Github gist, etc.) describing the BWA-MEM algorithm for assigning mapping qualities? I vaguely remember that I have somewhere seen a formula for SE reads, which ...
Karel Břinda's user avatar
13 votes
4 answers
605 views

Library for computing BWT-based alignments

I am writing a software tool to which I would like to add the ability to compute alignments using the efficient Burrows-Wheeler Transform (BWT) approach made popular by tools such as BWA and Bowtie. ...
Daniel Standage's user avatar
12 votes
2 answers
3k views

Difference between BWA-backtrack and BWA-MEM

Many of my colleagues recommend I use BWA-MEM instead of regular old BWA. The problem is I don't understand why and reading the BWA man page doesn't seem to help the matter. What is the difference ...
David Ross's user avatar
8 votes
2 answers
1k views

What is mate rescue in bwa mem?

BWA mem has the -S and -P tags for skip mate rescue and skip pairing; mate rescue performed unless -S also in use. What do ...
juniper-'s user avatar
  • 890
8 votes
1 answer
3k views

What are all the reference files produced by bwa index, and are these dependent upon whether the reference is zipped?

I have indexed a gzipped reference with bwa: bwa index reference.fa.gz, which produces a series of other files ...
mattm's user avatar
  • 744
7 votes
2 answers
2k views

What is the correct way to map Hi-C data with bwa mem?

Library Prep I have a Hi-C library prepped using an enzyme that cuts at GATC, so it leaves GATCGATC as the junction sequences. ...
conchoecia's user avatar
  • 3,111
7 votes
1 answer
303 views

Sequence alignment using BWT

My Problem: Skipping some specific background, what I want to do is judging whether some soft-clipping sequences are the same, which may result by the same SV event. Colored bases in Fig.1 is an ...
CodeUnsolved's user avatar
6 votes
1 answer
581 views

Why most aligners do not output the "X" CIGAR operation?

As I read the SAM spec, the "X" CIGAR operator represents a mismatch. This seems useful as we can know where are the mismatches without looking at the reference genome. However, many popular aligners ...
medbe's user avatar
  • 777
6 votes
1 answer
3k views

Is there a more elegant solution to the bwa-mem: paired reads have different names error?

I'm currently trying to run bwa-mem on Influenza substrains using the following command: ~/bwa mem h5n1_1_cons.fa h5n1_1_read1.fq h5n1_1_read2.fq h5n1_1_cons.fa ...
sgav's user avatar
  • 63
5 votes
1 answer
635 views

How to output all sequences with bwa mem, not `*`?

I've been running bwa mem -a for alignment, using the -a flag---this will output all alignments for SE or unpaired PE I've ...
EB2127's user avatar
  • 1,373
5 votes
1 answer
229 views

Do you use SNAP for short-read mapping?

I am calling SNPs from WGS samples produced at my lab. I am currently using bwa-mem for mapping Illumina reads as it is recommended by GATK best practice. However, bwa is a bit slow. I heard from my ...
medbe's user avatar
  • 777
5 votes
1 answer
2k views

Estimating BAM file from compressed fastq file size

Is there a way to estimate the size of a BAM file will have after mapping with BWA? The input file are two mates fastq files, compressed with gzip, each one about 70G.
gc5's user avatar
  • 1,773
5 votes
2 answers
741 views

Interpreting 0x200 flag in bwa-mem alignments

I am looking at the bwamem.h code in http://github.com/lh3/bwa and found that BWA-MEM will give flag 0x200 to what it calls ...
719016's user avatar
  • 2,274
4 votes
2 answers
235 views

What is the meaning of the "*" character in bwa fastmap's output?

I am mapping kmers back to a few bacterial genomes using bwa fastmap: ...
mgalardini's user avatar
4 votes
2 answers
113 views

How does Li and Durbin's BWA paper compare alignment programs on real data?

Li and Durbin's "Fast and accurate short read alignment with burrows-whleeler transform" found here, says: We evaluate the performance of BWA on ... real paired-end data by checking the fraction ...
5r9n's user avatar
  • 87
4 votes
1 answer
333 views

BWA mem | samtools view: Intermittent parsing error

Update The issue was that bwa was running out of memory and failing, but that error wasn't floating to the top (see @Steve's answer, below). I was getting an error ...
Mark Ebbert's user avatar
  • 1,274
4 votes
2 answers
685 views

Problems to Extract uniquely mapping reads from BWA MEM alignment

I did a mapping of genomic paired-end reads to a reference assembly using bwa mem. I need to extract the reads that mapped only once to my reference. For that, I have tried to follow the method ...
Marvin's user avatar
  • 41
3 votes
2 answers
411 views

How to read .bwt file .sa file?

In BWA project in bwt.c file I found bwt_dump_bwt method and bwt_dump_sa method. I want to use them to read .bwt file and .sa file. I wrote the following program: ...
Mariam's user avatar
  • 175
3 votes
2 answers
374 views

How to map reads shorter than 32bp with minimap2?

I mapped fasta sequences to a reference. The fasta sequences range in length from 17bp up to several hundred bp. I used minimap2 with the following command: ...
conchoecia's user avatar
  • 3,111
3 votes
2 answers
98 views

What can be the bias of aligning paired-reads in a single-end mode?

I don't know if I'm in the right place but I have a technical problem to fix. I would have to align paired-end reads from Illumina sequencing to compare a normal genome with a tumor one. When I align ...
cucalorda's user avatar
3 votes
1 answer
190 views

Determining Read Groups

Which Read Groups are correct: ...
user977828's user avatar
2 votes
2 answers
2k views

Error with BWA Mem input having multiple fastq files using cat and process substitution

Running BWA Mem on a number of paired end fastq files using process substitution on the inputs results in this error: ...
111's user avatar
  • 195
2 votes
1 answer
1k views

How to extract unmatched reads using bwa and samtools?

I have a single read (NOT paired) that I need to pass through the workflow described in Beauclair et al. paper (free version here https://rnajournal.cshlp.org/content/24/10/1285.long) for identifying ...
Dmitrii Trubetskoy's user avatar
2 votes
2 answers
118 views

BWA-mem and sambamba read group line error

this question has been asked [and answered] on Stack Overflow This is a two-part question: help interpreting an error; help with coding. I'm trying to run bwa-mem ...
Gustavo de Miranda's user avatar
2 votes
1 answer
186 views

How does split reads look like in sam files?

I used bwa mem to align the DNA with the reference genome. If there are split reads (chimeric reads, come from two different parts of the genome), will it be split into two lines rather than one line?
Wang Ming's user avatar
  • 101
2 votes
1 answer
306 views

Generating burrows-wheeler-transform and a suffix array of a DNA sequence with less memory

Also posted on biostars After indexing bwa index -a bwtsw reference.fa I got files. like .bwt file and .sa file. The naive way of generating these file is:   ...
Mariam's user avatar
  • 175
2 votes
1 answer
208 views

Minimap2 -ax map-pb doesn't output tlen field

I have used minimap2 to map some pacbio reads to a reference genome. I would like to know the "insert size" (true length of sequence) relative to the reference. More specifically, I want to know the ...
conchoecia's user avatar
  • 3,111
2 votes
1 answer
260 views

How to take into account alternative bwa mem mapping when computing coverage

when mapping short reads with bwa mem, if a read has alternative mapping positions they are reported by bwa mem in the X0 and XA tags. Now, let's say I want to compute the coverage of my bam file. ...
Alessandro's user avatar
2 votes
1 answer
486 views

Mark BWA-SW split alignments in output for long reads

Is there a way to remove split alignments of single-end long reads from BWA-SW output? BWA-MEM has an option to include or flag split alignments in the result, but it seems BWA-SW method include them ...
Mehrdad Bakhtiari's user avatar
1 vote
2 answers
559 views

How BWA generate index files?

I need to know how BWA generate bw and sa in less memory usage. I didn't find details in the original paper. Do they save all rotations temporary ? I need to know do BWA stores all rotations so that ...
Mariam's user avatar
  • 175
1 vote
2 answers
113 views

BWA doesn't recognize HiC options

I'm trying to run bwa on HiC data. This is the command I'm giving: bwa mem -5SP -T0 -t4 -R '@RG\tID:\tSM:\tLB:\tPL:ILLUMINA\tPU:none' REFERENCE.fa PAIR1.fq PAIR2.fq ...
Jeff's user avatar
  • 177
1 vote
2 answers
530 views

Trying to create a .bam file without the need for a .sam file

I'm trying to use the code specified in this link to create a .bam file without the need for a .sam file. Here is the code I'm using: ...
Connor's user avatar
  • 55
1 vote
3 answers
95 views

Is BWT based aligner suitable for any types of alignment task?

Burrows wheeler transformation based aligner like BWA or bowtie seems a standard alignment tool used many area. I was just wondering if there is a kind of alignment task in which BWT algorithm is not ...
Yiqing's user avatar
  • 11
1 vote
1 answer
6k views

Samtools Index: Chromosome Blocks not Continuous

I am working with short-read whole-genome sequences from the NCBI's SRA. I have aligned and sorted all of my short-read sequences and am attempting to index each sequence into .bai format using ...
annabelperry's user avatar
1 vote
1 answer
62 views

BWA: Detecting Variation between Reference Genome and Short-Read Sequences

I need to identify all loci in the short-read sequence at which the number of microsatellite repeats (i.e. number of copies of "AA," "GTC," etc.) differ from the reference genome, ...
annabelperry's user avatar
1 vote
1 answer
259 views

Compare mapped reads from BWA -MEM and STAR from .bam files

I want to find and compare the results from STAR and BWA- MEM mapped. I have 150bp paired end reads in sorted.bam files in each case and i want to find in each case uniquely mapped reads, number of ...
user3683485's user avatar
1 vote
1 answer
267 views

How fo force nextflow to repeat a process until all values in a particular channels are used up BUT a single value from another channel is needed

I am trying to find a hack for getting a process to run until all emissions in a channel are used up. The problem is that the process also takes as input a second channel that only has a single ...
jh_'s user avatar
  • 31
1 vote
1 answer
167 views

Why does BWA MEM orientation contradict my library prep method

I have some RNA-seq data from a stranded paired end library prep, with dUTP and UDG preparation, so the orientation should be RF (confirmed with sequencing provider). I assembled the reads with ...
NatWH's user avatar
  • 347
1 vote
1 answer
323 views

No MQ tags in VCF files

To call minority variants in my Mtb sequences I'm using a pipeline of ...
pgcudahy's user avatar
  • 152
1 vote
2 answers
136 views

Slow bwa shm "preloading" into memory

Coming from devops background, working on automating usual genomics pipelines, I am benchmarking existing pipelines in order to choose cloud resources properly. Past week most of work was on testing <...
titus's user avatar
  • 131
1 vote
1 answer
152 views

How can I get unmatched reads for defective genomes analysis using bwa and samtools?

I am trying to follow the Beauclair et al. paper (free version here https://rnajournal.cshlp.org/content/24/10/1285.long) for identifying defective genomes using their DI-tector program. According to ...
Dmitrii Trubetskoy's user avatar
1 vote
1 answer
142 views

How to map multiple CDS sequences to exome data using bwa mem?

Normally, I use bwa-mem to map my fastq reads for a bunch of species using one protein-coding gene CDS from my reference species. This was fine when I had to try it for just a group of genes...I would ...
CuriousDude's user avatar
1 vote
0 answers
55 views

bwt suffix array construction

I found a very good link to generate bwt suffix array in BW based tools. @user172818 provides a nice code. could anyone tell me how to store SA elements' original position in the original string?
jay's user avatar
  • 11
0 votes
2 answers
66 views

Variant calling for a subset of genes using whole gneome sequencing data

I have few 100 raw fastq files from whole-genome sequencing data and I would like to map these files to a set of genes only (and not whole genome) so as to find SNP's associated with them. Can anyone ...
user3138373's user avatar
0 votes
1 answer
2k views

samtools view: writing to standard output failed: Broken pipe

I have the following alignment script which uses BWA: ...
user977828's user avatar
0 votes
1 answer
43 views

Can bwameth accept unaligned Bam?

Does bwameth accept bam (unaligned) type as input or I will have to convert unaligned bam to fastq (samtools fastq bam) to use ...
aerijman's user avatar
  • 585
0 votes
2 answers
453 views

Proper use of BWA MEM on multiplexed GBS sample

I have a multiplexed lane of GBS sequencing reads as a fastq file. I understand the first step is to demultiplex and trim the adapter sequences from the reads. This yields many individual fastq files ...
PlantGeek519's user avatar