Answers.Body: <p>Another approach is <a href="https://github.com/lh3/htsbox" rel="noreferrer">htsbox</a>. You can get a candidate list with:</p>
  
  <pre><code>htsbox pileup -Cvcf ref.fa -q20 -Q20 -s5 file.bam &gt; out.vcf
  </code></pre>
  
  <p>Here, <code>-q</code> sets min mapping quality, <code>-Q</code> sets min base quality, <code>-v</code> outputs variants only <code>-c</code> outputs VCF, <code>-C</code> gives you base counts on both strands and finally <code>-s5</code> requires at least 5 high-quality bases to call out an allele. It is useful when your data are failing the assumptions made by typical variant callers.</p>
  
  <p>Why not samtools+bcftools or varscan? Transparency and speed. This command line simply counts based on the parameters you use. It does not apply additional operations. And because of this, it is over an order of magnitude faster than samtools mpileup or varscan. It is worth noting that samtools uses BAQ by default, which reduces FPs occasionally. However, BAQ is not quite necessary for longer Illumina reads and it hurts sensitivity at the same time.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-30T13:24:08.897Z
Answers.Text: I am definitely going to try htsbox, as you say it works by simply counting based on the parameters.
Answers.UserDisplayName: 719016
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-29T14:47:26.867Z
Answers.LastActivityDate: 2017-05-29T14:47:26.867Z
Answers.UserDisplayName: user172818
Answers.Body: <p>I used this in the past for ChIP-seq data and it generated SNVs:</p>
  
  <pre><code>samtools mpileup \
  --uncompressed --max-depth 10000 --min-MQ 20 --ignore-RG --skip-indels \
  --fasta-ref ref.fa file.bam \
  | bcftools call --consensus-caller \
  &gt; out.vcf
  </code></pre>
  
  <p>This was samtools 1.3 in case that makes a difference.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-27T09:08:38.647Z
Answers.Text: I got it to work with these parameters. Thanks!
Answers.UserDisplayName: 719016
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-27T01:16:15.507Z
Answers.LastActivityDate: 2017-05-27T01:16:15.507Z
Answers.UserDisplayName: burger
Body: <p>I am running samtools mpileup (v1.4) on a bam file with very choppy coverage (ChIP-seq style data). I want to get a first-pass list of positions with SNVs and their frequency as reported by the read counts, but no matter what I do, I keep getting all SNVs filtered out as not passing QC.</p>
  
  <p>What's the magic parameter set for an initial list of SNVs and frequencies?</p>
  
  <p>EDIT: this is a question I posted on "the other" website, but didn't get a reply there.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-26T14:54:24.997Z
Comments.Text: Would you be able to try another caller just to check? Something like [varscan](http://dkoboldt.github.io/varscan/)?
Comments.UserDisplayName: nuin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-26T15:32:34.150Z
Comments.Text: @nuin I may give it a try, does varscan allow for switching off the filtering?
Comments.UserDisplayName: 719016
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-26T16:25:56.197Z
Comments.Text: Could you add some examples of commands you tried?
Comments.UserDisplayName: bli
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-26T17:40:01.367Z
Comments.Text: @719016 Try this [command](http://dkoboldt.github.io/varscan/using-varscan.html#v2.‌​3_pileup2snp), and change options like _--min-coverage _, _--min-reads2_ and _--min-avg-qual_. This will also help you check if your problem is samtools related or BAM file related
Comments.UserDisplayName: nuin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-31T14:55:08.560Z
Comments.Text: am just a bit worried that if the depth is not high and also ChIP-Seq data has biases then it is not high confidence SNPs. The whole point of HC SNP are the read depth as well which is not so much in traditional ChIP-Seq
Comments.UserDisplayName: ivivek_ngs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-31T15:42:57.447Z
Comments.Text: Yes, maybe the calling should be restricted to near peak summits, then compare sample to sample on the subset of such SNVs
Comments.UserDisplayName: 719016
Tags: <variant-calling><samtools><chip-seq><mpileup>
Title: variant calling on ChIP-seq style data: samtools mpileup with minimal filters
ThreadText: # variant calling on ChIP-seq style data: samtools mpileup with minimal filters
  
  (Asked by: username_0 on 2017-05-26)
  
  I am running samtools mpileup (v1.4) on a bam file with very choppy coverage (ChIP-seq style data). I want to get a first-pass list of positions with SNVs and their frequency as reported by the read counts, but no matter what I do, I keep getting all SNVs filtered out as not passing QC.
  
  What's the magic parameter set for an initial list of SNVs and frequencies?
  
  EDIT: this is a question I posted on "the other" website, but didn't get a reply there.
  
  **Tags:** variant-calling, samtools, chip-seq, mpileup
  
  > **Comments:**
  > **username_1**: Would you be able to try another caller just to check? Something like [varscan](http://dkoboldt.github.io/varscan/)?  
  > **username_0**: @username_1 I may give it a try, does varscan allow for switching off the filtering?  
  > **username_2**: Could you add some examples of commands you tried?  
  > **username_1**: @username_0 Try this [command](http://dkoboldt.github.io/varscan/using-varscan.html#v2.‌​3_pileup2snp), and change options like _--min-coverage _, _--min-reads2_ and _--min-avg-qual_. This will also help you check if your problem is samtools related or BAM file related  
  > **username_3**: am just a bit worried that if the depth is not high and also ChIP-Seq data has biases then it is not high confidence SNPs. The whole point of HC SNP are the read depth as well which is not so much in traditional ChIP-Seq  
  > **username_0**: Yes, maybe the calling should be restricted to near peak summits, then compare sample to sample on the subset of such SNVs  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_5 on 2017-05-27. Score: 7 | Accepted answer
  
  I used this in the past for ChIP-seq data and it generated SNVs:
  
  ```
  samtools mpileup \
  --uncompressed --max-depth 10000 --min-MQ 20 --ignore-RG --skip-indels \
  --fasta-ref ref.fa file.bam \
  | bcftools call --consensus-caller \
  > out.vcf
  
  ```
  
  This was samtools 1.3 in case that makes a difference.
  
  > **Comments:**
  > **username_0**: I got it to work with these parameters. Thanks!  
  
  ---
  
  ### Answer by username_4 on 2017-05-29. Score: 5
  
  Another approach is [htsbox](https://github.com/lh3/htsbox). You can get a candidate list with:
  
  ```
  htsbox pileup -Cvcf ref.fa -q20 -Q20 -s5 file.bam > out.vcf
  
  ```
  
  Here, `-q` sets min mapping quality, `-Q` sets min base quality, `-v` outputs variants only `-c` outputs VCF, `-C` gives you base counts on both strands and finally `-s5` requires at least 5 high-quality bases to call out an allele. It is useful when your data are failing the assumptions made by typical variant callers.
  
  Why not samtools+bcftools or varscan? Transparency and speed. This command line simply counts based on the parameters you use. It does not apply additional operations. And because of this, it is over an order of magnitude faster than samtools mpileup or varscan. It is worth noting that samtools uses BAQ by default, which reduces FPs occasionally. However, BAQ is not quite necessary for longer Illumina reads and it hurts sensitivity at the same time.
  
  > **Comments:**
  > **username_0**: I am definitely going to try htsbox, as you say it works by simply counting based on the parameters.  
  
  ---
  
  