Hi,
I used Bedtools to convert BAM to BED format for my sequencing data. But together with BED I need the corresponding BIM and FAM files, which are not generated automatically by it. Now, I work with PLINK which has an option to convert such files but the input file should be PED and I couldnt find anyway to convert BAM to PED. It would be really helpful if anyone can suggest me a way for conversion of BAM to BED/BIM/FAM files.
Thank you
1 answer
I think you need to read up on what the BIM and FAM formats are to understand why you cannot go directly from BAM to those formats. You should use a variant calling algorithm (e.g. GATK or FreeBayes) to produce a VCF file from your BAM file. After this, you could use PLINK-SEQ to convert the VCF file to the standard PLINK formats such as MAP/BIM and FAM.
In short, the BAM format (and VCF for that matter) have insufficient information from which to create complete BIM/FAM files.
Log in to answer this question.