Mercurial > repos > rhohensinner > galaxy_irods_interface
changeset 3:d2be2eb8350f draft
"planemo upload commit b2a00d9c24285fef0fb131d1832ecf4c337e5038-dirty"
author | rhohensinner |
---|---|
date | Mon, 19 Jul 2021 13:11:45 +0000 |
parents | 0641ea2f75b1 |
children | 84f685c067ad |
files | irods_upload.py main.py tug_download.xml tug_upload.xml |
diffstat | 4 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/irods_upload.py Fri Jul 02 09:40:25 2021 +0000 +++ b/irods_upload.py Mon Jul 19 13:11:45 2021 +0000 @@ -9,9 +9,10 @@ import os import shutil import sys -sys.path.append("/home/richard/galaxy/lib") +import main from json import dump, load, loads - +global python_path +sys.path = python_path from galaxy.datatypes import sniff from galaxy.datatypes.registry import Registry from galaxy.datatypes.upload_util import handle_upload, UploadProblemException @@ -307,6 +308,7 @@ print('usage: upload.py <root> <datatypes_conf> <json paramfile> <output spec> ...', file=sys.stderr) sys.exit(1) + sys.path.append(argv[5]) output_paths = parse_outputs(sys.argv[4:]) registry = Registry()
--- a/main.py Fri Jul 02 09:40:25 2021 +0000 +++ b/main.py Mon Jul 19 13:11:45 2021 +0000 @@ -4,7 +4,6 @@ # general imports import os, sys, json -import irods_upload from shutil import copyfile from datetime import datetime @@ -24,6 +23,7 @@ session_success = False selection_success = False iRODSCredentials = {"host": "", "port": "", "user": "", "pw": "", "zone": ""} +python_path = [] ######################################################################################################################## @@ -440,6 +440,7 @@ arg2 = params["galaxy_datatypes"] arg3 = os.path.abspath(fileParams.name) arg4 = params["job_id"] + ":" + params["out_dir"] + ":" + params["out_file"] + arg5 = params["galaxy_root"] + "/lib/galaxy" # copy sample registry.xml to working directory copyfile(reg_file, params["galaxy_datatypes"]) @@ -460,7 +461,9 @@ if upload_file != "": break - os.system("python " + upload_file + " " + arg1 + " " + arg2 + " " + arg3 + " " + arg4) + global python_path + python_path = sys.path + os.system(params["galaxy_root"] + "/.venv/bin/python " + upload_file + " " + arg1 + " " + arg2 + " " + arg3 + " " + arg4) # close connection session.cleanup() # -------------------------------------------------------------------------------------------------------------------- #
--- a/tug_download.xml Fri Jul 02 09:40:25 2021 +0000 +++ b/tug_download.xml Mon Jul 19 13:11:45 2021 +0000 @@ -1,4 +1,4 @@ -<tool id="irods_download" name="iRODS Download" version="0.2" workflow_compatible="false"> +<tool id="irods_download" name="iRODS Download" version="0.3" workflow_compatible="false"> <description>Download your files from iRODS into Galaxy</description> <requirements> <requirement type="package" version="0.8.2">python-irodsclient</requirement>
--- a/tug_upload.xml Fri Jul 02 09:40:25 2021 +0000 +++ b/tug_upload.xml Mon Jul 19 13:11:45 2021 +0000 @@ -1,4 +1,4 @@ -<tool id="irods_upload" name="iRODS Upload" version="0.2" workflow_compatible="false"> +<tool id="irods_upload" name="iRODS Upload" version="0.3" workflow_compatible="false"> <description>Upload your files to iRODS from Galaxy</description> <requirements> <requirement type="package" version="0.8.2">python-irodsclient</requirement>