Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • SAM/CIGAR for deletion before first match

    Hi all,
    This is my first post here. Just searching this site has answered so many questions I've had previously, but I can't find an answer to this one. If I have hard trimmed some bases from the beginning of my reads after alignment, this leaves me with the possibility of a correctly-mapped deletion beginning a read. The SAM spec seems ambiguous to me on this topic, and if this is valid, which position should I take to be the leftmost mapped position? For example, say I hard trim the first three bases from the following aligned read:

    reference: ACTGACGTCA
    read: ACTCGTCA
    CIGAR: 3M2D5M

    This is now:

    read: CGTCA
    CIGAR 3H2D5M

    There may not be a correct answer to this question, so maybe I'm just asking will SAMTOOLS pileup get confused by this?
    Thanks!

    Stuart

  • #2
    I think if you hardclip the first 3 then the CIGAR shouldn't show any deletion; you would be aligning the read "CGTCA", which directly matches the reference.

    Comment


    • #3
      Thank you for your reply. While I can opt out of this behavior from the aligner, I don't want to do this because very much want to retain the deletion. In these cases the deletion is correctly identified and aligned, and actually more "interesting" data than a match. I have written my software to deal with a leading deletion, but I am just curious about whether there is an official usage with SAM.

      Comment


      • #4
        I think your usage looks sane - it would be worth bringing this up on the samtools-devel mailing list. I suspect similar examples could occur in assembly editors, e.g. Gap5 might generate this kind of CIGAR string too after a manual edit.

        Comment


        • #5
          I'm not sure what Gap5 will do without checking, but it may depend on whether the usual has manually added gaps with * characters.

          I think starting in a deletion is fine, although it's hard to justify the existance of it instead of a positional change. However given the deleted base does have its own location in the reference I would expect samtools to work, although I haven't verified it.

          Where things start to break down is with sequences that start with an insertion or padding character. This can be a useful and valid alignment, but it causes confusion to samtools as the first used base occurs before the mapping position.

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM
          • seqadmin
            Strategies for Sequencing Challenging Samples
            by seqadmin


            Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
            03-22-2024, 06:39 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          27 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          30 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          26 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          52 views
          0 likes
          Last Post seqadmin  
          Working...
          X