Differing number of BED fields encountered at line: 2. Exiting...

2,767 views
Skip to first unread message

Adrian Johnson

unread,
Jan 11, 2011, 6:59:48 PM1/11/11
to bedtools...@googlegroups.com
Hi aaron,
I have the following error:

Differing number of BED fields encountered at line: 2. Exiting...


intersectBed -a myfile.bed -b genesymbols.bed


(columns in myfile.bed : A, T, G, and C refers to frequencies of bases
at that position. white space means 0 reads. First row, there are 5
reads with G and 2 reads with C. A and T are not present.

chrom from to A T G C
chr20 56105555 56105556 5 2
chr20 53100900 53100901 1
chr20 1406258 1406259 5
chr20 28194670 28194671 2 3


genesymbol.bed

chrom from to frm genesymbol
chr1 67075923 67076067 - WDR78
chr1 67078739 67078942 - WDR78
chr1 67085754 67085949 - WDR78
chr1 67100417 67100573 - WDR78
chr1 67109640 67109780 - WDR78
chr1 67113051 67113208 - WDR78


intersectBed -a myfile.bed -b genesymbols.bed

Differing number of BED fields encountered at line: 2. Exiting...


Thats the error.

Does this mean the myfile.BED has white spaces and it is not accepted.
Is there a way to bypass this error.

thanks
Adrian

Adrian Johnson

unread,
Jan 11, 2011, 7:15:32 PM1/11/11
to bedtools...@googlegroups.com
here my aim is to have :

(For example)
chr20 56105555 56105556 5 2 SRC
chr20 53100900 53100901 1 SYK
chr20 1406258 1406259 5 EGFR
chr20 28194670 28194671 2 3 TGFB


I was doing:

intersectBed - a myfile.bed -b genesymbol.bed -wa -wb | cut -f1,2,3,4,5,6,7,12

thanks
Adrian

Aaron Quinlan

unread,
Jan 12, 2011, 8:37:21 AM1/12/11
to bedtools...@googlegroups.com
Hi Adrian,
Is it not possible to use a zero instead of whitespace for a lack of reads? I think this will solve your problem.

Aaron

Reply all
Reply to author
Forward
0 new messages