Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #16
    Look into freebayes. There is samtools/bcftools based option as well.

    Comment

    • cmccabe
      Senior Member
      • Jul 2012
      • 355

      #17
      sorted bam and bbmap

      Is there an option for bbmap that will result in a sorted bam? I know adding "out=mapped.bam" this will produce a bam but it appears to be unsorted:

      Code:
      samtools view -H /home/cmccabe/IDP/mapped_unmatched_adapter_removed_quality_trimmed_NA12878-NextSeq-S1_R1_and_R2.bam
      @HD	VN:1.4	SO:unsorted
      Thank you .

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #18
        No. You have to do some work

        Code:
        $ samtools sort your_file.bam your_file_sorted

        Comment

        • cmccabe
          Senior Member
          • Jul 2012
          • 355

          #19
          just checking, thank you .

          bbmap is amazingly fast and accurate . Great tool.

          Comment

          • Brian Bushnell
            Super Moderator
            • Jan 2014
            • 2709

            #20
            Originally posted by GenoMax View Post
            No. You have to do some work

            Code:
            $ samtools sort your_file.bam your_file_sorted
            Of course, I do my best to prevent needing people to do work, so...

            Code:
            bbmap.sh in=reads.fq out=mapped.bam bs=bs.sh; sh bs.sh
            That will write a script "bs.sh" that contains the command to make a sorted, indexed bam file, then execute it after BBMap is done. It saves... well, at least a couple of keystrokes

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #21
              Hmm. I should start a new thread for "Easter eggs" in BBMap

              Comment

              • westerman
                Rick Westerman
                • Jun 2008
                • 1104

                #22
                Couldn't you create the shell script and then execute it within BBMap?

                Comment

                • Brian Bushnell
                  Super Moderator
                  • Jan 2014
                  • 2709

                  #23
                  Originally posted by westerman View Post
                  Couldn't you create the shell script and then execute it within BBMap?
                  Unfortunately, not easily, due to memory constraints. BBMap's shell script already grabs all available memory by default. It can launch a samtools process for conversion to bam, which is a low-memory streaming process; but sorting uses a lot of memory (to do it most efficiently), so it might run out of memory. Java cannot reduce its virtual memory allocation after starting, and won't share that memory with other programs.

                  It would work fine on most individual computers since physical memory limits would never be exceeded, but job schedulers often have strict limits on virtual memory and will kill jobs that exceed it. So, it would reduce stability (and typically fail) on clusters unless I did parsing in the shellscript to launch a new process after BBMap terminates, or the user launched BBMap with a custom -Xmx flag. I try to keep the shellscripts as simple as possible. Anyway, there are workarounds, but they all add complexity due to memory issues.

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                    by SEQadmin2



                    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                    ...
                    10-14-2026, 09:55 AM
                  • SEQadmin2
                    New Genomics Technologies Take Aim at Long-Standing Limits
                    by SEQadmin2


                    Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                    We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                    ...
                    09-28-2026, 10:25 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Yesterday, 11:13 AM
                  0 responses
                  16 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, Yesterday, 10:48 AM
                  0 responses
                  16 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-15-2026, 10:52 AM
                  0 responses
                  35 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-14-2026, 05:39 AM
                  0 responses
                  42 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...