Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dena.dinesh
    Member
    • Feb 2013
    • 58

    #1

    Interpreting the CIGAR and Read Sequence in sam/bam

    Hi,

    I ran bowtie2 to align the fastq reads to align against a de novo assembled transcriptome. I ran the following command.

    Code:
    bowtie2 -p 30 /path/to/bowti2_indexes -U Sample1.fastq -S Sample1.sam
    samtools view -F 4 -bS Sample1.sam -o Sample1.bam
    samtools sort Sample1.bam Sorted_Sample1
    I obtained a sam file which I later converted it into a bam file and then sorted it out. When I open the bam file I found that for some transcripts has CIGAR value of less than 25M and has Read Sequence corresponding to CIGAR value. For an example, if the CIGAR for particular transcript is 12M and has the Read Sequence like ATGGCAGTGTTG. How could I interpret the information?

    Kindly guide me

    Regards
    Deena
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    You must have seen the SAM spec https://samtools.github.io/hts-specs/SAMv1.pdf (Page 1 and 5).

    Comment

    • dena.dinesh
      Member
      • Feb 2013
      • 58

      #3
      Originally posted by GenoMax View Post
      You must have seen the SAM spec https://samtools.github.io/hts-specs/SAMv1.pdf (Page 1 and 5).
      Thanks for your reply. I read the article. In my case, as I ran Bowtie2 with default parameters(Seed length 25 and no mismatch). Now when there is 12M in Cigar and Read Sequence like ATGGCAGTGTTG, what does it indicate? Is this 12 nucleotides matches or mismatches with my reference transcript? If this is match, then how can it be possible as minimum seed lenght is 25 and if it a mismacth, then by default setting, there is no mismatch allowed.

      As I am new to RNAseq analysis, kindly guide me.

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        12M just means 12 bases aligned. It does not indicate whether they're matches or mismatches, you have to look at the MD auxiliary tag for that information.

        Regarding the seeding, I'd have to check the source code, but I suspect it just uses the whole sequence as the seed if it's shorter than the -L parameter.

        Comment

        • dena.dinesh
          Member
          • Feb 2013
          • 58

          #5
          Originally posted by dpryan View Post
          12M just means 12 bases aligned. It does not indicate whether they're matches or mismatches, you have to look at the MD auxiliary tag for that information.

          Regarding the seeding, I'd have to check the source code, but I suspect it just uses the whole sequence as the seed if it's shorter than the -L parameter.
          Hi Ryan,

          My doubt is that when the seed length is 25 and I havent allowed any mismatches, then how could there be Read Sequences in my bam/sam file which are less than 25. Am I missing something.

          Which source code you wanna check out. I am using bwotie2-align-version 2.1.0.

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            Originally posted by dena.dinesh View Post
            My doubt is that when the seed length is 25 and I havent allowed any mismatches, then how could there be Read Sequences in my bam/sam file which are less than 25.
            I addressed that in my reply.

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              Can you post the full SAM record for the sequence you are asking about?

              Why are you using an old version of bowtie2 BTW?

              Comment

              • dena.dinesh
                Member
                • Feb 2013
                • 58

                #8
                Originally posted by GenoMax View Post
                Can you post the full SAM record for the sequence you are asking about?

                Why are you using an old version of bowtie2 BTW?
                Here is a full SAM record for particular transcript

                H134:235:C701AACXX:1:1101:11985:26940 0 ref_comp3_c0_seq1 888 1 16M * 0 0 TAGATCAAAATCAACC BCCFFFFFHHHHHJJJ AS:i:0 XS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:16 YT:Z:UU

                Also I downloaded the source package for the bowtie2 2.2.5 and later compiled using "make" command. After compiling, when run the command bowtie2 --version, it gives me Bowtie2 version 2.1.0. But I downloaded the version 2.2.5
                Last edited by dena.dinesh; 05-29-2015, 04:14 AM.

                Comment

                • maubp
                  Peter (Biopython etc)
                  • Jul 2009
                  • 1544

                  #9
                  On Linux/Unix, running "bowtie" would give you the installed version found via the $PATH environment variable, even if there is a different "bowtie" in the current working directory.

                  Running "/path/to/where/you/compiled/it/bowtie" would explicitly use that version.

                  Did you install the new version (by editing your $PATH or copying the new binary to a folder on the path)? If not, try "make install" to do this.

                  Comment

                  • dena.dinesh
                    Member
                    • Feb 2013
                    • 58

                    #10
                    Originally posted by maubp View Post
                    On Linux/Unix, running "bowtie" would give you the installed version found via the $PATH environment variable, even if there is a different "bowtie" in the current working directory.

                    Running "/path/to/where/you/compiled/it/bowtie" would explicitly use that version.

                    Did you install the new version (by editing your $PATH or copying the new binary to a folder on the path)? If not, try "make install" to do this.
                    Hi,

                    I just uninstalled that older version and re installed the newer version. Now bowtiw has 2.2.5. Now I ma finidng difficult to interpret the results os sam/bam alignment file. When I dont specify seed length in bowtie2, then how could I get Read Sequence less than 25 nucletotides. Kindly guide me

                    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
                      ...
                      Today, 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, Today, 05:39 AM
                    0 responses
                    10 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, Yesterday, 09:56 AM
                    0 responses
                    12 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 10-09-2026, 11:14 AM
                    0 responses
                    25 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 09-29-2026, 09:51 AM
                    0 responses
                    77 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...