Question: Extract nucleotide from read at SNP position
gravatar for bdeonovic
4.5 years ago by
United States
bdeonovic180 wrote:

I have read alignments in SAM format, I have read fastqs, I have genome fasta, and I have a VCF file with locations of SNPs. Is there an easy way to pull out the sequenced nucleotide for each read at the SNPs? 

I'm not interested in calling SNPs (this is already done, I have my VCF) but I would like to know what nucleotide a read had at particular SNPs

rna-seq snp sam • 2.3k views
ADD COMMENTlink modified 4.4 years ago by Biostar ♦♦ 20 • written 4.5 years ago by bdeonovic180

The following posts are relevant. There is also a python code in the first post that works with the pileup format. 

C: Calculate The Frequency Of Nucleotides At Each Position In An Mpileup File

Count The Number Of A, T, G And C At Specific Genomic Locations For Multiple Rnaseq Samples

ADD REPLYlink written 4.5 years ago by Ashutosh Pandey12k

SAM has read sequences for each alignment as well as the alignment position -- you can calculate offset into the read that corresponds to your SNP's location and look at the base

ADD REPLYlink written 4.3 years ago by Lynxoid220

I am trying to do the same. Did you find a solution?

ADD REPLYlink written 2.2 years ago by jsena0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1667 users visited in the last hour