Answers.Body: <p>Hello and welcome to the world of bioinformatics,</p>
  
  <p>BAM files are compressed formats of SAM and you can read more about it <a href="https://samtools.github.io/hts-specs/SAMv1.pdf" rel="nofollow noreferrer">here</a>.</p>
  
  <p>To answer your question, I presume that your BAM is generated from a Whole Genome library preparation. Calling mutations on a Whole Genome takes a longer time than a Whole Exome since you are looking at every position instead of the exons of your genome.</p>
  
  <p>What you are looking for is a special format of files called <a href="https://samtools.github.io/hts-specs/VCFv4.3.pdf" rel="nofollow noreferrer">Variant Caller Format (VCF)</a> generated by Variant Callers tools listed below in comparison studies. There isn't a tool better than another, they all have their advantages and disadvantages. I suggest that you read about them as they also describe their pipeline approaches.</p>
  
  <ol>
  <li><a href="https://www.nature.com/articles/s41598-018-36177-7.pdf" rel="nofollow noreferrer">Comparison of three variant callers for human whole genome sequencing</a></li>
  <li><a href="https://bmcbioinformatics.biomedcentral.com/track/pdf/10.1186/s12859-018-2440-7" rel="nofollow noreferrer">Comparing the performance of selected variant callers using synthetic data and genome segmentation</a></li>
  <li><a href="https://bmcbioinformatics.biomedcentral.com/track/pdf/10.1186/s12859-019-2928-9" rel="nofollow noreferrer">Performance assessment of variant calling pipelines using human whole exome sequencing and simulated data</a></li>
  <li><a href="https://www.nature.com/articles/s41598-019-45835-3.pdf" rel="nofollow noreferrer">Systematic comparison of germline variant calling pipelines cross multiple next-generation sequencers</a></li>
  <li><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3785481/pdf/pone.0075619.pdf" rel="nofollow noreferrer">Variant Callers for Next-Generation Sequencing Data: A Comparison Study</a></li>
  </ol>
  
  <p>Once the VCF is generated, you will also have a column named <code>AF</code> which corresponds to the allele frequency also computed when using these tools. There are tools that allow you to filter VCF files to extract the needed information with a wished criteria like <a href="http://snpeff.sourceforge.net/SnpSift.html" rel="nofollow noreferrer">SnpSift</a>,  <a href="https://vcftools.github.io/index.html" rel="nofollow noreferrer">vcftools</a>, <a href="https://gatk.broadinstitute.org/hc/en-us/articles/360037434691-VariantFiltration" rel="nofollow noreferrer">VariantFiltration</a>. So, I suggest reading the above articles as a start.</p>
  
  <p>As for building pipelines, it depends on what language you feel at ease at. However, if I could suggest, <a href="https://www.nextflow.io/" rel="nofollow noreferrer">Nextflow</a> is a good start. You can also use <a href="https://snakemake.readthedocs.io/en/stable/" rel="nofollow noreferrer">Snakemake</a> if you like Python. Or maybe simply <code>bash</code> ? In any case, there are many pipelines already made to help you through your needs.</p>
  
  <p>(If this helps, don't forget to either accept the answer, vote the answer or both).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-09T08:19:25.367Z
Answers.LastActivityDate: 2020-04-09T08:19:25.367Z
Answers.UserDisplayName: user324810
Body: <p>I have a Human genome sequenced in a BAM file (along with other files with the indels, snps, cnvs).</p>
  
  <p>I want to find every mutation with regards to the reference Human genome. However the majority of "variants" are noise/read errors. I am therefore required to filter the variants via a minimum threshold based on allele freq (eg. 0,5).</p>
  
  <p>Using a reference (eg Hg19), how can I find the position of every mutation where the allele frequency is greater than the threshold?</p>
  
  <p>PS. I am just starting, so I don't know which are the best (command line?) tools for the job nor how to build a pipeline for this.</p>
  
  <p>Help would be greatly appreciated</p>
  
Tags: <genome><ngs><variant-calling><allele-frequency><hgp>
Title: How can I find the position of every mutation where the Allele Frequency is greater than X, in regards to a reference such as Hg19?
ThreadText: # How can I find the position of every mutation where the Allele Frequency is greater than X, in regards to a reference such as Hg19?
  
  (Asked by: username_0 on 2020-04-08)
  
  I have a Human genome sequenced in a BAM file (along with other files with the indels, snps, cnvs).
  
  I want to find every mutation with regards to the reference Human genome. However the majority of "variants" are noise/read errors. I am therefore required to filter the variants via a minimum threshold based on allele freq (eg. 0,5).
  
  Using a reference (eg Hg19), how can I find the position of every mutation where the allele frequency is greater than the threshold?
  
  PS. I am just starting, so I don't know which are the best (command line?) tools for the job nor how to build a pipeline for this.
  
  Help would be greatly appreciated
  
  **Tags:** genome, ngs, variant-calling, allele-frequency, hgp
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-04-09. Score: 2
  
  Hello and welcome to the world of bioinformatics,
  
  BAM files are compressed formats of SAM and you can read more about it [here](https://samtools.github.io/hts-specs/SAMv1.pdf).
  
  To answer your question, I presume that your BAM is generated from a Whole Genome library preparation. Calling mutations on a Whole Genome takes a longer time than a Whole Exome since you are looking at every position instead of the exons of your genome.
  
  What you are looking for is a special format of files called [Variant Caller Format (VCF)](https://samtools.github.io/hts-specs/VCFv4.3.pdf) generated by Variant Callers tools listed below in comparison studies. There isn't a tool better than another, they all have their advantages and disadvantages. I suggest that you read about them as they also describe their pipeline approaches.
  
  1. [Comparison of three variant callers for human whole genome sequencing](https://www.nature.com/articles/s41598-018-36177-7.pdf)
  2. [Comparing the performance of selected variant callers using synthetic data and genome segmentation](https://bmcbioinformatics.biomedcentral.com/track/pdf/10.1186/s12859-018-2440-7)
  3. [Performance assessment of variant calling pipelines using human whole exome sequencing and simulated data](https://bmcbioinformatics.biomedcentral.com/track/pdf/10.1186/s12859-019-2928-9)
  4. [Systematic comparison of germline variant calling pipelines cross multiple next-generation sequencers](https://www.nature.com/articles/s41598-019-45835-3.pdf)
  5. [Variant Callers for Next-Generation Sequencing Data: A Comparison Study](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3785481/pdf/pone.0075619.pdf)
  
  Once the VCF is generated, you will also have a column named `AF` which corresponds to the allele frequency also computed when using these tools. There are tools that allow you to filter VCF files to extract the needed information with a wished criteria like [SnpSift](http://snpeff.sourceforge.net/SnpSift.html), [vcftools](https://vcftools.github.io/index.html), [VariantFiltration](https://gatk.broadinstitute.org/hc/en-us/articles/360037434691-VariantFiltration). So, I suggest reading the above articles as a start.
  
  As for building pipelines, it depends on what language you feel at ease at. However, if I could suggest, [Nextflow](https://www.nextflow.io/) is a good start. You can also use [Snakemake](https://snakemake.readthedocs.io/en/stable/) if you like Python. Or maybe simply `bash` ? In any case, there are many pipelines already made to help you through your needs.
  
  (If this helps, don't forget to either accept the answer, vote the answer or both).
  
  
  ---
  
  