Question: bam to vcf to .bed
0
gravatar for genomics Newbie
10 weeks ago by
genomics Newbie10 wrote:

Is the following the correct process? I do not believe I can "convert" .bam to .bed directly. I am converting .bam to vcf using bcftools, and then using plink to prepare .bed and .fam files.

bed to vcf using bcftools

vcf to bed using plink

bed + fam using plink

Thank you.

bam bed vcf • 236 views
ADD COMMENTlink modified 10 weeks ago by finswimmer5.4k • written 10 weeks ago by genomics Newbie10
3

I think you're using the word "convert" a little incorrectly here. One cannot "convert" a BAM to a VCF because they do not represent the same information. You can obtain a VCF by processing a BAM with a (reference) FASTA, but cannot convert the BAM to a VCF. You can also extract a BED out of a VCF, but you don't convert it there either. I'd only use "convert" if the information content in the formats is comparable tending to equivalence.

ADD REPLYlink written 10 weeks ago by RamRS17k

You can convert from bam2bed directly http://bedtools.readthedocs.io/en/latest/content/tools/bamtobed.html

Maybe you can elaborate more why you are first convert to vcf?

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by Medhat7.7k

What do you want your bed file to contain? Coordinates of variants? Coordinates of mapped reads?

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by swbarnes24.0k

genomics Newbie : Don't forget to follow up on your threads.

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they all work.
Upvote|Bookmark|Accept

Please do the same for your previous posts as well.

ADD REPLYlink written 10 weeks ago by genomax55k
2
gravatar for WouterDeCoster
10 weeks ago by
Belgium
WouterDeCoster32k wrote:

Important: there are two types of bed files containing entirety different information. The type you want (plink) is not the same as mentioned in the other comments. What you are doing is fine.

ADD COMMENTlink written 10 weeks ago by WouterDeCoster32k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 756 users visited in the last hour