2
$\begingroup$

I need a Software or Python Program for Converting VCF(.vcf) to FASTA(.fa) format with the help of reference (.fa)

$\endgroup$
3
2
$\begingroup$

I used FastaAlternateReferenceMaker previously. You will need to download GATK first. Next you prepare your reference genome (reference.fasta) and your vcf file (input.vcf). You will call the GATK function like this:

 java -jar GenomeAnalysisTK.jar \
   -T FastaAlternateReferenceMaker \
   -R reference.fasta \
   -o output.fasta \
   -V input.vcf \

output.fasta will contain the new fasta with snps inserted at sites specific by the vcf file

$\endgroup$
3
  • $\begingroup$ I got this error when I used gatk on a Linux plaftorm: A USER ERROR has occurred: Input files reference and features have incompatible contigs: No overlapping contigs found. $\endgroup$ May 14 '21 at 11:41
  • $\begingroup$ your chromosome names are different $\endgroup$
    – StupidWolf
    May 14 '21 at 11:50
  • $\begingroup$ how do I resolve this please? Additionally, the vcf files are from somewhere external and I actually subset it to get a specific sample. my reference is ftp.ncbi.nlm.nih.gov/refseq/H_sapiens/annotation/GRCh38_latest/… $\endgroup$ May 14 '21 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.