Question: Modifying library dataset names with bioblend/the API
1
gravatar for Devon Ryan
2.3 years ago by
Devon Ryan1.9k
Germany
Devon Ryan1.9k wrote:

I'm interested in linking a number of files into our local Galaxy instance using bioblend (or the Galaxy API directly if need be). The code for almost everything I need is simple enough, but there are some file names where Galaxy will strip off the file extensions. Namely, if one links in a file called "foo.fastq.gz", Galaxy will strip off the ".gz" suffix. That needs to stay there, since Galaxy is just linking in the files and not uncompressing them. I've not found an "update a library dataset name" method anywhere in bioblend or the API, but I assume I've just overlooked it (at least in the API). Can anyone point me in the right direction?

bioblend • 819 views
ADD COMMENTlink written 2.3 years ago by Devon Ryan1.9k
2

I am facing the same issue. And it is one of the reasons why I haven't gone into production with automatic library generation for our fastq files.

So far I just refer to the dataset peek where it says: 'gzipped file'

I have to add, I use file_type='fastq' in the "upload_from_galaxy_filesystem". Though, that should not make a difference....it just brings us back to the way Galaxy handles gzipped files.

Regards, Hans-Rudolf

ADD REPLYlink written 2.3 years ago by Hotz, Hans-Rudolf1.8k

I am afraid there is no API to update library dataset's name in Galaxy. However the proper solution for this seems to prevent galaxy from stripping suffix of linked data. Does this sound reasonable?

ADD REPLYlink written 2.3 years ago by Martin Čech ♦♦ 4.9k
1

That might work. I'm a little concerned that that'll screw things up if someone tries to upload a gzipped file (I've had the most common wrappers modified to handle gzipped files...but that requires a proper file extension). Having said that, I suspect people almost never do that, so probably I'm worrying for nothing. Where is the extension stripping handled?

The other solution I can think of would be to have a cron job on the server with Galaxy that runs and periodically checks for and fixes names in the database. That'd be an easy enough thing to write I expect.

ADD REPLYlink written 2.3 years ago by Devon Ryan1.9k
0
gravatar for Devon Ryan
2.3 years ago by
Devon Ryan1.9k
Germany
Devon Ryan1.9k wrote:

I ended up just writing a little python script to do this and made it a cron job. Thanks for your help Hans-Rudolf and Martin!

ADD COMMENTlink written 2.3 years ago by Devon Ryan1.9k
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: 171 users visited in the last hour