Answers.Body: <p>It looks like <code>lumpy</code> <a href="https://github.com/arq5x/lumpy-sv" rel="nofollow noreferrer">looks for breakpoints in your reference</a>. Presumably places where the is a haplotype switch detectable with the data on-hand?</p>
  
  <p>My only thought is that since <code>lumpy</code> is being used to produce the VCF file that it is inherently not looking for insertions. I would suggest running the same BAM file through the GATK best practices pipeline (easier said than done) and vcftools pipeline. If those produce insertions but <code>lumpy</code> does not, it must be due to how <code>lumpy</code> produces the calls. Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-23T08:43:06.453Z
Answers.LastActivityDate: 2018-10-23T08:43:06.453Z
Answers.UserDisplayName: conchoecia
Body: <p>I would like to get some summary statistics on a vcf file from one individual, which has over a million variant calls. I've tried to make a histogram of indel sizes with this command, </p>
  
  <pre><code>vcftools --vcf sample.vcf --out sample --hist-indel-len
  </code></pre>
  
  <p>but it returns an empty file. I see thousands of deletions in the vcf, although strangely no insertions. A typical line in the vcf file I have looks like</p>
  
  <pre><code>NC_025968.3 168363 191 N &lt;DEL&gt; . . SVTYPE=DEL;STRANDS=+-:19;SVLEN=-1026;END=169389;CIPOS=-9,330;CIEND=-152,9;CIPOS95=-3,61;CIEND95=-32,3;IMPRECISE;SU=19;PE=19;SR=0 GT:SU:PE:SR ./.:19:19:0
  </code></pre>
  
  <p>Update: I aligned reads to my reference with BWA MEM, then used samblaster to extract discordant pairs and split-reads. I sorted and indexed the three bam files, then used lumpyexpress to generate the vcf.</p>
  
  <pre><code>samblaster -i sample.sam --excludeDups --addMateTags --maxSplitCount 2 --minNonOverlap 20 | samtools view -S -b - &gt; sample.bam
  
  samtools view -h sample.bam | samblaster -a -e -d sample.disc.sam -s sample.split.sam -o /dev/null
  
  lumpyexpress -B ../sample.sorted.bam -S ../sample.split.sorted.bam -D ../sample.disc.sorted.bam -o sample.vcf 
  </code></pre>
  
  <p>I would like to see the size distribution of deletions, and if possible, figure out why there are no insertions.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-18T09:37:42.150Z
Comments.Text: Hello @Joanne just a note. You can [edit] your question to add details (like the line I have already added for you) or any other progress or idea you will have regarding the question. Usually more details you give, better chances that there will be somebody who will know the answer.
Comments.UserDisplayName: Kamil S Jaron
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-18T14:42:19.393Z
Comments.Text: Just curious, how are you calling this VCF file? If you are using GATK I think there are some options to output only SNPS, or SNPs + indels, or just indels. Also, can you clarify exactly what you mean by summary statistics? Right now it is hard to tell what your question is exactly: IE do you want a size distribution of the deletions that are in there, or do you also want to figure out why insertions are missing from your VCF? If you would like the latter, we'll need info on the commands you used to generate the VCF file.
Comments.UserDisplayName: conchoecia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-19T17:24:33.643Z
Comments.Text: Thanks for the forum protocol tips - I have edited my question to include more details.
Comments.UserDisplayName: Joanne
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-16T18:29:22.210Z
Comments.Text: Thanks for your question, Joanne, and welcome to Bioinformatics SE. Can you post some lines from your VCF file so that we can get a better idea of what is going on? It is hard to tell without looking at the data directly.
Comments.UserDisplayName: conchoecia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-18T00:51:50.373Z
Comments.Text: Thanks for the welcome! Here is a typical line: `NC_025968.3     168363  191     N       <DEL>   .       .       SVTYPE=DEL;STRANDS=+-:19;SVLEN=-1026;END=169389;CIPOS=-9,330;CIEND=-152,9;CIPOS95=-3,61;CIEND95=-32,3;IMPRECISE;SU=19;PE=19;SR=0        GT:SU:PE:SR     ./.:19:19:0`
Comments.UserDisplayName: Joanne
Tags: <vcf><ngs><vcftools>
Title: vcftools: indel size histogram command returns empty file
ThreadText: # vcftools: indel size histogram command returns empty file
  
  (Asked by: username_0 on 2018-10-15)
  
  I would like to get some summary statistics on a vcf file from one individual, which has over a million variant calls. I've tried to make a histogram of indel sizes with this command,
  
  ```
  vcftools --vcf sample.vcf --out sample --hist-indel-len
  
  ```
  
  but it returns an empty file. I see thousands of deletions in the vcf, although strangely no insertions. A typical line in the vcf file I have looks like
  
  ```
  NC_025968.3 168363 191 N <DEL> . . SVTYPE=DEL;STRANDS=+-:19;SVLEN=-1026;END=169389;CIPOS=-9,330;CIEND=-152,9;CIPOS95=-3,61;CIEND95=-32,3;IMPRECISE;SU=19;PE=19;SR=0 GT:SU:PE:SR ./.:19:19:0
  
  ```
  
  Update: I aligned reads to my reference with BWA MEM, then used samblaster to extract discordant pairs and split-reads. I sorted and indexed the three bam files, then used lumpyexpress to generate the vcf.
  
  ```
  samblaster -i sample.sam --excludeDups --addMateTags --maxSplitCount 2 --minNonOverlap 20 | samtools view -S -b - > sample.bam
  
  samtools view -h sample.bam | samblaster -a -e -d sample.disc.sam -s sample.split.sam -o /dev/null
  
  lumpyexpress -B ../sample.sorted.bam -S ../sample.split.sorted.bam -D ../sample.disc.sorted.bam -o sample.vcf 
  
  ```
  
  I would like to see the size distribution of deletions, and if possible, figure out why there are no insertions.
  
  **Tags:** vcf, ngs, vcftools
  
  > **Comments:**
  > **username_2**: Thanks for your question, username_0, and welcome to Bioinformatics SE. Can you post some lines from your VCF file so that we can get a better idea of what is going on? It is hard to tell without looking at the data directly.  
  > **username_0**: Thanks for the welcome! Here is a typical line: `NC_025968.3     168363  191     N       <DEL>   .       .       SVTYPE=DEL;STRANDS=+-:19;SVLEN=-1026;END=169389;CIPOS=-9,330;CIEND=-152,9;CIPOS95=-3,61;CIEND95=-32,3;IMPRECISE;SU=19;PE=19;SR=0        GT:SU:PE:SR     ./.:19:19:0`  
  > **username_1**: Hello @username_0 just a note. You can [edit] your question to add details (like the line I have already added for you) or any other progress or idea you will have regarding the question. Usually more details you give, better chances that there will be somebody who will know the answer.  
  > **username_2**: Just curious, how are you calling this VCF file? If you are using GATK I think there are some options to output only SNPS, or SNPs + indels, or just indels. Also, can you clarify exactly what you mean by summary statistics? Right now it is hard to tell what your question is exactly: IE do you want a size distribution of the deletions that are in there, or do you also want to figure out why insertions are missing from your VCF? If you would like the latter, we'll need info on the commands you used to generate the VCF file.  
  > **username_0**: Thanks for the forum protocol tips - I have edited my question to include more details.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-10-23. Score: 1
  
  It looks like `lumpy` [looks for breakpoints in your reference](https://github.com/arq5x/lumpy-sv). Presumably places where the is a haplotype switch detectable with the data on-hand?
  
  My only thought is that since `lumpy` is being used to produce the VCF file that it is inherently not looking for insertions. I would suggest running the same BAM file through the GATK best practices pipeline (easier said than done) and vcftools pipeline. If those produce insertions but `lumpy` does not, it must be due to how `lumpy` produces the calls. Good luck!
  
  
  ---
  
  