Sorted input out of order
skokgibbsc opened this issue · 2 comments
I've tried sorting my bed file in many different ways . Does anyone have any insight on this problem?
Traceback (most recent call last):
File "chromatin_prior_motif_score2kb.py", line 179, in
main(args)
File "chromatin_prior_motif_score2kb.py", line 113, in main
motifs, scores = motifs_and_scores(motifs_file, open_regions)
File "chromatin_prior_motif_score2kb.py", line 19, in motifs_and_scores
df = df.merge(d=-1, c=[4,5], o=['distinct', 'max']).to_dataframe()
File "/Users/cskokgibbs/anaconda2/lib/python2.7/site-packages/pybedtools/bedtool.py", line 806, in decorated
result = method(self, *args, **kwargs)
File "/Users/cskokgibbs/anaconda2/lib/python2.7/site-packages/pybedtools/bedtool.py", line 337, in wrapped
decode_output=decode_output,
File "/Users/cskokgibbs/anaconda2/lib/python2.7/site-packages/pybedtools/helpers.py", line 356, in call_bedtools
raise BEDToolsError(subprocess.list2cmdline(cmds), stderr)
pybedtools.helpers.BEDToolsError:
Command was:
bedtools merge -o distinct,max -i /var/folders/rh/h9wj3ll52xx_zzt0k23rfrdm00013k/T/pybedtools.cz_GHt.tmp -d -1 -c 4,5
Error message was:
Error: Sorted input specified, but the file /var/folders/rh/h9wj3ll52xx_zzt0k23rfrdm00013k/T/pybedtools.cz_GHt.tmp has the following out of order record
chr3L 2462747 2462754 FBgn0000022 9.259999999999999e-05 -
Can you provide the BED file that causes the issue? Best would be if you can get a minimally-reproducible example, say with only a handful of lines.
I meet the same problem.
such as
a.merge(c="2,3", o="collapse,collapse").sort()