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
            Addressing Off-Target Effects in CRISPR Technologies
            by seqadmin






            The first FDA-approved CRISPR-based therapy marked the transition of therapeutic gene editing from a dream to reality1. CRISPR technologies have streamlined gene editing, and CRISPR screens have become an important approach for identifying genes involved in disease processes2. This technique introduces targeted mutations across numerous genes, enabling large-scale identification of gene functions, interactions, and pathways3. Identifying the full range...
            08-27-2024, 04:44 AM
          • seqadmin
            Selecting and Optimizing mRNA Library Preparations
            by seqadmin



            Sequencing mRNA provides a snapshot of cellular activity, allowing researchers to study the dynamics of cellular processes, compare gene expression across different tissue types, and gain insights into the mechanisms of complex diseases. “mRNA’s central role in the dogma of molecular biology makes it a logical and relevant focus for transcriptomic studies,” stated Sebastian Aguilar Pierlé, Ph.D., Application Development Lead at Inorevia. “One of the major hurdles for...
            08-07-2024, 12:11 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 08-27-2024, 04:40 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 08-22-2024, 05:00 AM
          0 responses
          293 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 08-21-2024, 10:49 AM
          0 responses
          135 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 08-19-2024, 05:12 AM
          0 responses
          124 views
          0 likes
          Last Post seqadmin  
          Working...
          X