Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing ./spoNA.xml file failed, please check the file! Parharn Bioinformatics 15 06-24-2014 10:19 AM
Parsing reads from SAM/BAM by orientation winsettz Bioinformatics 2 09-19-2013 05:16 PM
Tool for counting mismatches in hundreds of files? pepperoni Bioinformatics 3 09-13-2013 07:25 PM
Parsing sam file for %id + %length cutoff jmartin Bioinformatics 0 06-26-2013 11:03 AM
bowtie sam output, number of mismatches sridharacharya Bioinformatics 2 01-08-2011 05:22 PM

Thread Tools
Old 01-23-2015, 01:13 PM   #1
Junior Member
Location: Stanford, CA, USA

Join Date: Oct 2010
Posts: 4
Default 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!


Carlo is offline   Reply With Quote
Old 01-23-2015, 08:49 PM   #2
Registered Vendor
Location: Eugene, OR

Join Date: May 2013
Posts: 489

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.
SNPsaurus is offline   Reply With Quote
Old 01-24-2015, 01:13 AM   #3
Senior Member
Location: France

Join Date: Apr 2010
Posts: 143

I wrote SAM2Tsv :

$ java -jar dist/sam2tsv.jar -A  \
    -r samtools-0.1.18/examples/toy.fa 
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
lindenb is offline   Reply With Quote

perl, rna-seq, sam

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 10:23 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO