Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swNGS
    Member
    • Nov 2011
    • 83

    #1

    Trim last 'n' reads from end of variable length PE reads

    Hi,

    I'm hoping that this is a simple question, but I haven't found a tool to do specifically what I'm after yet.

    I have illumina 2x150 PE reads. I'm using Trim-galore, which is a wrapper for Cutadapt to do adapter trimming as I have a lot of 3' adapter read-through. After this step, I'm left with mate-paired variable length PE reads. I then want to trim the first 5 reads which I can do with fastx toolkit.

    My issue is that I then need to trim the last 5 reads. I can't use fastx toolkit since the fixed trim option is 'trim after n bases'. Given that each read will be different lengths after adapter read through at the 5'end, I can't use this option.

    Can anyone suggest a way to do this please?

    Thanks
  • JackieBadger
    Senior Member
    • Mar 2009
    • 385

    #2
    Use Trimmomatic

    Comment

    • swNGS
      Member
      • Nov 2011
      • 83

      #3
      Hi JackieBadger

      Thank you for your suggestion, I did look into Trimmomatic. As far as can see the options are as follows:

      ILLUMINACLIP: Cut adapter and other illumina-specific sequences from the read.
      SLIDINGWINDOW: Perform a sliding window trimming, cutting once the average quality within the window falls below a threshold.
      LEADING: Cut bases off the start of a read, if below a threshold quality
      TRAILING: Cut bases off the end of a read, if below a threshold quality
      CROP: Cut the read to a specified length
      HEADCROP: Cut the specified number of bases from the start of the read
      MINLEN: Drop the read if it is below a specified length
      TOPHRED33: Convert quality scores to Phred-33
      TOPHRED64: Convert quality scores to Phred-64

      My interpretation is that Trimmomatic wont let me trim a fixed amount regardless of quality from the end of a read.
      If all my reads were the same length this would be easy as I could use fastx_trimmer and invoke the -l switch (meaning number of bases from which to trim). I need to ditch the adapter read-through before trimming the 'real' sequence, hence the variable sized reads.

      As far as I can see the only 3' end trimming option offered by Trimmomatic is based on quality thresholds rather than an absolute number regardless of quality.

      I'm sure there must be a simple answer to this, but I've yet to spot it

      Comment

      • swNGS
        Member
        • Nov 2011
        • 83

        #4
        seqtk looks promising:

        The following apparently trims 5 bases from the left (5' end) and 10 bases from the right (3' end):

        Code:
        seqtk trimfq -b 5 -e 10 in.fa > out.fa
        Adapted as:

        Code:
        seqtk trimfq -e 5 in.fa > out.fa
        should do the trick

        Comment

        • JackieBadger
          Senior Member
          • Mar 2009
          • 385

          #5
          Ahhh ok...sorry about that.
          You're right.
          For this kind of trimming I use Galaxy.
          You can either trim Fastq files... or convert to tabular format and from txt.
          For larger files it is better to install a local instance. It's worth it as Galaxy provides a great way to edit and convert files

          Galaxy is a community-driven web-based analysis platform for life science research.

          Comment

          Latest Articles

          Collapse

          • 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, detection...
            Yesterday, 06:46 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 10-28-2026, 09:57 AM
          0 responses
          28 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-28-2026, 09:51 AM
          0 responses
          18 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 11:13 AM
          0 responses
          71 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          48 views
          0 reactions
          Last Post SEQadmin2  
          Working...