Question: Bioblend download bed/interval file : HistoryDatasetAssociation not accessible
0
gravatar for christophe.habib
15 months ago by
France
christophe.habib340 wrote:

Hello everyone,

I need to download a large amount of files from histories of different users. These files are named the same way so I can easily get their IDs with histories.show_matching_datasets with a regular expression. The code looks like this :

hl = gi.histories.get_histories()
for h in hl:
    histID=h['id']
    todl = gi.histories.show_matching_datasets(histID,name_filter=".*_thing.vcf")[0]['id']
    gi.datasets.download_dataset(todl, file_path="./")

It works fine with VCF files, but when I try to do it with a bed files it doesn't work. I will try to give you all the details.

When I try to do it on the bed file I want to download, in a python terminal I have this error :

If I copy/paste the link in my browser it downloads the file (and the file is OK).

If I look into the uwsgi log I can read HistoryDatasetAssociation error (not accessible):

If I try to download the file with Galaxy interface and then use "Get Data" to have it in another history, and then try to download it with bioblend, I have the exact same error.

Here is the file :

Can you reproduce this error ?

ADD COMMENTlink modified 15 months ago • written 15 months ago by christophe.habib340

I just tested this on another instance, in another server, and it works. The instance where it doesn't works is located in a hospital where everything go through a proxy. I have already configurated the proxy in supervisor for uwsgi and handler.

When I try to get the file with wget I have this error :

So I guess something is missing in my configuration... Maybe NGINX needs to be configured as well for the hospital proxy ?

ADD REPLYlink written 15 months ago by christophe.habib340

In my nginx config file I have add these lines as suggested here : https://wiki.galaxyproject.org/Admin/Config/nginxProxy to send files with Nginx

location /_x_accel_redirect/ {
    internal;
    alias /;
}

Do I need to add something related to the hospital proxy ? What I don't understand is why I have no problem for VCF files, and I have this error for this type of file only.

PS : i tried to remove these lines and restart nginx, it does not change anything

ADD REPLYlink modified 15 months ago • written 15 months ago by christophe.habib340
2
gravatar for christophe.habib
15 months ago by
France
christophe.habib340 wrote:

Ok the problem was solved by upgrading Bioblend... pip install --upgrade bioblend

It's ridiculous, but i'll leave this post, if someone meets the same issue ...

ADD COMMENTlink written 15 months ago by christophe.habib340
0
gravatar for christophe.habib
15 months ago by
France
christophe.habib340 wrote:

Well actually it works only for a bed file that I have imported with get data. Not with the existing one, generated with my workflow. So the problem is not solved.

I tried to compare the dataset, I see something strange, the display_type is empty in the dataset that I can download :

ADD COMMENTlink written 15 months ago by christophe.habib340

So I wonder if the module that download the file is using the display type in any way ? I would like to try to modify the display types, but I can't manage to do it with bioblend. Any advice ?

ADD REPLYlink modified 15 months ago • written 15 months ago by christophe.habib340

I just tried a minimal workflow, imported the 2 input that create the bed file. It create a file with display_type not null. So this lead is wrong it is not the reason of this behaviour.

ADD REPLYlink written 15 months ago by christophe.habib340
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 83 users visited in the last hour