iprada / Circle-Map

A method for circular DNA detection based on probabilistic mapping of ultrashort reads
MIT License
62 stars 19 forks source link

NotImplementedError: "sortBed" #58

Closed yjx1217 closed 3 years ago

yjx1217 commented 3 years ago

Hello,

I installed Circle-Map via conda and encountered the following problem:

Computing the coverage of the identified eccDNA
Merging intervals for coverage computation
Traceback (most recent call last):
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/bin/Circle-Map", line 10, in <module>
    sys.exit(main())
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/circlemap/circle_map.py", line 1164, in main
    run = circle_map()
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/circlemap/circle_map.py", line 199, in __init__
    output = coverage_object.compute_coverage(coverage_object.get_wg_coverage())
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/circlemap/Coverage.py", line 98, in compute_coverage
    for cov_dict,header_dict in cov_generator:
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/circlemap/Coverage.py", line 60, in get_wg_coverage
    merged_bed = self.bed.sort().merge()
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/pybedtools/bedtool.py", line 917, in decorated
    result = method(self, *args, **kwargs)
  File "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/pybedtools/bedtool.py", line 240, in not_implemented_func
    raise NotImplementedError(help_str)
NotImplementedError: "sortBed" does not appear to be installed or on the path, so this method is disabled.  Please install a more recent version of BEDTools and re-import to use this method.

I checked the file "/public/jxyue/Projects/ecDNA/build/circlemap_conda_env/lib/python3.7/site-packages/pybedtools/bedtool.py" and clearly sortBed has been defined in it. So I don't know why this problem occurs. Also, this problem persists even after I explicitly installed latest version of bedtools and pybedtools via conda.

Thanks in advance.

Best, Jia-Xing

iprada commented 3 years ago

Dear @yjx1217,

Thanks for using Circle-Map. I have never seen that error. Based on the traceback, it seems to be on the bedtools/pybedtools side. Which version of bedtools/pybedtools are you using?

best,

Inigo

yjx1217 commented 3 years ago

Dear @iprada

I figured out the problem. It was caused by the fact that the bedtools binaries were not in my $PATH. Only install bedtools with conda is not enough.

Best, Jia-Xing

iprada commented 3 years ago

Dear Jia-Xing,

Great to hear! Happy circle hunting

I am closing this issue. Feel free to open a new one if you have more questions

best,

Inigo