Answers.Body: <p>Creating a FASTA file by applying variants found in a VCF file is called "creating a consensus FASTA file". You can use <a href="https://samtools.github.io/bcftools/bcftools.html#consensus" rel="nofollow noreferrer"><code>bcftools consensus</code></a>. Unfortunately, the tools only works genome-wide (at the FASTA level), so you might need to use a different tool to extract a gene sequence from the FASTA file using the gene's co-ordinates.</p>
  
  <p>If the VCF file is annotated with HGVS notations for the variants, there might be a way to use those notations to apply the edit to the reference gene/transcript sequence directly. I know <a href="https://hgvs.readthedocs.io/en/stable/" rel="nofollow noreferrer">the hgvs python module</a> works well with the HGVS notation, but I don't see a way to "apply" the variant to the reference sequence.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-26T16:37:19.170Z
Answers.LastActivityDate: 2020-02-26T16:37:19.170Z
Answers.UserDisplayName: Ram RS
Body: <p>Is there some tool that will convert a vcf/bcf file to some gene annotation, based on the fact that I have the gene annotation of the already exsisting reference genome. Or some tool that will give me the genes based on the most probable chance.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T18:51:59.493Z
Comments.Text: VCF files contain information on variants. Each position in a VCF file can be attributed to a gene (if it falls within a gene), is that what you're looking for? By "gene annotation of the already existing reference genome", are you referring to a GTF/GFF file?
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T19:33:07.580Z
Comments.Text: I believe the question is about using VEP. https://www.ensembl.org/info/docs/tools/vep/index.html maybe?
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T20:46:43.597Z
Comments.Text: People should really stop abusing the word "convert". Does OP wish to annotate their VCF or query a larger dataset based on some data in the VCF or do they think they can actually convert information about variants to information about genes?
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-25T10:23:56.727Z
Comments.Text: I already have annotate my VCF(actually bcf file) file with SnpEff. So I sort of doubt whether it was possible to convert it to information about genes. On one hand it would be logically if it could on a biological perspective, on a technical perspective however, it wouldn't be that strange it that isn't that easy.
Comments.UserDisplayName: hiddenhospitalresearch
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-25T10:24:20.453Z
Comments.Text: Yes I think I need VEP
Comments.UserDisplayName: hiddenhospitalresearch
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-25T13:49:15.853Z
Comments.Text: VEP and snpEff give you similar information, as does ANNOVAR. What is the "information about genes" that you are looking for?
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-26T12:04:31.637Z
Comments.Text: Like what the actual sequence is mutated and by reference
Comments.UserDisplayName: hiddenhospitalresearch
Tags: <vcf><gene>
Title: vcf file to gene annotations and or genes
ThreadText: # vcf file to gene annotations and or genes
  
  (Asked by: username_0 on 2020-02-24)
  
  Is there some tool that will convert a vcf/bcf file to some gene annotation, based on the fact that I have the gene annotation of the already exsisting reference genome. Or some tool that will give me the genes based on the most probable chance.
  
  **Tags:** vcf, gene
  
  > **Comments:**
  > **username_1**: VCF files contain information on variants. Each position in a VCF file can be attributed to a gene (if it falls within a gene), is that what you're looking for? By "gene annotation of the already existing reference genome", are you referring to a GTF/GFF file?  
  > **username_2**: I believe the question is about using VEP. https://www.ensembl.org/info/docs/tools/vep/index.html maybe?  
  > **username_1**: People should really stop abusing the word "convert". Does OP wish to annotate their VCF or query a larger dataset based on some data in the VCF or do they think they can actually convert information about variants to information about genes?  
  > **username_0**: I already have annotate my VCF(actually bcf file) file with SnpEff. So I sort of doubt whether it was possible to convert it to information about genes. On one hand it would be logically if it could on a biological perspective, on a technical perspective however, it wouldn't be that strange it that isn't that easy.  
  > **username_0**: Yes I think I need VEP  
  > **username_1**: VEP and snpEff give you similar information, as does ANNOVAR. What is the "information about genes" that you are looking for?  
  > **username_0**: Like what the actual sequence is mutated and by reference  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-26. Score: 2 | Accepted answer
  
  Creating a FASTA file by applying variants found in a VCF file is called "creating a consensus FASTA file". You can use [`bcftools consensus`](https://samtools.github.io/bcftools/bcftools.html#consensus). Unfortunately, the tools only works genome-wide (at the FASTA level), so you might need to use a different tool to extract a gene sequence from the FASTA file using the gene's co-ordinates.
  
  If the VCF file is annotated with HGVS notations for the variants, there might be a way to use those notations to apply the edit to the reference gene/transcript sequence directly. I know [the hgvs python module](https://hgvs.readthedocs.io/en/stable/) works well with the HGVS notation, but I don't see a way to "apply" the variant to the reference sequence.
  
  
  ---
  
  