def run(self, readsetId, sequenceName, sequenceStart, sequenceEnd, output): file = output[0] # If you have a setting to copy it over, do so dir = os.environ['OUTPUT_DIRECTORY'] if dir is not None: bucket = get_bucket_name() src = file dst = str.format("/%s/%s/%s_%s_%s-%s.txt" % ( bucket, dir, str(readsetId), str(sequenceName), sequenceStart, sequenceEnd)) gcs._copy2(src, dst) logging.info("Copied output file to: %s" % dst) file = dst if os.environ['SERVER_SOFTWARE'].startswith('Development'): url = "http://localhost:8080/_ah/gcs" + file else: url = "https://storage.cloud.google.com" + file logging.info("Genomics pipeline completed. Results: %s", url)
def run(self, readsetId, sequenceName, sequenceStart, sequenceEnd, files): # If you have a setting to copy it over, do so local = os.environ['SERVER_SOFTWARE'].startswith('Development') bucket = get_bucket_name() dir = os.getenv('OUTPUT_DIRECTORY', 'genomics_mr_results') path = str.format("/%s/%s/%s/%s" % (bucket, dir, str(readsetId), str(sequenceName))) shard = 0 for file in files: dst = str.format("%s/%s-%s_shard-%03d.txt" % (path, sequenceStart, sequenceEnd, shard)) gcs._copy2(file, dst) if local: url = "http://localhost:8080/_ah/gcs" + dst logging.info("Output file available here: %s", url) shard += 1 if local: logging.info("Genomics pipeline completed. Output files listed above.") else: url = "https://storage.cloud.google.com" + path logging.info("Genomics pipeline completed. Results: %s", url)