Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • dovah
    Member
    • Jul 2014
    • 18

    extended cigar in bwa-mem

    Hi all,

    I am aligning pacbio reads to a reference genome using bwa mem. Do you know how to output an extended CIGAR in output sam file from bwa v0.7.13?

    My command is:
    Code:
    bwa mem -x pacbio refgenome.fasta reads.fastq > output.sam
    Thanks in advance
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    What exactly do you mean by "extended CIGAR"? bwa mem will output SAM files with an appropriate CIGAR string already.

    Comment

    • Brian Bushnell
      Super Moderator
      • Jan 2014
      • 2709

      #3
      He probably means cigar strings with X and = symbols instead of M, which are very handy.

      Comment

      • dovah
        Member
        • Jul 2014
        • 18

        #4
        Yes, this is what I mean by "extended cigar". By the way, I found a tool that can do that a posteriori, in case someone else is interested: SamFixCigar (http://github.com/lindenb/jvarkit )

        Comment

        • sklages
          Senior Member
          • May 2008
          • 628

          #5
          Are there any plans to extend bwa to write X/= instead of M? At least optional?

          Comment

          • Brian Bushnell
            Super Moderator
            • Jan 2014
            • 2709

            #6
            You can now use BBMap's reformat.sh to add those:

            reformat.sh in=mapped.sam out=extended.sam sam=1.4

            I have not tested it extensively on things like hard-clipping but it should generally work.

            Comment

            • sklages
              Senior Member
              • May 2008
              • 628

              #7
              Brian,

              thanks for the suggestion. I will try :-)

              Nevertheless I'd wish bwa would provide an option to either use M or X=.
              Just to avoid more I/O due to another conversion ...

              Sven

              Comment

              • sklages
                Senior Member
                • May 2008
                • 628

                #8
                After studying some docs I do see that with optional MD:Z I am even as flexible as with X=, with the advantage of not having too "complicated" CIGARs. :-)

                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
                18 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-09-2026, 10:04 AM
                0 responses
                30 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-08-2026, 10:08 AM
                0 responses
                16 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...