This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bowtie2 unpaired mode usage

Hey! Taking into consideration commands below:

bowtie2 -x Bowtie2Index/hg19 -U R1.fastq, R2.fastq -S bowtie2_unpaired.sam 

and

bowtie2 -x Bowtie2Index/hg19 -U R1.fastq -S bowtie2_unpaired_R1.sam 
bowtie2 -x Bowtie2Index/hg19 -U R2.fastq -S bowtie2_unpaired_R2.sam 

There is any difference between files bowtie2_unpaired.sam and merged by pysam files bowtie2_unpaired_R1.sam and bowtie2_unpaired_R2.sam? Thanks for the answer.

sam bowtie2

Bowtie 2's search for alignments for a given read is "randomized." That is, when Bowtie 2 encounters a set of equally-good choices, it uses a pseudo-random number to choose. For example, if Bowtie 2 discovers a set of 3 equally-good alignments and wants to decide which to report, it picks a pseudo-random integer 0, 1 or 2 and reports the corresponding alignment. Arbitrary choices can crop up at various points during alignment.

Not sure if you set the same --seed for above commands you would get the same alignment for each read in the two operations.

basically what this says is that one would not necessarily get identical BAM files even if they ran Bowtie on the same file.

if --seed is set the same for both runs, Bowtie 2 will produce the same output; i.e., it will align the read to the same place, even if there are multiple equally good alignments

If one sets the same --seed then I was wondering if the results from the two options above will be identical for individual reads. With --non-deterministic option bowtie2 will report different alignments.

1 answer

Merge operates on sorted BAM files. All inputs should be sorted and the outcome is another sorted BAM file.

What you show above is a concatenation operation, the BAM files will follow sequentially.

So in general you would not expect the two operations to produce identical order of the alignments.

Log in to answer this question.