<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>

CC BY-SA 3.0
2018-02-27T16:36:49.890Z
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.
terdon
CC BY-SA 3.0
2018-03-08T13:35:13.810Z
@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.
WagonWheelWilly
CC BY-SA 3.0
2018-02-27T15:15:03.227Z
2018-02-27T15:15:03.227Z
benn
<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>

CC BY-SA 3.0
2018-02-27T16:35:59.867Z
What is "MyGenome" exactly? Will they sequence your entire genome? Only your exome? Specific regions of the exome?
terdon
CC BY-SA 3.0
2018-02-27T16:39:07.147Z
@terdon Whole genome 30X on HiseqX. [Link](https://www.veritasgenetics.com/sites/default/files/media/documents/VG_ProductOnePager_myGenome_email.pdf)
benn
CC BY-SA 3.0
2018-02-27T16:42:58.100Z
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.
terdon
CC BY-SA 3.0
2018-02-27T16:58:06.123Z
@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.
benn
CC BY-SA 3.0
2018-02-27T17:03:49.887Z
@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.
terdon
CC BY-SA 3.0
2018-02-27T17:45:14.357Z
Good chance you guess right. OP might want to verify with MyGenome first, whether all variants are reported in VCF file.
benn
CC BY-SA 3.0
2018-02-27T20:32:00.183Z
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)
gringer
CC BY-SA 3.0
2018-02-28T12:18:26.153Z
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.
Wouter De Coster
<fasta><vcf><ngs><file-formats><variant-calling>
Can a data file in VCF format be converted into FASTA?
# 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**: @terdon 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**: @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.  
> **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 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.  

---

