Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Pedro Olivares
    Junior Member
    • Sep 2021
    • 6

    Run Tadpole (BBtools) only on sub-sets of reads from input files

    Hey there,

    I have been using tadpole for error correction (and BBtools in general) and I am extremely happy with its results and performance. Much appreciated!

    I am looking for support/advice on what seems a relatively simple thing to do, but I can't seem to solve in a simple manner: is it possible to run the tadpole.sh family of commands on sub-sets of a given input file?

    Contrary to the problem one has when assembling genomes (millions of small partitions of a single large object), the fields of single-cell genomics and single-molecule sequencing present a different paradigm: one has thousands of smaller objects (cells or molecules) scattered around the reads, usually determined by the inclusion of unique molecular identifiers (UMI).

    It would be fantastic to be able to run the tadpole.sh suite of algorithms in this different type of problem. Two applications for which I have successfully used tadpole with this set of mind are 1) on the assembly randomly fragmented mRNA libraries using UMIs as a handle; basically making virtual long reads out of Illumina experiments and 2) the correction of clouds of reads from amplicons (again - held together by a shared UMI) in order to detect SNPs or/and indels.

    The challenge I face now is that of scalability. Even though the generation of thousand of small sets of reads into individual fastq for passing to tadpole works well in principle, in practice is a big challenge for even mid-sizes data sets. The IO overhead for this use paradigm results into week-long runtimes. Where as running tadpole on the whole fastq takes less than a minute (using 100 cores) ...

    From a naive point of view, it feels as if having the option to sub-set input files (regex or list of items to name a couple) would be a solution to this problem of scalability since iterating through a single file thousands of times sound more efficient (at logistically simple) than generating thousands of little mini jobs. I wonder if you have any suggestion on how to tackle this situation. Another idea is to cat fastq | grep UMI | tadpole ... but I am not sure if one can pass pipes to tadpole.sh (and my guess is a no based on the documentation)

    Thanks again for the great work here!
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    You should be able to pass fastq to all BBtools. Use in=stdin.fq when you are doing that.

    Comment

    • Pedro Olivares
      Junior Member
      • Sep 2021
      • 6

      #3
      Great this is exactly what I needed. I will test and update since now the bottle neck will be to efficiently sub-set a large collection of reads. Some tabix should help. Let's see ...

      Thanks again and sorry if there were duplicated posts. I am not sure how the forum works. All previous attempts to post (and even this thread) never returned any sort of notification of their status.

      I will update a final solution for the record.

      Comment

      • Pedro Olivares
        Junior Member
        • Sep 2021
        • 6

        #4
        I think I might be hitting into some sort of bug.

        When I input a fastq using its path as an argument, the whole thing runs fine but when `cat` this same file and pipe it to `tadpole.sh` using the in=stdin.fq (or stdin.fastq) things seem to run fine up to one point but then the output is empty.

        Here an example of a working case

        Here an example of the non-working case

        Perhaps I need to go about this in a different way that I am missing?

        This problem is present in a couple of setups I have access to:
        - For a guix supported version I am using BBMap version 38.90 (examples are from this one)
        - From a conda instance BBMap version 37.62

        Thanks for the help.

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          #5
          I may have bad news. All bbmap tools are supposed to be able to accept input from STDIN but it appears that "tadpole.sh" may be an exception. This is something Brian (author of BBMap may know the answer to). Brian no longer participates in forums so you could try emailing him directly and see if he responds.

          Something like
          Code:
          zcat file.fq.gz | reformat.sh -Xmx4g in=stdin.fq out=stdout.fa
          does work.

          Comment

          • Pedro Olivares
            Junior Member
            • Sep 2021
            • 6

            #6
            Oops, let's see what I can do. Thanks for the information, though. Any hint on how can I find his email address? So far none of the obvious places worked and I haven't heard back from him on Twitter.

            My hope is that there should be an easy fix since it doesn't look like it doesn't work at all, the reads are actually loaded and processed but somehow downstream the analysis the are missed.

            Also, I just found out that when actually building contigs, inputs from stdin work perfectly fine! The problem only manifests when the option mode=correct is set.

            I will try to dig into the java code but it's really far from my comfort zone.

            Thanks again.

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              Brian's email address is in the inline help for bbmap programs. Just run `bbmap.sh` and look through the help.
              The problem only manifests when the option mode=correct is set.
              It may be by design then. Error correction requires keeping large amount of sequence in memory. You could try assigning a large amount of RAM for -Xmx option and see if that works.

              Other option is named pipes/FIFO etc but depends on how much effort you are willing to invest.
              Last edited by GenoMax; 09-18-2021, 06:17 AM.

              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.
                ...
                Today, 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...
                Yesterday, 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, Today, 10:04 AM
              0 responses
              8 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, Yesterday, 10:08 AM
              0 responses
              6 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-07-2026, 11:05 AM
              0 responses
              9 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-02-2026, 11:08 AM
              0 responses
              31 views
              0 reactions
              Last Post SEQadmin2  
              Working...