Question: Error when using Bedtools fisher on sorted bed files
1
gravatar for Apoorva
5.0 years ago by
Apoorva270
United States
Apoorva270 wrote:

Hi Everyone,

I am doing a ChIP-Seq analysis on a small dataset of 6 samples (Wild-type and knockout having 3 replicates each). I wanted to run a Fisher exact test using bedtools. My bed files are all sorted. But I am getting this error.

Error: Sorted input specified, but the file /Users/xxx/narrowPeak/531-sorted.bed has the following record with a different sort order than the genomeFile /Applications/bedtools2/genomes/mouse.mm9.genome

What does this mean and how do I fix this ?

Thank you

chip-seq fisher test bedtools • 2.9k views
ADD COMMENTlink modified 5 weeks ago by chrisclarkson10090 • written 5.0 years ago by Apoorva270
1

check that the order of the chromosome names and the order of your sort is the same as in the genome.

ADD REPLYlink modified 12 months ago by _r_am32k • written 5.0 years ago by Fidel2.0k
0
gravatar for chrisclarkson100
5 weeks ago by
European Union
chrisclarkson10090 wrote:

I too have had this problem- but what has helped me is to sort the mm9.genome file with the same code as in the case of the actual bed files:

sort -k1,1 mouse.mm9.genome > sorted_mouse.mm9.genome
sort -k1,1 -k2,2n a.bed > a_sorted.bed
sort -k1,1 -k2,2n b.bed > b_sorted.bed
bedtools fisher -a a_sorted.bed -b b_sorted.bed -g sorted_mouse.mm9.genome
ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by chrisclarkson10090
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: 1605 users visited in the last hour
_