Thanks David. I had actually searched for previous questions on the topic and retrieved nothing! Cheers.
Introducing Known Mutations (From A Vcf) Into A Fasta File
Hi,
This could probably be coded easily enough but I don't want to reinvent the wheel.
Is anyone aware of software that will take a FASTA file and a corresponding VCF file and introduce the mutations from the VCF into the FASTA sequence?
Thanks in advance.
• 12,546 views
•
link
3 answers
This is a duplicate question.
You want the following, from GATK:
java -Xmx2g -jar GenomeAnalysisTK.jar \
-R MY_REFERENCE.fa \
-T FastaAlternateReferenceMaker \
-o MY_REFERENCE_WITH_SNPS_FROM_VCF.fa \
--variant MY_VCF_IN_VCF_4.0_FORMAT.vcf
See also this question and this question.
• 286 views
•
link
• 0 views
•
link
I wrote a script that assumes no overlapping mutations, all biallelic, and tosses the heterozygous sites. Also depends on biopython but just for reading a fasta file so easy to get rid of.
• 0 views
•
link
There is a very well written tool for it. Its called Personnel Genome Constructor.
• 0 views
•
link
Log in to answer this question.
this would make a decent code golf challenge
Alternatively,maybe use FastG.
how do you manage the overlapping mutations and the heterozygous mutations ?
I don't - I was hoping someone else did :) I might pull something together myself but for initial simplicity I would ignore both cases you mention. Neither is important to the downstream testing in my application. I could envisage selecting overlapping mutations randomly. The heterozygous bit would be more complicated. As I said though - neither is important to my particular application.