Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Carlo
    Junior Member
    • Oct 2010
    • 4

    #1

    Tool for parsing mismatches out of a SAM file...

    Hi all, I'm looking for a tool or PERL module that could take each line from a SAM file and parse the CIGAR + MD strings to output the genomic coordinates of all mismatches (specifically SNPs). I know of multiple tools that will tally up the number and type of mismatches at each position in a genome, but what I need is the reference position of all SNPs within each pair of mates in my SAM files.

    I can write a PERL script to do this, but I'm hoping that I'm not the first person to encounter this issue!

    Thanks,

    Carlo
  • SNPsaurus
    Registered Vendor
    • May 2013
    • 525

    #2
    Do you care if these mismatches are real or sequencing errors? I would think starting from a vcf file or pileup, derived from the sam file, would be both easier to parse and eliminate many of the sequencing artifacts.
    Providing nextRAD genotyping and PacBio sequencing services. http://snpsaurus.com

    Comment

    • lindenb
      Senior Member
      • Apr 2010
      • 143

      #3
      I wrote SAM2Tsv : https://github.com/lindenb/jvarkit/wiki/SAM2Tsv

      Code:
      $ java -jar dist/sam2tsv.jar -A  \
          -r samtools-0.1.18/examples/toy.fa 
            samtools-0.1.18/examples/toy.sam
      r001    163 ref 0   T   .   7   T   M
      r001    163 ref 1   T   .   8   T   M
      r001    163 ref 2   A   .   9   A   M
      r001    163 ref 3   G   .   10  G   M
      r001    163 ref 4   A   .   11  A   M
      r001    163 ref 5   T   .   12  T   M
      r001    163 ref 6   A   .   13  A   M
      r001    163 ref 7   A   .   14  A   M
      r001    163 ref 8   A   .   .   .   I
      r001    163 ref 9   G   .   .   .   I
      r001    163 ref 10  A   .   .   .   I
      r001    163 ref 11  G   .   .   .   I
      r001    163 ref 12  G   .   15  G   M

      Comment

      Latest Articles

      Collapse

      • 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, detection...
        Today, 06:46 AM
      • 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
        ...
        10-14-2026, 09:55 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 10-28-2026, 09:57 AM
      0 responses
      23 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-28-2026, 09:51 AM
      0 responses
      15 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 11:13 AM
      0 responses
      68 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      48 views
      0 reactions
      Last Post SEQadmin2  
      Working...