# Path: ob_pipelines/s3.py
# SCRATCH_DIR = os.environ.get('SCRATCH_DIR') or '/tmp'
# def csv_to_s3(df, s3_path, **kwargs):
# def create_tmp_from_key(key): 
# def path_to_bucket_and_key(path):
# def key_exists(bucket, key):
# def download_folder(bucket, prefix, folder):
# def upload_folder(folder, bucket, prefix):
# def upload_prefix(local_prefix, s3_prefix, fpath_templates):
# def download_file_or_folder(s3_path, local_path):
# def upload_file_or_folder(s3_path, local_path):
# def remove_file_or_folder(fpath):
# def swap_args(args, rm_local_outpath=False):
# def s3args(rm_local_outpath=False):
#     def s3args_decorator(f):
#         def local_fn(*args, **kwargs):
# def s3wrap():
#     def sync_and_run(*cmds):


import logging
import os.path as op
import shutil
import subprocess
import click
from tempfile import mkdtemp
from ob_pipelines.s3 import (
    swap_args, download_file_or_folder, remove_file_or_folder, SCRATCH_DIR, s3, path_to_bucket_and_key
)



logger = logging.getLogger('ob-pipelines')


STAR_OUTPUTS = {
    'bam': '{prefix}Aligned.out.bam',

# Path: ob_pipelines/s3.py
# SCRATCH_DIR = os.environ.get('SCRATCH_DIR') or '/tmp'
# def csv_to_s3(df, s3_path, **kwargs):
# def create_tmp_from_key(key): 
# def path_to_bucket_and_key(path):
# def key_exists(bucket, key):
# def download_folder(bucket, prefix, folder):
# def upload_folder(folder, bucket, prefix):
# def upload_prefix(local_prefix, s3_prefix, fpath_templates):
# def download_file_or_folder(s3_path, local_path):
# def upload_file_or_folder(s3_path, local_path):
# def remove_file_or_folder(fpath):
# def swap_args(args, rm_local_outpath=False):
# def s3args(rm_local_outpath=False):
#     def s3args_decorator(f):
#         def local_fn(*args, **kwargs):
# def s3wrap():
#     def sync_and_run(*cmds):


# Path: ob_pipelines/apps/star/star.py
import logging
import os.path as op
import shutil
import subprocess
import click
from tempfile import mkdtemp
from ob_pipelines.s3 import (
    swap_args, download_file_or_folder, remove_file_or_folder, SCRATCH_DIR, s3, path_to_bucket_and_key
)




logger = logging.getLogger('ob-pipelines')


STAR_OUTPUTS = {
    'bam': '{prefix}Aligned.out.bam',

    'junctions': '{prefix}SJ.out.tab',