# Path: ob_pipelines/pipelines/rnaseq/tasks/kallisto.py
# class Kallisto(BatchTask, LoggingTaskWrapper, Sample):
#     job_definition = 'kallisto'
# 
#     @property
#     def parameters(self):
#         fq1, fq2 = self.input()
#         return {
#             'threads': '20',
#             'index': get_index('kallisto'),
#             'reads1': fq1.path,
#             'reads2': fq2.path,
#             'strand_flag': '--rf-stranded',
#             'output': op.dirname(self.output()['abundance'].path) + '/'
#         }
# 
#     def requires(self):
#         return SampleFastQ(sample_id=self.sample_id)
# 
#     def output(self):
#         output_files = {
#             'abundance': 'abundance.tsv',
#             'h5': 'abundance.h5',
#             'run_info': 'run_info.json'
#         }
#         return {k: S3Target('{}/{}/kallisto/{}'.format(settings.get_target_bucket(), self.sample_folder, fname))
#                 for k, fname in output_files.items()}
# 
# Path: ob_pipelines/s3.py
# def path_to_bucket_and_key(path):
#     (scheme, netloc, path, params, query, fragment) = urlparse(path)
#     path_without_initial_slash = path[1:]
#     return netloc, path_without_initial_slash


import boto3
import luigi
from ob_pipelines.pipelines.rnaseq.tasks.kallisto import Kallisto
from ob_pipelines.s3 import path_to_bucket_and_key


TEST_SAMPLE = 'GS-1'

s3 = boto3.client('s3')

t = Kallisto(sample_id=TEST_SAMPLE)

# Path: ob_pipelines/pipelines/rnaseq/tasks/kallisto.py
# class Kallisto(BatchTask, LoggingTaskWrapper, Sample):
#     job_definition = 'kallisto'
# 
#     @property
#     def parameters(self):
#         fq1, fq2 = self.input()
#         return {
#             'threads': '20',
#             'index': get_index('kallisto'),
#             'reads1': fq1.path,
#             'reads2': fq2.path,
#             'strand_flag': '--rf-stranded',
#             'output': op.dirname(self.output()['abundance'].path) + '/'
#         }
# 
#     def requires(self):
#         return SampleFastQ(sample_id=self.sample_id)
# 
#     def output(self):
#         output_files = {
#             'abundance': 'abundance.tsv',
#             'h5': 'abundance.h5',
#             'run_info': 'run_info.json'
#         }
#         return {k: S3Target('{}/{}/kallisto/{}'.format(settings.get_target_bucket(), self.sample_folder, fname))
#                 for k, fname in output_files.items()}
# 
# Path: ob_pipelines/s3.py
# def path_to_bucket_and_key(path):
#     (scheme, netloc, path, params, query, fragment) = urlparse(path)
#     path_without_initial_slash = path[1:]
#     return netloc, path_without_initial_slash


# Path: test/test_rnaseq.py
import boto3
import luigi
from ob_pipelines.pipelines.rnaseq.tasks.kallisto import Kallisto
from ob_pipelines.s3 import path_to_bucket_and_key



TEST_SAMPLE = 'GS-1'

s3 = boto3.client('s3')

t = Kallisto(sample_id=TEST_SAMPLE)

for s3_tgt in t.output().values():