Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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

    Comment


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

      Comment


      • #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


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

          Comment


          • #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


            • #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


              • #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

                • seqadmin
                  Best Practices for Single-Cell Sequencing Analysis
                  by seqadmin



                  While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
                  Yesterday, 07:15 AM
                • seqadmin
                  Latest Developments in Precision Medicine
                  by seqadmin



                  Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

                  Somatic Genomics
                  “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
                  05-24-2024, 01:16 PM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Today, 06:58 AM
                0 responses
                8 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, Yesterday, 08:18 AM
                0 responses
                15 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, Yesterday, 08:04 AM
                0 responses
                15 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 06-03-2024, 06:55 AM
                0 responses
                13 views
                0 likes
                Last Post seqadmin  
                Working...
                X