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

    • kinpict.com
      Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
      by kinpict.com
      The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
      Today, 06:37 PM
    • SEQadmin2
      16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
      by SEQadmin2





      NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
      10-30-2026, 06:46 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 11-12-2026, 07:59 AM
    0 responses
    27 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 11-05-2026, 09:25 AM
    0 responses
    35 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 11-03-2026, 11:54 AM
    2 responses
    56 views
    0 reactions
    Last Post kinpict.com  
    Started by SEQadmin2, 10-28-2026, 09:57 AM
    0 responses
    175 views
    0 reactions
    Last Post SEQadmin2  
    Working...