Question: Align paired and unpaired reads simultaneously using Bowtie2?
0
gravatar for xiaozhongzhiping
9 months ago by
xiaozhongzhiping0 wrote:

I have a MeatG library, which was sequenced by two times. The first time, we got unpaired reads (i.e., unpaired.fastq); while we got interlaced forward and reverse paired-end reads (i.e., interlaced-paired.fastq) for the 2nd time. Since they are from the same library, I assembled them together and got the assembled scaffolds. Now I would like to align both of them (unpaired and interlaced paired reads) simultaneously to the assembled contigs using Bowtie2 version 2.3.4.1 to get one .sam file. Can Bowtie2 do this? Any suggestions are appreciated!

I tried the following two scripts, the results for both were same. So for the first script, only the paired reads are mapped.

bowtie2 -q --phred33 --end-to-end --sensitive -p 12 -I 0 -X 2000 --no-unal -x bowtie2-db/CBIW --interleaved interlaced-paired.fastq -U unpaired.fastq | samtools view -Sb - > output.bam

bowtie2 -q --phred33 --end-to-end --sensitive -p 12 -I 0 -X 2000 --no-unal -x bowtie2-db/CBIW --interleaved interlaced-paired.fastq | samtools view -Sb - > output.bam

See the align result:

Building a SMALL index

35388893 reads; of these:

  35388893 (100.00%) were paired; of these:

11580370 (32.72%) aligned concordantly 0 times

23621928 (66.75%) aligned concordantly exactly 1 time

186595 (0.53%) aligned concordantly >1 times

11580370 pairs aligned concordantly 0 times; of these:

    101972 (0.88%) aligned discordantly 1 time

    11478398 pairs aligned 0 times concordantly or discordantly; of these:

        22956796 mates make up the pairs; of these:

            22513992 (98.07%) aligned 0 times

            432094 (1.88%) aligned exactly 1 time

            10710 (0.05%) aligned >1 times

68.19% overall alignment rate
alignment • 1.1k views
ADD COMMENTlink modified 3 months ago by joneill4x40 • written 9 months ago by xiaozhongzhiping0
2
gravatar for h.mon
9 months ago by
h.mon26k
Brazil
h.mon26k wrote:

I don't think Bowtie2 can map paired- and single-end reads simultaneously, but you can merge both mappings with samtools. BWA can map map a mix of interleaved paired reads and single reads, if you concatenate both files and keep single reads at the end.

Use samtools sort to sort each bam by position, then samtools merge to merge the sorted bams into one.

If having a sorted bam is not important, you can just use samtools cat.

ADD COMMENTlink modified 9 months ago • written 9 months ago by h.mon26k

Thanks. I followed your suggestions using samtools sort and merge. It works well.

ADD REPLYlink written 9 months ago by xiaozhongzhiping0

Also see the answer of joneill4x below.

ADD REPLYlink written 3 months ago by ATpoint18k
1
gravatar for joneill4x
3 months ago by
joneill4x40
Canada
joneill4x40 wrote:

Like this:

bowtie2 -x btInd -1 13_trimmed_R1.fastq.gz -2 13_trimmed_R2.fastq.gz -U 13_unpaired_1.fastq.gz,13_unpaired_2.fastq.gz  -p 12 | samtools sort -@ 12 -T temp -o 13trimmed_sorted.bam

Works for me. (bowtie2 version 2.3.2)

ADD COMMENTlink modified 3 months ago by ATpoint18k • written 3 months ago by joneill4x40

I can confirm this works well:

bowtie2 -x $idx -1 test_1.fq -2 test_2.fq -U test_single.fq

20000 reads; of these:
  10000 (50.00%) were paired; of these:
    1362 (13.62%) aligned concordantly 0 times
    5857 (58.57%) aligned concordantly exactly 1 time
    2781 (27.81%) aligned concordantly >1 times
    ----
    1362 pairs aligned concordantly 0 times; of these:
      76 (5.58%) aligned discordantly 1 time
    ----
    1286 pairs aligned 0 times concordantly or discordantly; of these:
      2572 mates make up the pairs; of these:
        2156 (83.83%) aligned 0 times
        244 (9.49%) aligned exactly 1 time
        172 (6.69%) aligned >1 times
  10000 (50.00%) were unpaired; of these:
    1285 (12.85%) aligned 0 times
    5798 (57.98%) aligned exactly 1 time
    2917 (29.17%) aligned >1 times
88.53% overall alignment rate
ADD REPLYlink modified 3 months ago • written 3 months ago by ATpoint18k
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: 2089 users visited in the last hour