Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • count A/T/C/G/N in a aligned site

    Hello,

    I am wondering which tools I should use to count the A/T/C/G/N number/percentage in a given aligned site after alignment. Thanks in advance.

    John

  • #2
    it looks like no one knows this and if there is not a tool over there, I would like to write a simple one for this basic function and am wondering if any journal like to publish it

    Comment


    • #3
      Have you looked at samtools pileup?

      Comment


      • #4
        perl's tr can be used for this, if you use it after something like mpileup. It's also possible there's a SAMtool to do it as well.
        Code:
        $valueA = tr/Aa//;$valueC = tr/Cc//;$valueG = tr/Gg//;$valueT = tr/Tt//;
        print("A: $valueA; C: $valueC; G: $valueG; T: $valueT\n");

        Comment


        • #5
          Thanks for response. I tried samtools pileup, but the output was a large file, even including a long sequence like....a..t....I only need simple output atcg and their percentage. I might not use it correctly, but I already tried twice and I think perl is great! Thanks.

          Comment


          • #6
            Hi John,

            You can use mpileup for a given site or position:
            samtools mpileup -r 1:18321-18323 bam_file.bam

            You will obtain something like that:
            1 18321 N 14 TTTTTTTttttttt BHEHEHHICF#HHB
            1 18322 N 14 TTTTTTTttttttt DHIHEIIHE@#HGB
            1 18323 N 14 CCCCCCCccccccc ,HIHBIIICF#EGB

            Then you can cut the 5th column and count the bases as gringer proposed.

            Emilie

            Comment


            • #7
              Emilie

              Thank you for your post that give me a sense of the output file from mpileup. In this case, if I have one million sites like 1:18321, I just need to count a million line. It should be fast. Good idea!

              John

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Advancing Precision Medicine for Rare Diseases in Children
                by seqadmin




                Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                12-16-2024, 07:57 AM
              • seqadmin
                Recent Advances in Sequencing Technologies
                by seqadmin



                Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                Long-Read Sequencing
                Long-read sequencing has seen remarkable advancements,...
                12-02-2024, 01:49 PM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 12-17-2024, 10:28 AM
              0 responses
              26 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 12-13-2024, 08:24 AM
              0 responses
              42 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 12-12-2024, 07:41 AM
              0 responses
              28 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 12-11-2024, 07:45 AM
              0 responses
              42 views
              0 likes
              Last Post seqadmin  
              Working...
              X