Unconfigured Ad

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

    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

      • mylaser
        Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by mylaser
        Kheloyaar: The Complete Guide to Kheloyaar Loginand Kheloyaar ID
        The online gaming industry has transformed the way people enjoy digital entertainment. As technology continues to improve, players are looking for platforms that offer convenience, security, and a seamless user experience. Kheloyaarhas gained attention among users who value an easy-to-use platform, quick account access, and a simple registration process.
        Whether you're exploring Kheloyaar for the first time or want to understand...
        Yesterday, 09:27 PM
      • SEQadmin2
        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by SEQadmin2



        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
        ...
        Yesterday, 11:10 AM
      • SEQadmin2
        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
        by SEQadmin2



        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
        07-08-2026, 05:17 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 10:04 AM
      0 responses
      8 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-08-2026, 10:08 AM
      0 responses
      7 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-07-2026, 11:05 AM
      0 responses
      11 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-02-2026, 11:08 AM
      0 responses
      31 views
      0 reactions
      Last Post SEQadmin2  
      Working...