Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agc
    Member
    • May 2010
    • 26

    #1

    Using samtools/tablet to find indels

    As I understand, the following code should extract indels from a bam file and output them in pileup format:
    Code:
    samtools pileup -if <ref.fa> <file.sorted.bam>
    This command outputs nothing, however, when viewing the BAM file in tablet I can clearly see sections of the reference with no reads mapped to them.

    Am I running samtools correctly? Is there a different way I should be looking for indels?
  • nilshomer
    Nils Homer
    • Nov 2008
    • 1283

    #2
    Originally posted by agc View Post
    As I understand, the following code should extract indels from a bam file and output them in pileup format:
    Code:
    samtools pileup -if <ref.fa> <file.sorted.bam>
    This command outputs nothing, however, when viewing the BAM file in tablet I can clearly see sections of the reference with no reads mapped to them.

    Am I running samtools correctly? Is there a different way I should be looking for indels?
    It will call indels that are observed in the reads themselves. It wont do any type of re-assembly based on missing coverage etc. Hope that clears it up.

    Comment

    • GussowCarmelab
      Junior Member
      • Apr 2010
      • 1

      #3
      I see. Thanks for the quick reply. So, in other words, hypothetically that pileup command would show me:
      Code:
      Read         : ACACGGGACAC
      Reference  : ACACACAC
      as an insertion of 3 Gs? Does that mean that indels can only be found via gapped aligners (IE bwa can find them, but not bowtie)?

      Also, why wouldn't it output parts of the reference that no reads were aligned to? Aren't those likely to be deletions?

      Comment

      • nilshomer
        Nils Homer
        • Nov 2008
        • 1283

        #4
        Originally posted by GussowCarmelab View Post
        I see. Thanks for the quick reply. So, in other words, hypothetically that pileup command would show me:
        Code:
        Read         : ACACGGGACAC
        Reference  : ACACACAC
        as an insertion of 3 Gs? Does that mean that indels can only be found via gapped aligners (IE bwa can find them, but not bowtie)?
        Yes, gapped aligners will find gaps, ungapped aligners will not.

        Originally posted by GussowCarmelab View Post
        Also, why wouldn't it output parts of the reference that no reads were aligned to? Aren't those likely to be deletions?
        Missing coverage could be due to sampling, but are likely deletions (or SVs). Deletions can also be observed with paired-end or mate-pair reads, where the distance between the two ends are farther away than expected. There are tools (like Breakway) that try to find SVs from paired-end (mate-pair) data. SAMtools does not try to find such variants.

        Comment

        • agc
          Member
          • May 2010
          • 26

          #5
          Our data is not mate-pair (50bp fragment library), but I would like to find fairly large indels (>200bp). Is this possible? I've read up on gapped aligners (BFAST and BWA), but they seem to be limited to smaller indels.

          Is there an aligner / software that can do this? Perhaps taking missing coverage into account?

          Thanks.
          Last edited by agc; 06-22-2010, 04:14 AM.

          Comment

          • bioinfosm
            Senior Member
            • Jan 2008
            • 483

            #6
            For such large indels, with short reads, one needs paired or mated data!

            Using lack of coverage is an interesting concept, and IMO if there is a reference sample, you may be able to call indels based on comparison with coverage in reference sample. But simply taking missing coverage in a sample to be a deletion is very likely a false positive!
            --
            bioinfosm

            Comment

            • agc
              Member
              • May 2010
              • 26

              #7
              Utilizing a reference sample, is there a program (or samtools command) that can output the coordinates and sequences on the reference sequence where there is no coverage by the reads? We can roughly estimate the size of the indel that we are looking for, and hopefully we can weed out false positives that way.

              Comment

              • agc
                Member
                • May 2010
                • 26

                #8
                Originally posted by agc View Post
                Utilizing a reference sample, is there a program (or samtools command) that can output the coordinates and sequences on the reference sequence where there is no coverage by the reads? We can roughly estimate the size of the indel that we are looking for, and hopefully we can weed out false positives that way.
                I apologize for bumping this, but if there is no such program, we will attempt to write our own, but if there is already a software option for this, we'd rather utilize it then put in the time and effort of rewriting something that already exists.

                Thanks.

                Comment

                • nilshomer
                  Nils Homer
                  • Nov 2008
                  • 1283

                  #9
                  Originally posted by agc View Post
                  I apologize for bumping this, but if there is no such program, we will attempt to write our own, but if there is already a software option for this, we'd rather utilize it then put in the time and effort of rewriting something that already exists.

                  Thanks.
                  A quick perl script using the output of your pileup should be able to do this.

                  Comment

                  Latest Articles

                  Collapse

                  • kinpict.com
                    Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                    by kinpict.com
                    The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
                    Today, 06:37 PM
                  • SEQadmin2
                    16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                    by SEQadmin2





                    NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
                    10-30-2026, 06:46 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 11-12-2026, 07:59 AM
                  0 responses
                  27 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 11-05-2026, 09:25 AM
                  0 responses
                  35 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 11-03-2026, 11:54 AM
                  2 responses
                  56 views
                  0 reactions
                  Last Post kinpict.com  
                  Started by SEQadmin2, 10-28-2026, 09:57 AM
                  0 responses
                  175 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...