Closed stolarczyk closed 3 years ago
I think because when the path returned by the endpoints includes '../../' , genome browser would have problem accessing the file for example data.bedbase.org/bigBed_files/some.bigbed
would work but data.bedbase.org/outputs/bedstat_output/../../bigbed_files/some.bigBed
won't. That's why I made the reported path all relative to data.bedbase.org/
instead data.bedbase.org/outputs/bedstat_output/
or data.bedbase.org/outputs/bedbuncher_output/
.
However, I haven't fix the problem that the endpoint url for the bigbed files doesn't work for Genome Browser (still using data.bedbase.org instead of the api url).
I realized I misunderstood your comment. I just fixed the path construction.
When serving files and images we go up two directories in the path construction:
https://github.com/databio/bedhost/blob/2ff8bd497e9420a6c712538862efd12b5e5be91e/bedhost/routers/api.py#L110-L111
an example image we report is:
Therefore, it seems like we could just skip the first two directories in the reported path to simplify the served file path construction.
side note: instead of the literal
..
we should useos.pardir()