VCF file
1
0
Entering edit mode
2.4 years ago
Nameless • 0

Hi,

I'm Beginner. I have bed, bai and bam file. I need to convert bed file to VCF file. I've tried use SURVIVOR software but something went wrong and I received empty file. Could you help me?

VCF Bed • 1.5k views
ADD COMMENT
2
Entering edit mode

You cannot "convert" a generic bed file to a VCF file - they usually contain vastly different information. Please learn the terminology so you can search better.

You have an alignment file (BAM) and a file with regions of interest (BED). You wish to call variants (which will give you a VCF file) and are interested in variants that fall in your regions on interest.

To do this, you'll need to call variants first then subset the call-set to your regions of interest. Search for protocols to do these two steps and you'll be on the right track.

ADD REPLY
0
Entering edit mode

Thank you for reply.

Just like I said I'm beginner. I've been learing of NGS only 2 months. Your tips are very helpful. I used CNVnator software to called CNVs from all samples. I recived TXT file of CNVs. After doing this, I made BED file from this TXT file. I've done the same for all samples (I mean all animals) and after that, I should compare all CNVs between all animals (to check which CNVs are individual and which are "true" CNVs). My colleague said "you should convert BED file to VCF and then you can probably compare all samples". But he wasn't sure. He recommened me SURVIVOR sofware but it didn't work. I recived empty VCF file. To sum up: I called CNVs using CNVnator and now I would like to compare CNVs of all samples(animals) but I don't know how do it. I've got lost :( I'll thankful for all tips.

ADD REPLY
0
Entering edit mode

You have BED files per sample - look at bedops or bedtools (their intersect operations in particular). Unless you're interested in variants, you don't need to perform variant calling (which the mpileup | call solution below does). In your case, I don't understand why your colleague recommended VCF files - ask them if they recommended that only because they can contain multiple samples, or if they have a different reason. You could literally add a column with the sample name to the BED files, read them into R/GenomicRanges and use findOverlaps if you don't want to do the intersect operations on the shell. I don't understand the need for VCF files here.

ADD REPLY
0
Entering edit mode

Thank you!!! :) Before I saw your another comment I tried to do something on my own. I found bedtools and I used this "multiIntersectBed". I need to compare CNVs from all samples and check which are exist in multiple animals (samples), then I can test these CNVs in laboratory on more number of animals. I recived results but I'm not sure it is ok. What do you think? Is it ok?

ADD REPLY
0
Entering edit mode

I cannot give you any input on the validity of your approach, the most I can do is debug your command. You may want to wait on others' input here and ask your colleagues in the meantime.

ADD REPLY
0
Entering edit mode

Thank you and you've already helped me so much :)

ADD REPLY
0
Entering edit mode
2.4 years ago
raphael.B ▴ 520

You can use bcftools as follows:

bcftools mpileup -f <reference_genome (fasta)> -I -E -a 'FORMAT/DP' -T <your_bed> -Ou <your_bam> | bcftools call -Aim -C alleles -T <your_bed> -Ob -o output.bcf

this will give you a VCF with all positions in your BED.

ADD COMMENT
0
Entering edit mode

Thank you for reply.

ADD REPLY

Login before adding your answer.

Traffic: 1746 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6