Plink bed files not recognized by samtools or bedtools
1
1
Entering edit mode
9.7 years ago
gui.casas ▴ 10

Hello,

I am trying to convert a .bam file to a .pileup using samtools and filtering the sites via a .bed file I obtained from plink. However, when I type the command

samtools mpileup -f ../../HG19/hg19.fasta -l ../../reference_population/Total_Reference/Total_Reference.bed 26305300.rmdup.bam

I get the error message

[bed_read] Parse error reading ../../reference_population/Total_Reference/Total_Reference.bed at line 1
samtools: Could not read file "../../reference_population/Total_Reference/Total_Reference.bed": Success

It works well if you remove the -l flag, so I tried bedtools intersect to filter the .bam file and then use samtools, but I got the error

Error: Unable to determine type for file ../../reference_population/Total_Reference/Total_Reference.bed

I have tried using both plink 1.07 and plink 1.9 and the result was the same. Can anyone shed a light on this please?

software-error next-gen • 3.5k views
ADD COMMENT
1
Entering edit mode
9.7 years ago
Caddymob ▴ 1000

A plink bed file is a binary PED, not a text BED - totally different... See the UCSC page for the format.

ADD COMMENT
0
Entering edit mode

That explains a lot... Thanks! I think I would have spent another week or so searching what was going wrong xD

ADD REPLY

Login before adding your answer.

Traffic: 1365 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