Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Quality-, adapter- and RRBS-trimming with Trim Galore!

    We have just updated Trim Galore! so that is now has built-in paired-end functionality which means that trimmed files don't need to be validated separately any more, as well as a few more things that make it more convenient to use.

    As there hasn't been any dedicated thread yet, here are a few more details: Trim Galore! is a wrapper script to automate quality and adapter trimming, with some added functionality to remove biased methylation positions for MspI digested RRBS sequence files (for directional, non-directional (or paired-end) sequencing). It's main features are:

    - For adapter trimming, Trim Galore! uses the first 13 bp of Illumina standard adapters ('AGATCGGAAGAGC') by default (suitable for both ends of paired-end libraries), but accepts other adapter sequence, too
    - For MspI-digested RRBS libraries, Trim Galore! performs quality and adapter trimming in two subsequent steps. This allows it to remove 2 additional bases that contain a cytosine which was artificially introduced in the end-repair step during the library preparation
    - For any kind of FastQ file other than MspI-digested RRBS, Trim Galore! can perform single-pass adapter- and quality trimming
    - The Phred quality of basecalls and the stringency for adapter removal can be specified individually
    - Trim Galore! can remove sequences if they become too short during the trimming process. For paired-end files Trim Galore! removes entire sequence pairs if one (or both) of the two reads became shorter than the set length cutoff. Reads of a read-pair that are longer than a given threshold but for which the partner read has become too short can optionally be written out to single-end files. This ensures that the information of a read pair is not lost entirely if only one read is of good quality
    - Trim Galore! can trim paired-end files by 1 additional bp from the 3' end of all reads to avoid problems with invalid alignments with Bowtie 1
    - Trim Galore! accepts and produces standard or gzip compressed FastQ files
    - FastQC can be run on the resulting output files once trimming has completed (optional)

    Trim Galore! and its User Guide can be found here: http://www.bioinformatics.babraham.a...s/trim_galore/

  • #2
    Thanks so much for writing this incredibly useful program

    I was struggling with the problem of trimming and removing low quality reads whilst maintaining read pairs - trim galore makes this straightforward and fast!

    Comment


    • #3
      I am glad that you found it useful!

      Comment


      • #4
        Hi, I am wondering about the -a and -a2 parameters for paired end reads

        For example my libraries were made using the Illumina TruSeq adapters, one of which is:
        (5')-adapter-(3')=GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG

        Should -a2 be the reverse of this or should I not use the a2 option at all?

        Thanks,
        blanco

        Comment


        • #5
          Originally posted by blanco View Post
          Hi, I am wondering about the -a and -a2 parameters for paired end reads

          For example my libraries were made using the Illumina TruSeq adapters, one of which is:
          (5')-adapter-(3')=GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG

          Should -a2 be the reverse of this or should I not use the a2 option at all?

          Thanks,
          blanco
          You don't need to use -a2 at all because Trim Galore will by default search for the first 13 bp of the Illumina adapter. This portion is shared between both read 1 and read 2 adapter, and they start to diverge only after this position. Normally it should thus be suffifcient to run it with the default parameters.

          Comment


          • #6
            I have also found that when using Nextera sample prep, you should trim at CTGTCTCTTATACACATCT instead of the usual AGATCGGAAGAGC.

            Best wishes, Gavin

            Comment


            • #7
              Thanks again for your quick reply fkrueger.

              What, however, if I do not want to use the default 13bp adapter but instead want to use the whole 63 bp index-adapter (index = red):
              (5')-adapter-(3')=GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG

              Would I still be safe to just use the -a option? I am assuming yes.

              Comment


              • #8
                Originally posted by blanco View Post
                Thanks again for your quick reply fkrueger.

                What, however, if I do not want to use the default 13bp adapter but instead want to use the whole 63 bp index-adapter (index = red):
                (5')-adapter-(3')=GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG

                Would I still be safe to just use the -a option? I am assuming yes.
                Yes that should work. However if you look closely at the sequence you posted you'll find that it starts with GATCGGAAGAGC.... A-tailing of the library prior to adapter ligation will add another A to the 5-prime end, like so:
                AGATCGGAAGAGC, which happens to be pretty much what Trim Galore is using by default:
                AGATCGGAAGAGC.

                If you still want to use the entire sequence then you would need tp specify different adapters for both sides since their sequence starts diverging after the first 13bp. Unless you want to trim only a subset of indexed adapters it is probably best to just run it in default mode.

                Comment


                • #9
                  We have just released Trim Galore v0.2.7 that adds an option '--dont_gzip' which takes precedence over .gz file endings.

                  The download can be found here: http://www.bioinformatics.babraham.a...s/trim_galore/.

                  Comment


                  • #10
                    We have just released Trim Galore v0.2.8, which is more of a cosmetic update. The changes in detail are:

                    • Trim Galore will now compress output files with GZIP on the fly instead of compressing the trimmed file once trimming has completed. In the interest of time temporary files are not being compressed
                    • Added a small sanity check to exit if no files were supplied for trimming. Thanks to P. for 'bringing this to my attention'
                    • The download also includes the updated RRBS guide

                    The download can be found here: http://www.bioinformatics.babraham.a...s/trim_galore/

                    Comment


                    • #11
                      paired-end data filtering with FastQC

                      Hi!
                      I have a question about the usage of Trim Galore (v0.3.0) for paired-end data filtering.

                      I used FastQC to generate the quality assessment report. Based on it, I want to trim my sequences both at the 3'- and 5'-ends (from "Per base sequence quality") and also filter them based on quality (from "Per sequence quality scores"). Is there a way to somehow integrate FastQC with Trim Galore for paired-end data?

                      Thanks a lot!
                      Vasilisa

                      Comment


                      • #12
                        Originally posted by Vasilisa View Post
                        Hi!
                        I have a question about the usage of Trim Galore (v0.3.0) for paired-end data filtering.

                        I used FastQC to generate the quality assessment report. Based on it, I want to trim my sequences both at the 3'- and 5'-ends (from "Per base sequence quality") and also filter them based on quality (from "Per sequence quality scores"). Is there a way to somehow integrate FastQC with Trim Galore for paired-end data?

                        Thanks a lot!
                        Vasilisa
                        Hi Vasilisa,

                        FastQC and Trim Galore are independent pieces of software, so they can't really be 'integrated'. Trim Galore will by default use a Phred score cutoff of 20 for quality trimming (the implementation is the same as the one used by BWA, please see the Cutadapt documentation for more information). As of the latest version of Trim Galore you can also trim sequences on their 5' ends if intended. If you are simply experiencing somwhat lower qualities at the first couple of positions it is probably simply due to the quality score calibration that takes place during the first cycles on the HiSeq/MiSeq. Normally it is sufficient to run Trim Galore in its default setting.

                        Comment


                        • #13
                          A new version of Trim Galore (v0.3.0) is now available for download from https://www.bioinformatics.babraham....s/trim_galore/.

                          This new release adds the options '--clip_R1' and '--clip_R2' to trim off a fixed number of bases from the 5' end of reads. This can be useful if the quality is unusually low at the start, or whenever there is an undesired bias at the start of reads. An example for this could be PBAT-Seq in general (where the first 4bp show a very strong sequence (and methylation) bias), or the start of Read 2 of every shotgun Bisulfite-Seq paired-end library where the end repair procedure introduces unmethylated cytosines. For more information on this please refer to the M-bias section of the Bismark User Guide.

                          Together with the '--ignore' and '--ignore_r2' options in the Bismark methylation extractor one may now choose whether to remove potential biased positions at the start of reads before mapping or ignoring them later on using the Bismark methylation extractor.

                          Comment


                          • #14
                            trim galore error

                            Hello,
                            When I tried trim-galore (v0.3.0) for mate_pair reads (actually my first time to use it) I always had an error:
                            Code:
                            Use of uninitialized value $length_cutoff in numeric gt (>) at /usr/bin/trim_galore line 1068.
                            Use of uninitialized value $length_cutoff in numeric gt (>) at /usr/bin/trim_galore line 1077.
                            Failed to write to file: No such file or directory
                            And this is my command line:
                            Code:
                            trim_galore --paired -phred33 -q 20 -a CTGTCTCTTATACACATCT -a2 AGATGTGTATAAGAGACAG -e 0.15 --clip_R1 14 --clip_R2 15 --retain_unpaired  -t -r1 20 -r2 20  -o MP03-05k_R1+R2trim_galored.fq test_R1.fq test_R2.fq
                            I checked the script lines it seems related to my reads length. What did I miss? Thank you!

                            Comment


                            • #15
                              Apologies for that, this was a bug in the code because the default length cutoff had not been defined when the check against the length of unpaired reads was performed. I have now fixed that and put up a new version. Just as side note, the retain length for unpaired singleton reads has to be greater than the paired-end length cutoff (which is 20bp by default).

                              Please download the hot-fixed version 0.3.1 from the Trim Galore project page.
                              Best,
                              Felix

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Exploring the Dynamics of the Tumor Microenvironment
                                by seqadmin




                                The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
                                07-08-2024, 03:19 PM
                              • seqadmin
                                Exploring Human Diversity Through Large-Scale Omics
                                by seqadmin


                                In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
                                06-25-2024, 06:43 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 07-10-2024, 07:30 AM
                              0 responses
                              25 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 07-03-2024, 09:45 AM
                              0 responses
                              201 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 07-03-2024, 08:54 AM
                              0 responses
                              211 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 07-02-2024, 03:00 PM
                              0 responses
                              193 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X