Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Mizzou55
    Junior Member
    • Mar 2010
    • 7

    Hi Brian,

    In this case I'm trying to trim vector and low qual from Sanger (BAC End Seq) reads (~850bp) to run through SSPACE. Will your script have problems with this?

    Comment

    • Brian Bushnell
      Super Moderator
      • Jan 2014
      • 2709

      No, that will work... but generally I would recommend quality-trimming using "qtrim=r trimq=15" or similar, using the vector sequence as the reference with "ktrim=r" or "kmask=N" for vector trimming. "ref=vector kmask=N k=31 edist=1" would, for example, mask all of the vector sequence with Ns, which you could then remove via subsequent quality-trimming on both ends with "qtrim=rl trimq=2" (Ns have quality 0).

      If you just want to remove the first and last 125bp the command would be "ftl=125 ftr2=125".

      Comment

      • germelcar
        Junior Member
        • Sep 2016
        • 1

        Hi Brian:

        I ran your "repair.sh" script yesterday and it has generated only "singletons.fq" file, the "r1.fq" and "r2.fq" files are empty. The command that I ran was the same as you mention on the page 2:

        cat SRR867646_1.fastq SRR867646_2.fastq | repair.sh -Xmx4g in=stdin.fq out1=r1.fq out2=r2.fq outs=singletons.fq
        I ran it with SRR867646's reads which seems to have beem trimmed previously to be uploaded to SRA archive files, and in fact, I am not able to do an alignment because R1 has 10919266 sequences and R2 has 2177589 sequences.

        But... I don't know how to interpret that, why r1.fq and r2.fq files are empty and singletons.fq file not? Should I treat the reads as single-end using the singletons.fq file?

        Also, the singletons.fq file contains 13096855 sequences, the same amount that R1+R2 from the original reads.

        How should I handle that?
        What recommendations do you have?


        Thanks in advance.
        ~g

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          @germelcar's questions has been answered over at Biostars.

          Comment

          • Brian Bushnell
            Super Moderator
            • Jan 2014
            • 2709

            Thanks, Genomax!

            Comment

            • JVGen
              Member
              • Jul 2016
              • 42

              BBDuk - Remove singletons?

              Hi Brian,

              I'm using BBDuk to adapter and quality trim Illumina reads that were prepped with the Nextera kit. I'm using the Plugin within Geneious, and I have a few questions:

              1) I'm getting different a number or reads as outputs for pairs. I tried using removeifeitherbad=t, but still get different number of reads in each file. Would this command normally result in an equal number of reads for each file-pair? If so, I'll inquire with Geneious.

              2) When trimming adapters, what is the benefit of selecting only the right or left end? I'm guessing my reads will only have adapter sequence on the 5' end, correct? This assumes that the insert size is longer than the read length, as I think in principal I should have adapters on both ends? Why not just trim both ends to be safe? Does it result in non-specific trimming of sample sequence?

              Next, I intend to pair and merge the reads, and then de novo assemble.

              Thanks for any help.

              Jake

              Comment

              • Brian Bushnell
                Super Moderator
                • Jan 2014
                • 2709

                Hi Jake,

                1) When using paired reads with BBDuk, if the reads are in two files, you must run BBDuk just once using both files as input (using the in1= and in2= flags), rather than on one file at a time. As long as both files are used as input together, pairs will always be kept together.

                2) Adapter-trimming should only be done on the right (5') end for fragment libraries. Left-trimming is only for special circumstances like specific long-mate pair protocols and amplicons with custom inline barcodes. For fragment libraries, the original molecule has adapters on both ends, but reading starts just after the adapter so the reads have no adapter sequence on the left end, and only have adapter sequence on the right end if the insert size was shorter than read length. If you left-trim a fragment library after right-trimming it, nothing will happen except that, as you note, you will get occasional random trimming of genomic sequence, though that will be very rare. Also note that BBDuk can't do left and right trimming simultaneously, as based on how it does trimming (when a reference kmer is found, trim that kmer and everything to the left or right) it would trim all bases in the entire read.

                Comment

                • JVGen
                  Member
                  • Jul 2016
                  • 42

                  Originally posted by Brian Bushnell View Post
                  Hi Jake,

                  1) When using paired reads with BBDuk, if the reads are in two files, you must run BBDuk just once using both files as input (using the in1= and in2= flags), rather than on one file at a time. As long as both files are used as input together, pairs will always be kept together.
                  Thanks Brian. I found that the unequal read number following trimming was due to the " were being generated from read length cut-off. I was specifying a minimum read length of 30, but it was removing the read's mate. It could be an issue with Geneious. I can quality- and adapter- trim and get the same read numbers in each file. I'll just dictate read length at a later step.

                  Jake

                  Comment

                  • Brian Bushnell
                    Super Moderator
                    • Jan 2014
                    • 2709

                    Hi Jake,

                    It's still important to process both files together even if you have no minimum length cutoff, because the output order of BBDuk is not guaranteed to be the same as the input order (unless you add the "ordered" flag). So, I guess, if Geneious is running BBDuk on paired files individually, please add the "ordered" flag, and report that issue to the Geneious developers - it should process them together.

                    Comment

                    • JVGen
                      Member
                      • Jul 2016
                      • 42

                      Hi Brian, I'll report the issue to Geneious. I'm using the "keep order" feature in Geneious. I've attached a screenshot. The check boxes and insert fields that Geneious created are nice for those of us that don't code, but only if they actually do what they say :P

                      Jake

                      Never mind, forums have some pretty stringent rules on picture attachment dimension...painful.

                      Comment

                      • JVGen
                        Member
                        • Jul 2016
                        • 42

                        Originally posted by Brian Bushnell View Post
                        Hi Jake,

                        It's still important to process both files together even if you have no minimum length cutoff, because the output order of BBDuk is not guaranteed to be the same as the input order (unless you add the "ordered" flag). So, I guess, if Geneious is running BBDuk on paired files individually, please add the "ordered" flag, and report that issue to the Geneious developers - it should process them together.
                        Hey Brian. I heard back from Geneious. Turns out that I had to pair the reads before running BBDuk. After pairing I'm left with a single file in Geneious, though the reads have not been merged. Running BBDuk on the 'combined' file results in the removal of both pairs, yay!

                        Comment

                        • JVGen
                          Member
                          • Jul 2016
                          • 42

                          Hi Brian,

                          I just recently started using BBDuk to adapter and quality trim. I then use the reads to assemble in Spades, but ran into an issue. The error correction software that Spades uses cannot recognize the reads names.

                          The input read format is:
                          M00281:69:000000000-D22HU:1:1101:15164:1363 1:N:0:53

                          The output read format is:
                          M00281:69:000000000-D22HU:1:1101:15164:1363_1:N:0:53

                          The underscore isn't recognized by BWA, which is activated when the "careful" mode is used in Spades. Any way to switch that _ back to a space?

                          Thanks
                          Jake

                          Comment

                          • Brian Bushnell
                            Super Moderator
                            • Jan 2014
                            • 2709

                            Hi Jake,

                            BBDuk does not add an underscore to read names. Reformat can, if you run it with the flag "addunderscore", but doesn't by default. Can you list all of the steps you are doing prior to running Spades and verify that the underscores are not present for the BBDuk input?

                            Comment

                            • JVGen
                              Member
                              • Jul 2016
                              • 42

                              Hi Brian,

                              You are correct. While the file names were correct in the program interface, upon export the "_" were introduced. I apologize for not opening up the fastq file in a texteditor to be sure.

                              Jake

                              Comment

                              • Brian Bushnell
                                Super Moderator
                                • Jan 2014
                                • 2709

                                No problem!

                                Comment

                                Latest Articles

                                Collapse

                                • SEQadmin2
                                  Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                                  by SEQadmin2



                                  Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                                  ...
                                  07-09-2026, 11:10 AM
                                • SEQadmin2
                                  Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                                  by SEQadmin2



                                  Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                                  There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                                  07-08-2026, 05:17 AM
                                • GATTACAT
                                  Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                  by GATTACAT
                                  Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                                  07-01-2026, 11:43 AM

                                ad_right_rmr

                                Collapse

                                News

                                Collapse

                                Topics Statistics Last Post
                                Started by SEQadmin2, 07-13-2026, 10:26 AM
                                0 responses
                                24 views
                                0 reactions
                                Last Post SEQadmin2  
                                Started by SEQadmin2, 07-09-2026, 10:04 AM
                                0 responses
                                34 views
                                0 reactions
                                Last Post SEQadmin2  
                                Started by SEQadmin2, 07-08-2026, 10:08 AM
                                0 responses
                                21 views
                                0 reactions
                                Last Post SEQadmin2  
                                Started by SEQadmin2, 07-07-2026, 11:05 AM
                                0 responses
                                34 views
                                0 reactions
                                Last Post SEQadmin2  
                                Working...