def __init__(self, analysis_dir, pairs_sheet=None, taskname='SnsWesPairsSnv', config_file='SnsWesPairsSnv.yml', extra_handlers=None, **kwargs): """ """ SnsTask.__init__(self, analysis_dir=analysis_dir, taskname=taskname, extra_handlers=extra_handlers, config_file=config_file) # make sure the samples pairs sheet was passed if not pairs_sheet: raise self._exceptions.AnalysisFileMissing( message='Samples pairs was not passed to task {0}'.format( self), errors='') # copy the sample pairs sheet to the proper location pairs_sheet_output = self.get_analysis_file_outpath( file_basename="samples.pairs.csv") self.logger.debug( 'Copying samples pairs sheet from\n{0}\nto\n{1}'.format( pairs_sheet, pairs_sheet_output)) shutil.copy2(pairs_sheet, pairs_sheet_output)
def __init__(self, analysis_dir, taskname='DemoSnsTask', extra_handlers=None, **kwargs): """ """ SnsTask.__init__(self, analysis_dir=analysis_dir, taskname=taskname, extra_handlers=extra_handlers)
def __init__(self, analysis_dir, taskname='SnsRnaStar', config_file='SnsRnaStar.yml', extra_handlers=None, **kwargs): """ """ SnsTask.__init__(self, analysis_dir=analysis_dir, taskname=taskname, extra_handlers=extra_handlers)
def __init__(self, analysis_dir, targets_bed=None, fastq_dirs=None, taskname='StartSns', config_file='StartSns.yml', extra_handlers=None, **kwargs): """ """ SnsTask.__init__(self, analysis_dir=analysis_dir, taskname=taskname, extra_handlers=extra_handlers, config_file=config_file) if not fastq_dirs: raise self._exceptions.AnalysisFileMissing( message='Fastq directories were not passed to task {0}'.format( self), errors='') if not targets_bed: raise self._exceptions.AnalysisFileMissing( message='Targets .bed file was not passed to task {0}'.format( self), errors='') # fastq directories to be used self.fastq_dirs = [] for fastq_dir in fastq_dirs: self.fastq_dirs.append(os.path.realpath(fastq_dir)) # path to the input targets files self.targets_bed = targets_bed # list of items to validate before proceeding setup_items = [] for item in self.fastq_dirs: setup_items.append(item) setup_items.append(self.targets_bed) setup_items.append(self.output_dir) self.validate_items(items=setup_items)
def __init__(self, analysis_dir, pairs_sheet = None, taskname = 'SnsSetupPairs', config_file = 'SnsSetupPairs.yml', extra_handlers = None, **kwargs): """ """ SnsTask.__init__(self, analysis_dir = analysis_dir, taskname = taskname, extra_handlers = extra_handlers, config_file = config_file) # make sure the samples pairs sheet was passed if not pairs_sheet: raise self._exceptions.AnalysisFileMissing(message = 'Samples pairs was not passed to task {0}'.format(self), errors = '') # the basename of the file to create pairs_sheet_basename = self.task_configs['pairs_sheet_basename'] # "samples.pairs.csv" # path to expected/required output file pairs_sheet_output = self.get_analysis_file_outpath(file_basename = pairs_sheet_basename) # make sure it doesn't exist already self.tools.backup_file(input_file = pairs_sheet_output, use_logger = self.logger) # copy the sample pairs sheet to the proper location self.logger.debug('Copying samples pairs sheet from\n{0}\nto\n{1}'.format(pairs_sheet, pairs_sheet_output)) shutil.copy2(pairs_sheet, pairs_sheet_output) # make sure it really worked self.validate_items([pairs_sheet_output])