Answers.Body: <p>You can try <a href="https://software.broadinstitute.org/gatk/documentation/tooldocs/3.8-0/org_broadinstitute_gatk_tools_walkers_fasta_FastaAlternateReferenceMaker.php" rel="noreferrer">gatk</a> function <code>FastaAlternateReferenceMaker</code></p>
  
  <pre><code>java -jar GenomeAnalysisTK.jar \
     -T FastaAlternateReferenceMaker \
     -R reference.fasta \
     -o output.fasta \
     -L input.intervals \
     -V input.vcf \
     [--snpmask mask.vcf]
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-27T16:36:49.890Z
Answers.Text: It might be worth pointing out that this will only reconstruct the OP's genome if the OP has WGS data. If not, I this tool will presumably use the reference genome for everything not explicitly mentioned in the file, so it won't be the OP's genome, per se.
Answers.UserDisplayName: terdon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-08T13:35:13.810Z
Answers.Text: @b.nota thank you for your answer. Just want to let you know that I've contacted veritas support for more information (still awaiting their response) and will accept your answer once I'm able to confirm that this works.
Answers.UserDisplayName: WagonWheelWilly
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-27T15:15:03.227Z
Answers.LastActivityDate: 2018-02-27T15:15:03.227Z
Answers.UserDisplayName: benn
Body: <p>I'm considering purchasing the 'MyGenome' product by Veritas Genetics to analyze my genome for a project. I'd like the data to be in FASTA format, but Veritas only provides VCF data. Is it possible to convert this VCF data into FASTA format?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T16:35:59.867Z
Comments.Text: What is "MyGenome" exactly? Will they sequence your entire genome? Only your exome? Specific regions of the exome?
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T16:39:07.147Z
Comments.Text: @terdon Whole genome 30X on HiseqX. [Link](https://www.veritasgenetics.com/sites/default/files/media/documents/VG_ProductOnePager_myGenome_email.pdf)
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T16:42:58.100Z
Comments.Text: Yeah, that doesn't sound like actual whole genome. Or, rather, it sounds like they might sequence the whole genome but then only analyze specific regions of it (which is a reasonable thing to do, I'm not saying they're swindling you). "myGenome is a whole genome ***screening*** test [. . . ]". If so, the method in b.nota's answer won't accurately reconstruct *your* genome, but only those regions of your genome that differ from the reference genome in the regions they happened t screen.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T16:58:06.123Z
Comments.Text: @terdon depends a bit on how they make the VCF file, don't you think? The interpretation is only based on specific regions, but they should have a file with all variants which OP should get for this VCF -> FASTA exercise.
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T17:03:49.887Z
Comments.Text: @b.nota my guess (and it is only a guess) is that they will only do variant calling for targeted regions. That greatly speeds up the process and reduces the resources needed and also possibly protects them from litigation in some countries.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T17:45:14.357Z
Comments.Text: Good chance you guess right. OP might want to verify with MyGenome first, whether all variants are reported in VCF file.
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T20:32:00.183Z
Comments.Text: Possible duplicate of [How to manipulate a reference FASTA or bam to include variants from a VCF?](https://bioinformatics.stackexchange.com/questions/2223/how-to-manipulate-a-reference-fasta-or-bam-to-include-variants-from-a-vcf)
Comments.UserDisplayName: gringer
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-28T12:18:26.153Z
Comments.Text: It's possible to create "a" fasta as discussed, but have my doubts whether that is a useful format for you to work with. But that's not the question, I guess.
Comments.UserDisplayName: Wouter De Coster
Tags: <fasta><vcf><ngs><file-formats><variant-calling>
Title: Can a data file in VCF format be converted into FASTA?
ThreadText: # Can a data file in VCF format be converted into FASTA?
  
  (Asked by: username_0 on 2018-02-27)
  
  I'm considering purchasing the 'MyGenome' product by Veritas Genetics to analyze my genome for a project. I'd like the data to be in FASTA format, but Veritas only provides VCF data. Is it possible to convert this VCF data into FASTA format?
  
  **Tags:** fasta, vcf, ngs, file-formats, variant-calling
  
  > **Comments:**
  > **username_1**: What is "MyGenome" exactly? Will they sequence your entire genome? Only your exome? Specific regions of the exome?  
  > **username_2**: @username_1 Whole genome 30X on HiseqX. [Link](https://www.veritasgenetics.com/sites/default/files/media/documents/VG_ProductOnePager_myGenome_email.pdf)  
  > **username_1**: Yeah, that doesn't sound like actual whole genome. Or, rather, it sounds like they might sequence the whole genome but then only analyze specific regions of it (which is a reasonable thing to do, I'm not saying they're swindling you). "myGenome is a whole genome ***screening*** test [. . . ]". If so, the method in b.nota's answer won't accurately reconstruct *your* genome, but only those regions of your genome that differ from the reference genome in the regions they happened t screen.  
  > **username_2**: @username_1 depends a bit on how they make the VCF file, don't you think? The interpretation is only based on specific regions, but they should have a file with all variants which OP should get for this VCF -> FASTA exercise.  
  > **username_1**: @b.nota my guess (and it is only a guess) is that they will only do variant calling for targeted regions. That greatly speeds up the process and reduces the resources needed and also possibly protects them from litigation in some countries.  
  > **username_2**: Good chance you guess right. OP might want to verify with MyGenome first, whether all variants are reported in VCF file.  
  > **username_3**: Possible duplicate of [How to manipulate a reference FASTA or bam to include variants from a VCF?](https://bioinformatics.stackexchange.com/questions/2223/how-to-manipulate-a-reference-fasta-or-bam-to-include-variants-from-a-vcf)  
  > **username_4**: It's possible to create "a" fasta as discussed, but have my doubts whether that is a useful format for you to work with. But that's not the question, I guess.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-02-27. Score: 5
  
  You can try [gatk](https://software.broadinstitute.org/gatk/documentation/tooldocs/3.8-0/org_broadinstitute_gatk_tools_walkers_fasta_FastaAlternateReferenceMaker.php) function `FastaAlternateReferenceMaker`
  
  ```
  java -jar GenomeAnalysisTK.jar \
     -T FastaAlternateReferenceMaker \
     -R reference.fasta \
     -o output.fasta \
     -L input.intervals \
     -V input.vcf \
     [--snpmask mask.vcf]
  
  ```
  
  > **Comments:**
  > **username_1**: It might be worth pointing out that this will only reconstruct the OP's genome if the OP has WGS data. If not, I this tool will presumably use the reference genome for everything not explicitly mentioned in the file, so it won't be the OP's genome, per se.  
  > **username_0**: @b.nota thank you for your answer. Just want to let you know that I've contacted veritas support for more information (still awaiting their response) and will accept your answer once I'm able to confirm that this works.  
  
  ---
  
  