# -*- coding: utf-8 -*-
.. Copyright 2012-2015 Spotify AB
Copyright 2018 EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
from __future__ import print_function
# Dill is used for handling pickling and unpickling if there is a deference
# in server setups between the LSF submission node and the nodes in the
import dill as pickle
# Extract the necessary dependencies
# Open up the pickle file with the work to be done
with open("job-instance.pickle", "r") as pickle_file_handle:
job = pickle.load(pickle_file_handle)
# Do the work contained
"""Run the work() method from the class instance in the file "job-instance.pickle".
# Set up logging.
work_dir = args
assert os.path.exists(work_dir), "First argument to lsf_runner.py must be a directory that exists"
except Exception as exc:
# Dump encoded data that we will try to fetch using mechanize
if __name__ == '__main__':