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
            Best Practices for Single-Cell Sequencing Analysis
            by seqadmin



            While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
            Yesterday, 07:15 AM
          • seqadmin
            Latest Developments in Precision Medicine
            by seqadmin



            Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

            Somatic Genomics
            “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
            05-24-2024, 01:16 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Today, 06:58 AM
          0 responses
          12 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, Yesterday, 08:18 AM
          0 responses
          18 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, Yesterday, 08:04 AM
          0 responses
          17 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 06-03-2024, 06:55 AM
          0 responses
          13 views
          0 likes
          Last Post seqadmin  
          Working...
          X