Question: Bioblend - upload_file does not work from command line ?
0
gravatar for lindfors.erno
4.7 years ago by
Germany
lindfors.erno20 wrote:


Hi all,

I have been trying to run Galaxy from command line via BioBlend by following an example given in Running Galaxy From Command Line With Bioblend.

I have not managed to upload a file from my local computer.

More specifically, I am trying to upload a simple flat file that contains one column of integer numbers. The exact content of this file is copy-pasted in the end of this message.

I am using the following commands for uploading.
from bioblend.galaxy import GalaxyInstance
from bioblend.galaxy.histories import HistoryClient
from bioblend.galaxy.tools import ToolClient
galaxyInstance = GalaxyInstance(url = GALAXY_URL, key=API_KEY)
historyClient = HistoryClient(galaxyInstance)
toolClient = ToolClient(galaxyInstance)
history = historyClient.create_history('tmp')
inputFile = toolClient.upload_file(LOCAL_FILE_PATH, history['id'], type='txt')


Then the content of inputFile is the following.
>>> inputFile
{u'outputs': [{u'visible': True, u'file_size': 0, u'file_ext': u'auto', u'id': u
'6b7e7ce7e274628f', u'misc_info': None, u'hda_ldda': u'hda', u'state': u'queued'
, u'metadata_dbkey': u'?', u'misc_blurb': None, u'peek': u'<table cellspacing="0
" cellpadding="3"></table>', u'update_time': u'2014-10-02T08:20:48.026438', u'da
ta_type': u'auto', u'tags': [], u'deleted': False, u'history_id': u'2d9035b3fc15
2403', u'genome_build': u'?', u'hid': 1, u'metadata_data_lines': None, u'uuid':
None, u'name': u'BigFile_test.txt', u'model_class': u'HistoryDatasetAssociation'
, u'output_name': u'output0', u'purged': False}]}


From what I understand u'file_size': 0 means that the size of uploaded file is zero. In practice, I think it means the uploading operation failed to upload any content to the inputFile variable.

Does anybody have any idea why this happens? 

With best regards,
Erno Lindfors

<FileContent>
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
</FileContent>

galaxy bioblend software error • 1.2k views
ADD COMMENTlink written 4.7 years ago by lindfors.erno20
0
gravatar for Istvan Albert
4.7 years ago by
Istvan Albert ♦♦ 80k
University Park, USA
Istvan Albert ♦♦ 80k wrote:

this should be posted on the Galaxy user support site: https://biostar.usegalaxy.org/ 

ADD COMMENTlink written 4.7 years ago by Istvan Albert ♦♦ 80k

Thanks Istvan, recently posted it on https://biostar.usegalaxy.org/p/9210/.

With best regards,

Erno Lindfors

ADD REPLYlink written 4.7 years ago by lindfors.erno20
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 2.3.0
Traffic: 1373 users visited in the last hour