Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkareta
    Junior Member
    • May 2017
    • 6

    #1

    Bowtie2 not giving the proper # reads when combining replicates

    Hi Folks,

    I was hoping that someone could shed some light on an issue that is driving me crazy. I am aligning some trimmed reads (from cutadapt 1.9.1, PE mode) using bowtie 2 v2.3.2. I aligned my biological replicates and then aligned all replicates together to generate a concatenated file. When peak calling with macs2 I noticed that the concatenated file did not have the expected number of peaks. Since I thought this could be an issue with piping to samtools v1.5 to make bam files, I instead kept things simple and realigned sending my output to a sam file instead (line breaks added for clarity):

    #rep1
    bowtie2 -p 4 -q -x hg19 \
    -1 rep1_1_1.fastq.gz,rep1_2_1.fastq.gz,rep1_3_1.fastq.gz \
    -2 rep1_1_2.fastq.gz,rep1_2_2.fastq.gz,rep1_3_2.fastq.gz \
    -S rep1.sam

    #rep2
    bowtie2 -p 4 -q -x hg19 \
    -1 rep2_1_1.fastq.gz,rep2_2_1.fastq.gz,rep2_3_1.fastq.gz \
    -2 rep2_1_2.fastq.gz,rep2_2_2.fastq.gz,rep2_3_2.fastq.gz \
    -S rep2.sam

    #rep3
    bowtie2 -p 4 -q -x hg19 \
    -1 rep3_1_1.fastq.gz,rep3_2_1.fastq.gz,rep3_3_1.fastq.gz \
    -2 rep3_1_2.fastq.gz,rep3_2_2.fastq.gz,rep3_3_2.fastq.gz \
    -S rep3.sam

    To make the concatenated alignment, I ran with all fastq files:

    #rep cat
    bowtie2 -p 4 -q -x hg19 \
    -1 rep1_1_1.fastq.gz,rep1_2_1.fastq.gz,rep1_3_1.fastq.gz,rep2_1_1.fastq.gz,rep2_2_1.fastq.gz,rep2_3_1.fastq.gz,rep3_1_1.fastq.gz,rep3_2_1.fastq.gz,rep3_3_1.fastq.gz \
    -2 rep1_1_2.fastq.gz,rep1_2_2.fastq.gz,rep1_3_2.fastq.gz,rep2_1_2.fastq.gz,rep2_2_2.fastq.gz,rep2_3_2.fastq.gz,rep3_1_2.fastq.gz,rep3_2_2.fastq.gz,rep3_3_2.fastq.gz \
    -S cat.sam

    However when I check the file sizes, I observe this:

    wc -l *.sam
    44436462 rep1.sam
    45941920 rep2.sam
    46204354 rep3.sam
    44436462 cat.sam <-!!!

    Shouldn't the concatenated file be the sum of the replicates 44436462 + 45941920 + 46204354 = 136582736 (minus a few lines for duplicated headers)? It's also noteworthy that it is giving the number of lines as the first replicate. I checked if there were any errant spaces in my comma separated fastq lists, and there aren't any. It's almost like bowtie2 stops after reading so many fastq files.

    Yes, I know that I could use samtools merge on my sorted bams to get a concatenated file. However, I have always been leery about putting on a new header. In theory aligning to all files should overcome this, so any ideas why it is not?

    Thanks
  • mkareta
    Junior Member
    • May 2017
    • 6

    #2
    I should also note that I have not found any hidden characters in my file using both

    sed -n 'l' alignment_cmd.sh
    cat -A alignment_cmd.sh

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
      by SEQadmin2



      Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

      Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
      ...
      10-14-2026, 09:55 AM
    • SEQadmin2
      New Genomics Technologies Take Aim at Long-Standing Limits
      by SEQadmin2


      Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

      We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
      ...
      09-28-2026, 10:25 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 10-22-2026, 11:13 AM
    0 responses
    23 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-22-2026, 10:48 AM
    0 responses
    20 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-15-2026, 10:52 AM
    0 responses
    36 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    42 views
    0 reactions
    Last Post SEQadmin2  
    Working...