kipoi / kipoi-veff

Variant effect prediction plugin for Kipoi
https://kipoi.org/veff-docs
MIT License
6 stars 5 forks source link

Getting a NotImplementedError: "sortBed" does not appear to be installed or on the path... error when running score_variants #45

Open sukritikumar4 opened 2 years ago

sukritikumar4 commented 2 years ago

Hey there,

Pretty new to Kipoi and was explore this particular plugin. Unfortunately, whenever I try to run the score_variants function, I get the following error. Not sure if this is something others have faced in the past, but would be grateful if you could suggest a prospective solution! Thank you!

Error:

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.

sukritikumar4 commented 2 years ago

Sharing the detailed error here:


NotImplementedError Traceback (most recent call last)

in ----> 1 sp.score_variants(model = model_name, 2 dl_args = dataloader_arguments, 3 input_vcf = vcf_path, 4 output_vcf = out_vcf_fpath) /opt/anaconda3/lib/python3.8/site-packages/kipoi_veff/snv_predict.py in score_variants(model, dl_args, input_vcf, output_vcf, output_writers, scores, score_kwargs, num_workers, batch_size, source, seq_length, std_var_id, restriction_bed, return_predictions, model_outputs) 766 model = kipoi.get_model(model, source=source, with_dataloader=True) 767 Dataloader = model.default_dataloader --> 768 vcf_path_tbx = ensure_tabixed_vcf(in_vcf_path_abs) # TODO - run this within the function 769 770 if output_writers is None: /opt/anaconda3/lib/python3.8/site-packages/kipoi_veff/utils/generic.py in ensure_tabixed_vcf(input_fn, is_sorted, force_tabix) 37 if not pbh._tabixed(): 38 # pybedtools bug. ---> 39 fn = pbh.bgzip(in_place=True, force=force_tabix) 40 pysam.tabix_index(fn, force=force_tabix, preset="vcf") 41 # tbxd = pbh.tabix(is_sorted=is_sorted, force=force_tabix) /opt/anaconda3/lib/python3.8/site-packages/pybedtools/bedtool.py in bgzip(self, in_place, force, is_sorted) 853 if in_place: 854 if not is_sorted: --> 855 fn = self.sort(header=True).saveas().fn 856 else: 857 fn = self.fn /opt/anaconda3/lib/python3.8/site-packages/pybedtools/bedtool.py in decorated(self, *args, **kwargs) 915 # this calls the actual method in the first place; *result* is 916 # whatever you get back --> 917 result = method(self, *args, **kwargs) 918 919 # add appropriate tags /opt/anaconda3/lib/python3.8/site-packages/pybedtools/bedtool.py in not_implemented_func(*args, **kwargs) 238 239 def not_implemented_func(*args, **kwargs): --> 240 raise NotImplementedError(help_str) 241 242 return not_implemented_func 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.