text: user15183: After sequencing (Illumina) of some DNA, I generated a sam file through alignment of a fastq file (using Bowtie2). Instead of using variant calling programs, I want to know the specific variances, compared to the reference genome, in each specific read.
  For example, I'm only interested in C to A mutations. I would like to include reads that contain MORE than 5 C to A mutations. Afterwards I would like to analyze the specific sequence context of that mutation and for doing that I need to know the 3 nucleotides before and after the C to A mutation, which gives a context of NNNCNNN.
  I looked at samtools mpileup or bcftools, but I can't find the exact thing that I want to analyze. Any ideas?
  Thank you!
  
  user298: If you want to look at a few, specific reads manually, you can do this on VarSome. We have recently released a new feature that allows you to enter single NGS or Sanger reads and get the list of variants detected in that read. For example, here:
  
  In this example, there was one variant identified when comparing to the human hg38 genome assembly:
  
  CYP24A1(NM_000782.5):c.1186C>T which is at chr20:54158136 G⇒A (note that the CYP24A1 gene is on the - strand which is why the C to T variant in HGVS notation is a G to A in the genome). You can then click on the variant link(s) to investigate the variant's effect and annotation.
  
  Obviously, this isn't practical for many reads, but it can be handy if you just want to look at a few manually. More importantly, NGS is very error prone (which is why we sequence at high depth), and you should absolutely not assume that just because a variant is present in a single read it was also actually present in the source DNA you sequenced.
  
  Disclaimer: I work for the company that builds VarSome.
  
  user-1: That kind of custom fiddling with reads and variants is very cumbersome, non-standard and also error-prone. Do a standard variant calling pipeline and then filter for the mutations that you want. Then extract the variant position (so the coordinates) and get the variant context from the reference genome. Using individual reads for this is not advisable as only a properly called variant is reliable. The power of NGS is the validation of an observation by redundancy (=many reads covering a variant). With individual reads your variant can simply be noise, there is hardly a way to tell. Alignment will confidently map the read to the "context" as you call it, so in my opinion there is not really an advantage of calling the "context" directly from individual reads. You could better extract every confident C>A mutation, then get the three bases up/downstream and then make some kind of position frequency matrix to create a motif.
  Example, just for illustration, imagine these were for variants (A in the middle) with three bases up/downstream:
  CTAATTG
  CTCATAG
  CTTATAG
  CCTAGTG
  
  The motif would then be this, you can easily see whether there is some conservation in the "context" of your variant.ad
  
  The variant calling you could do with an end-to-end pipeline such as nf-core sarek, this will eventually give you a VCF file(s) with the variant coordinates. From there simply filter for the variants you want, get the coordinate, add three bases up/downstream to start/end and then use something like bedtools getfasta to get the sequences from the reference genome.
  
original_text: 15183: <p>After sequencing (Illumina) of some DNA, I generated a sam file through alignment of a fastq file (using Bowtie2). Instead of using variant calling programs, I want to know the specific variances, compared to the reference genome, in each specific read.</p>
  <p>For example, I'm only interested in C to A mutations. I would like to include reads that contain MORE than 5 C to A mutations. Afterwards I would like to analyze the specific sequence context of that mutation and for doing that I need to know the 3 nucleotides before and after the C to A mutation, which gives a context of NNNCNNN.</p>
  <p>I looked at samtools mpileup or bcftools, but I can't find the exact thing that I want to analyze. Any ideas?</p>
  <p>Thank you!</p>
   298: <p>If you want to look at a few, specific reads manually, you can do this on <a href="https://varsome.com/" rel="nofollow noreferrer">VarSome</a>. We have recently released a new feature that allows you to enter single NGS or Sanger reads and get the list of variants detected in that read. For example, <a href="https://varsome.com/single-read/hg38/AGTCCRAGTTGTAAATGGTACACTCGGCGTAAGCCTGAAAAGATAAAATCAAAGATGTAAAGGTGAGCACAGTCTAAGTTCTCTCTGAAGTGTCAATGGGAATGCAGATTGGATTAAATAAATGCTGCCCAAGTGCATACTCAAAGAGGC" rel="nofollow noreferrer">here</a>:</p>
  <p><a href="https://i.stack.imgur.com/pawMJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pawMJ.png" alt="screenshot of VarSome showing an aligned read" /></a></p>
  <p>In this example, there was one variant identified when comparing to the human hg38 genome assembly:</p>
  <ul>
  <li><a href="https://varsome.com/variant/hg38/CYP24A1(NM_000782.5):c.1186C%3ET" rel="nofollow noreferrer">CYP24A1(NM_000782.5):c.1186C&gt;T</a> which is at chr20:54158136 G⇒A (note that the CYP24A1 gene is on the - strand which is why the C to T variant in HGVS notation is a G to A in the genome). You can then click on the variant link(s) to investigate the variant's effect and annotation.</li>
  </ul>
  <p>Obviously, this isn't practical for many reads, but it can be handy if you just want to look at a few manually. More importantly, NGS is very error prone (which is why we sequence at high depth), and you should absolutely not assume that just because a variant is present in a single read it was also actually present in the source DNA you sequenced.</p>
  <hr />
  <p>Disclaimer: I work for the company that builds VarSome.</p>
   -1: <p>That kind of custom fiddling with reads and variants is very cumbersome, non-standard and also error-prone. Do a standard variant calling pipeline and then filter for the mutations that you want. Then extract the variant position (so the coordinates) and get the variant context from the reference genome. Using individual reads for this is not advisable as only a properly called variant is reliable. The power of NGS is the validation of an observation by redundancy (=many reads covering a variant). With individual reads your variant can simply be noise, there is hardly a way to tell. Alignment will confidently map the read to the &quot;context&quot; as you call it, so in my opinion there is not really an advantage of calling the &quot;context&quot; directly from individual reads. You could better extract every confident C&gt;A mutation, then get the three bases up/downstream and then make some kind of position frequency matrix to create a motif.</p>
  <p>Example, just for illustration, imagine these were for variants (A in the middle) with three bases up/downstream:</p>
  <pre><code>CTAATTG
  CTCATAG
  CTTATAG
  CCTAGTG
  </code></pre>
  <p>The motif would then be this, you can easily see whether there is some conservation in the &quot;context&quot; of your variant.ad</p>
  <p><a href="https://i.stack.imgur.com/WaU9C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WaU9C.png" alt="enter image description here" /></a></p>
  <p>The variant calling you could do with an end-to-end pipeline such as <a href="https://nf-co.re/sarek" rel="nofollow noreferrer">nf-core sarek</a>, this will eventually give you a VCF file(s) with the variant coordinates. From there simply filter for the variants you want, get the coordinate, add three bases up/downstream to start/end and then use something like <code>bedtools getfasta</code> to get the sequences from the reference genome.</p>
  