This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Having a deletion coordinates how to know in which gene this is?

I have a VCF files with big deletions and I want to know if these deletion are in (completly or partially) of a particular gene. I want to basically know the gene names affected by these deletions

ngs

3 answers

Simply annotate your VCF file using any of the program; ChIPseeker, MEME, bcftools ... the list is long. I am demonstrating bcftools here:

   bcftools annotate  -a genes.bed.gz  -c CHROM,FROM,TO,GENE  -h <(echo '##INFO=ID=GENE,Number=1,Type=String,Description="Gene name">')  variants.vcf.gz

A few things to note:

  • genes.bed.gz must be a standard BED file that has been zipped using bgzip (bgzip genes.bed)
    • genes.bed.gz must indexed using tabix (tabix -p bed genes.bed.gz)
    • genes.bed.gz does not need a header (we define this with the -c option instead)
    • CHROM', 'FROM', and 'TO' are required to be passed to the -c option, but these columns do not actually get added to your VCF (only the '- GENE' will get added)
    • Because we're not annotating from a VCF/BCF file, the -h option is required (it will not work otherwise)
    • Whatever we pass to the -h option will simply get added to the VCF meta-information

what have you tried so far?

quick search should give you half the solution already (bedtools intersect)

Thanks for the answer.

If I do this, I would need a dataset with genes name and their coordinates wouldn't I?

yes indeed. a GFF or GTF or such file with the gene annotations or bed-file might be even more suited.

many thanks for your help

Besides everything that was already said, you can also try using AnnotSV for this task.

Log in to answer this question.