This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how transfer a vcf-file to fasta-format

Hello!

This is a well-known genome, the genes are selected. There is a reference genome plus genomes of many stains.

I need to learn how to transfer the genome in vcf-format to the fasta-format for each gene.

I need to build the aligmnent for each gene somehow.

Would you be so kind to help me with this task? Many Thanks! Natasha

vcf

2 answers

Please follow a somewhat similar post: A: Substituting Snps On Reference Genome Assemblies

This post will help you to perform the substitution at the whole genome level.

If you are only substituting SNPs then the genomic coordinates for genes won't change but if your vcf file contains indels then you will have to create a new gene annotation file that keeps track of the changed coordinates. The program that comes with alleleseq creates a liftover chain file that can be used with gff file.

Then you can use samtools faidx tool to extract the strain-specific gene sequence by using the chromosome, start and end coordinates from the new annotation file.

Many-many thanks! I will try it.

Natasha

New Fasta Sequence From Reference Fasta And Variant Calls File? this answer may help

Many-many thanks. I will study these examples!

Natasha

Log in to answer this question.