Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blancha
    Senior Member
    • May 2013
    • 367

    #1

    Trimming with sliding window before alignment

    Hi,

    I'm just wondering how trimming with a sliding window, with a tool such as Trimmomatic, will affect alignment.

    If Trimmomatic cuts sequences in the middle of the reads, will that not negatively affect the quality of the alignment, rather than improve it?
    An aligner, such as Bowtie2, would not be aware of the missing bases in the middle of the read.

    Here is an example of a trimming command from the Trimmomatic website with the sliding window parameter.

    java -jar trimmomatic-0.27.jar PE s_1_1_sequence.txt.gz s_1_2_sequence.txt.gz lane1_forward_paired.fq.gz lane1_forward_unpaired.fq.gz lane1_reverse_paired.fq.gz lane1_reverse_unpaired.fq.gz ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36

    Scan the read with a 4-base wide sliding window, cutting when the average quality per base drops below 15


    I don't understand how an aligner such as Bowtie2 can generate a better alignment with missing bases in the middle of the reads, rather than keeping the reads, knowing that they are of lesser quality, in the middle of the reads.

    Of course, if the trimming reduces the length of the reads below 36, the reads are dropped, which is fine. I am talking about the cases where the entire read is not dropped.

    Thank you.
  • kmcarr
    Senior Member
    • May 2008
    • 1181

    #2
    Originally posted by blancha View Post
    Scan the read with a 4-base wide sliding window, cutting when the average quality per base drops below 15

    I don't understand how an aligner such as Bowtie2 can generate a better alignment with missing bases in the middle of the reads, rather than keeping the reads, knowing that they are of lesser quality, in the middle of the reads.
    Trimmomatic (or any trimming tool employing this strategy) does not remove bases and the middle while retain reads on either end of a read. What the sliding window trimming does is scan along the read in the 5'->3' direction calculating the average quality over the window size you have defined. Once it encounters a window with an average quality below the threshold you have specified it removes all bases in that window and beyond to the 3' end of the read, effectively trimming the read back to the point just before the sliding window fell below your threshold.

    Comment

    • blancha
      Senior Member
      • May 2013
      • 367

      #3
      Great. Thanks for the answer. That is exactly what I wanted to know. It's not very clear from their website or their paper, but your explanation makes perfect sense.

      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, Yesterday, 11:13 AM
      0 responses
      16 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, Yesterday, 10:48 AM
      0 responses
      17 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      35 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...