Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #1

    Trimmomatic -- Tony needs advice

    I have communicated with Tony Bolger about this bug. He gave permission to post on SeqAnswers.

    Basically I was doing trimming on some miRNAs but, incorrectly, using the TruSeq adapters. This uncovered a bug (or feature) of Trimmomatic for which Tony needs some advice.

    As an example, my original sequence is:
    Code:
    >original_2989:2125
    TCTCATTCCATACATCGTCTGATGGAATTCTCGGGTGCCAAGGAACTCCAGTCACGTTTCGATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAAAAAAA
    When I use the TruSeq adapter as follows:
    Code:
    >TruSeq_Adapter_Index_21-GTTTCG
    GATCGGAAGAGCACACGTCTGAACTCCAGTCACGTTTCGATCTCGTATGCCGTCTTCTGCTTG
    Then with a mismatch of 2 and score of 15 I get as the trimmed sequence.
    Code:
    >truseq_trimmed
    TCTCATTCCATACATCGTCTGA
    Which is correct but is only due to happenstance. Note that the TruSeq adapter does not having the TGGAAT... sequence where the trimming begins. However the adapter and the original sequence do have a long match starting at the GAACTCC... part.

    I'll let Tony explain:

    OK - so what's happening is that, for some (arguably incorrect) reasons,
    trimmomatic is considering the alignment sufficiently good despite the
    relatively large number of mismatches in the first part of the adapter.

    Normally, assuming mismatches are relatively reliable bases (i.e with
    good Q scores) and distributed across the aligning region, they
    massively reduce the alignment score, thus bringing it below the
    threshold.

    However, given your example, where all the mismatches towards one end of
    the adapter, but the adapter itself is relatively long, the 'good match'
    region is alone sufficient to pass the threshold - in effect, a local
    alignment.

    This is arguably incorrect for illumina clipping, since you would
    normally expect at least the start of the adapter to be present, so
    maybe it would make more sense to require the hit to consider all bases
    from the start, thus causing early mismatches to have a more drastic
    effect on the alignment score.

    Another approach would be to leave it as a local alignment, but perform
    the trimming from the start of the local alignment region, rather than
    from the assumed start of adapter.

    Another variant is to combine these - first consider from the start of
    the adapter to the best aligning region, and trim if it's above the
    threshold, otherwise try the local alignment with local trimming.

    None of these changes are particularly difficult to make, so if you (and
    others) have a strong preference on it, I can change it.
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #2
    Well, no one has responded (at least publicly) to Tony's request on how to change the Trimmomatic program. So in order to get my thoughts on record and in order to get this post back to the fore, here is my idea.

    All three methods are good choices and making the selection of the method into a command line parameter would be useful. However if I were to choose one method it would be for a local alignment -- that is, only trim once the adapter bases actually match the bases being trimmed.

    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
    31 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-22-2026, 10:48 AM
    0 responses
    22 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-15-2026, 10:52 AM
    0 responses
    39 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    45 views
    0 reactions
    Last Post SEQadmin2  
    Working...