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
            Recent Advances in Sequencing Analysis Tools
            by seqadmin


            The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
            05-06-2024, 07:48 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 05-10-2024, 06:35 AM
          0 responses
          20 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-09-2024, 02:46 PM
          0 responses
          25 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-07-2024, 06:57 AM
          0 responses
          21 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-06-2024, 07:17 AM
          0 responses
          21 views
          0 likes
          Last Post seqadmin  
          Working...
          X