Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Use Trimmomatic

    Comment


    • #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


      • #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


        • #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

          • seqadmin
            Essential Discoveries and Tools in Epitranscriptomics
            by seqadmin




            The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
            04-22-2024, 07:01 AM
          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Yesterday, 08:47 AM
          0 responses
          12 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          60 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          59 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          54 views
          0 likes
          Last Post seqadmin  
          Working...
          X