databio / bedhost

API and UI for BEDbase
http://api.bedbase.org
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

bedbuncher pipeline interface location #22

Closed nsheff closed 4 years ago

nsheff commented 4 years ago

There is something wrong with the paths in the tutorial.

when I run this step:

looper run  Configuration_files/bedbase_demo_PEPs/bedbuncher_config.yaml  --bedbase-config Configuration_files/bedbase_configuration.yaml \
> --compute local -R

I get:

Finding pipelines for protocol(s): bedbuncher
Known protocols: bedbuncher
Missing pipeline script: '/home/nsheff/bedbase_tutorial/Configuration_files/bedbase_demo_PEPs/../../bedbuncher/bedbuncher.py'
No valid pipelines for protocol 'bedbuncher'

I changed the pipeline interface from - path: bedbuncher.py to: path: pipelines/bedbuncher.py, because that's where the pipeline actually is.

Then, I get:

Established connection with Elasticsearch: localhost
Traceback (most recent call last):
  File "/home/nsheff/bedbase_tutorial/Configuration_files/bedbase_demo_PEPs/../../bedbuncher/pipelines/bedbuncher.py", line 291, in <module>
    sys.exit(main())
  File "/home/nsheff/bedbase_tutorial/Configuration_files/bedbase_demo_PEPs/../../bedbuncher/pipelines/bedbuncher.py", line 88, in main
    q = JSON_to_dict(args.JSON_query_path)
  File "/home/nsheff/bedbase_tutorial/Configuration_files/bedbase_demo_PEPs/../../bedbuncher/pipelines/bedbuncher.py", line 53, in JSON_to_dict
    with open(file_name) as f_in:
FileNotFoundError: [Errno 2] No such file or directory: '../bedbuncher/tests/test_query.json'
nsheff commented 4 years ago

the directory appears to be wrong; it should be looking at ../, just in the pwd is where the tutorial had us clone the bedbuncher pipeline...

nsheff commented 4 years ago

Ok, another issue is the bedbuncher config says:

output_dir: bedbuncher/bedbuncher_pipeline_logs

But this appears to be relative to the cwd, which is not great... so it's not working for me because you must have run the command relative to a differnet folder.

I fixed it for me by changing output_dir to $HOME/bedbase_tutorial/bedbuncher/bedbuncher_pipeline_logs.

But the big picture is that these things need to be worked out. You can just do something like this:

Choose a directory and set an env variable to point to it:

mkdir bedbase_tutorial
cd bedbase_tutorial
export BBTUTORIAL= `pwd`

then, use $BBTUTORIAL for all this stuff.

joseverdezoto commented 4 years ago

@nsheff do you have similar issues when you run bedstat in the tutorial? I believe that happened because we recently changed the directory structure inside the bedbuncher repository. I will make the proper adjustments to the bedbuncher interface and config.

nsheff commented 4 years ago

no, bedstat worked.