Align paired and unpaired reads simultaneously using Bowtie2?
2
2
Entering edit mode
5.7 years ago

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 • 6.9k views
ADD COMMENT
2
Entering edit mode
5.7 years ago
h.mon 35k

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Also see the answer of joneill4x below.

ADD REPLY
5
Entering edit mode
5.1 years ago
joneill4x ▴ 160

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

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