Bowtie2 unpaired mode usage
1
0
Entering edit mode
3.1 years ago
Jimpix ▴ 10

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 • 1.2k views
ADD COMMENT
2
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
1
Entering edit mode
3.1 years ago

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.

ADD COMMENT

Login before adding your answer.

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