text: user8577: 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
  
  user4413: Hello and welcome to the world of bioinformatics,
  BAM files are compressed formats of SAM and you can read more about it here.
  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) 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.
  
  Comparison of three variant callers for human whole genome sequencing
  Comparing the performance of selected variant callers using synthetic data and genome segmentation
  Performance assessment of variant calling pipelines using human whole exome sequencing and simulated data
  Systematic comparison of germline variant calling pipelines cross multiple next-generation sequencers
  Variant Callers for Next-Generation Sequencing Data: A Comparison Study
  
  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,  vcftools, 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 is a good start. You can also use Snakemake 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).
  
original_text: 8577: <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>
   4413: <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>
  