def run_SPAdes(self, ctx, params):
    '\n        Run SPAdes on paired end libraries\n        :param params: instance of type "SPAdesParams" (Input parameters for\n           running SPAdes. workspace_name - the name of the workspace from\n           which to take input and store output. output_contigset_name - the\n           name of the output contigset read_libraries - a list of Illumina\n           PairedEndLibrary files in FASTQ or BAM format. dna_source -\n           (optional) the source of the DNA used for sequencing\n           \'single_cell\': DNA amplified from a single cell via MDA anything\n           else: Standard DNA sample from multiple cells. Default value is\n           None. min_contig_length - (optional) integer to filter out contigs\n           with length < min_contig_length from the SPAdes output. Default\n           value is 0 implying no filter. kmer_sizes - (optional) K-mer\n           sizes, Default values: 33, 55, 77, 99, 127 (all values must be\n           odd, less than 128 and listed in ascending order) In the absence\n           of these values, K values are automatically selected.\n           skip_error_correction - (optional) Assembly only (No error\n           correction). By default this is disabled.) -> structure: parameter\n           "workspace_name" of String, parameter "output_contigset_name" of\n           String, parameter "read_libraries" of list of type\n           "paired_end_lib" (The workspace object name of a PairedEndLibrary\n           file, whether of the KBaseAssembly or KBaseFile type.), parameter\n           "dna_source" of String, parameter "min_contig_length" of Long,\n           parameter "kmer_sizes" of list of Long, parameter\n           "skip_error_correction" of type "bool" (A boolean. 0 = false,\n           anything else = true.)\n        :returns: instance of type "SPAdesOutput" (Output parameters for\n           SPAdes run. report_name - the name of the KBaseReport.Report\n           workspace object. report_ref - the workspace reference of the\n           report.) -> structure: parameter "report_name" of String,\n           parameter "report_ref" of String\n        '
    self.log(('Running run_SPAdes with params:\n' + pformat(params)))
    token = ctx['token']
    self.process_params(params)
    wsname = params[self.PARAM_IN_WS]
    obj_ids = []
    for r in params[self.PARAM_IN_LIB]:
        obj_ids.append({'ref': (r if ('/' in r) else ((wsname + '/') + r))})
    ws = Workspace(self.workspaceURL, token=token)
    ws_info = ws.get_object_info_new({'objects': obj_ids})
    reads_params = []
    reftoname = {}
    for (wsi, oid) in zip(ws_info, obj_ids):
        ref = oid['ref']
        reads_params.append(ref)
        obj_name = wsi[1]
        reftoname[ref] = ((wsi[7] + '/') + obj_name)
    readcli = ReadsUtils(self.callbackURL, token=ctx['token'])
    typeerr = ((('Supported types: KBaseFile.SingleEndLibrary ' + 'KBaseFile.PairedEndLibrary ') + 'KBaseAssembly.SingleEndLibrary ') + 'KBaseAssembly.PairedEndLibrary')
    try:
        reads = readcli.download_reads({'read_libraries': reads_params, 'interleaved': 'false', 'gzipped': None})['files']
    except ServerError as se:
        self.log('logging stacktrace from dynamic client error')
        self.log(se.data)
        if (typeerr in se.message):
            prefix = se.message.split('.')[0]
            raise ValueError((((prefix + '. Only the types ') + 'KBaseAssembly.PairedEndLibrary ') + 'and KBaseFile.PairedEndLibrary are supported'))
        else:
            raise
    self.log(('Got reads data from converter:\n' + pformat(reads)))
    phred_type = self.check_reads(params, reads, reftoname)
    reads_data = []
    for ref in reads:
        reads_name = reftoname[ref]
        f = reads[ref]['files']
        seq_tech = reads[ref]['sequencing_tech']
        if (f['type'] == 'interleaved'):
            reads_data.append({'fwd_file': f['fwd'], 'type': 'paired', 'seq_tech': seq_tech})
        elif (f['type'] == 'paired'):
            reads_data.append({'fwd_file': f['fwd'], 'rev_file': f['rev'], 'type': 'paired', 'seq_tech': seq_tech})
        elif (f['type'] == 'single'):
            reads_data.append({'fwd_file': f['fwd'], 'type': 'single', 'seq_tech': seq_tech})
        else:
            raise ValueError(('Something is very wrong with read lib' + reads_name))
    kmer_sizes = None
    if ((self.PARAM_IN_KMER_SIZES in params) and (params[self.PARAM_IN_KMER_SIZES] is not None)):
        if (len(params[self.PARAM_IN_KMER_SIZES]) > 0):
            kmer_sizes = ','.join((str(num) for num in params[self.PARAM_IN_KMER_SIZES]))
    skip_error_correction = 0
    if ((self.PARAM_IN_SKIP_ERR_CORRECT in params) and (params[self.PARAM_IN_SKIP_ERR_CORRECT] is not None)):
        if (params[self.PARAM_IN_SKIP_ERR_CORRECT] == 1):
            skip_error_correction = 1
    spades_out = self.exec_spades(params[self.PARAM_IN_DNA_SOURCE], reads_data, phred_type, kmer_sizes, skip_error_correction)
    self.log(('SPAdes output dir: ' + spades_out))
    output_contigs = os.path.join(spades_out, 'scaffolds.fasta')
    self.log('Uploading FASTA file to Assembly')
    assemblyUtil = AssemblyUtil(self.callbackURL, token=ctx['token'], service_ver='release')
    if (params.get('min_contig_length', 0) > 0):
        assemblyUtil.save_assembly_from_fasta({'file': {'path': output_contigs}, 'workspace_name': wsname, 'assembly_name': params[self.PARAM_IN_CS_NAME], 'min_contig_length': params['min_contig_length']})
        (report_name, report_ref) = self.load_report((output_contigs + '.filtered.fa'), params, wsname)
    else:
        assemblyUtil.save_assembly_from_fasta({'file': {'path': output_contigs}, 'workspace_name': wsname, 'assembly_name': params[self.PARAM_IN_CS_NAME]})
        (report_name, report_ref) = self.load_report(output_contigs, params, wsname)
    output = {'report_name': report_name, 'report_ref': report_ref}
    if (not isinstance(output, dict)):
        raise ValueError(('Method run_SPAdes return value ' + 'output is not type dict as required.'))
    return [output]
Run SPAdes on paired end libraries
:param params: instance of type "SPAdesParams" (Input parameters for
   running SPAdes. workspace_name - the name of the workspace from
   which to take input and store output. output_contigset_name - the
   name of the output contigset read_libraries - a list of Illumina
   PairedEndLibrary files in FASTQ or BAM format. dna_source -
   (optional) the source of the DNA used for sequencing
   'single_cell': DNA amplified from a single cell via MDA anything
   else: Standard DNA sample from multiple cells. Default value is
   None. min_contig_length - (optional) integer to filter out contigs
   with length < min_contig_length from the SPAdes output. Default
   value is 0 implying no filter. kmer_sizes - (optional) K-mer
   sizes, Default values: 33, 55, 77, 99, 127 (all values must be
   odd, less than 128 and listed in ascending order) In the absence
   of these values, K values are automatically selected.
   skip_error_correction - (optional) Assembly only (No error
   correction). By default this is disabled.) -> structure: parameter
   "workspace_name" of String, parameter "output_contigset_name" of
   String, parameter "read_libraries" of list of type
   "paired_end_lib" (The workspace object name of a PairedEndLibrary
   file, whether of the KBaseAssembly or KBaseFile type.), parameter
   "dna_source" of String, parameter "min_contig_length" of Long,
   parameter "kmer_sizes" of list of Long, parameter
   "skip_error_correction" of type "bool" (A boolean. 0 = false,
   anything else = true.)
:returns: instance of type "SPAdesOutput" (Output parameters for
   SPAdes run. report_name - the name of the KBaseReport.Report
   workspace object. report_ref - the workspace reference of the
   report.) -> structure: parameter "report_name" of String,
   parameter "report_ref" of String
def run_SPAdes(self, ctx, params):
    '\n        Run SPAdes on paired end libraries\n        :param params: instance of type "SPAdesParams" (Input parameters for\n           running SPAdes. workspace_name - the name of the workspace from\n           which to take input and store output. output_contigset_name - the\n           name of the output contigset read_libraries - a list of Illumina\n           PairedEndLibrary files in FASTQ or BAM format. dna_source -\n           (optional) the source of the DNA used for sequencing\n           \'single_cell\': DNA amplified from a single cell via MDA anything\n           else: Standard DNA sample from multiple cells. Default value is\n           None. min_contig_length - (optional) integer to filter out contigs\n           with length < min_contig_length from the SPAdes output. Default\n           value is 0 implying no filter. kmer_sizes - (optional) K-mer\n           sizes, Default values: 33, 55, 77, 99, 127 (all values must be\n           odd, less than 128 and listed in ascending order) In the absence\n           of these values, K values are automatically selected.\n           skip_error_correction - (optional) Assembly only (No error\n           correction). By default this is disabled.) -> structure: parameter\n           "workspace_name" of String, parameter "output_contigset_name" of\n           String, parameter "read_libraries" of list of type\n           "paired_end_lib" (The workspace object name of a PairedEndLibrary\n           file, whether of the KBaseAssembly or KBaseFile type.), parameter\n           "dna_source" of String, parameter "min_contig_length" of Long,\n           parameter "kmer_sizes" of list of Long, parameter\n           "skip_error_correction" of type "bool" (A boolean. 0 = false,\n           anything else = true.)\n        :returns: instance of type "SPAdesOutput" (Output parameters for\n           SPAdes run. report_name - the name of the KBaseReport.Report\n           workspace object. report_ref - the workspace reference of the\n           report.) -> structure: parameter "report_name" of String,\n           parameter "report_ref" of String\n        '
    self.log(('Running run_SPAdes with params:\n' + pformat(params)))
    token = ctx['token']
    self.process_params(params)
    wsname = params[self.PARAM_IN_WS]
    obj_ids = []
    for r in params[self.PARAM_IN_LIB]:
        obj_ids.append({'ref': (r if ('/' in r) else ((wsname + '/') + r))})
    ws = Workspace(self.workspaceURL, token=token)
    ws_info = ws.get_object_info_new({'objects': obj_ids})
    reads_params = []
    reftoname = {}
    for (wsi, oid) in zip(ws_info, obj_ids):
        ref = oid['ref']
        reads_params.append(ref)
        obj_name = wsi[1]
        reftoname[ref] = ((wsi[7] + '/') + obj_name)
    readcli = ReadsUtils(self.callbackURL, token=ctx['token'])
    typeerr = ((('Supported types: KBaseFile.SingleEndLibrary ' + 'KBaseFile.PairedEndLibrary ') + 'KBaseAssembly.SingleEndLibrary ') + 'KBaseAssembly.PairedEndLibrary')
    try:
        reads = readcli.download_reads({'read_libraries': reads_params, 'interleaved': 'false', 'gzipped': None})['files']
    except ServerError as se:
        self.log('logging stacktrace from dynamic client error')
        self.log(se.data)
        if (typeerr in se.message):
            prefix = se.message.split('.')[0]
            raise ValueError((((prefix + '. Only the types ') + 'KBaseAssembly.PairedEndLibrary ') + 'and KBaseFile.PairedEndLibrary are supported'))
        else:
            raise
    self.log(('Got reads data from converter:\n' + pformat(reads)))
    phred_type = self.check_reads(params, reads, reftoname)
    reads_data = []
    for ref in reads:
        reads_name = reftoname[ref]
        f = reads[ref]['files']
        seq_tech = reads[ref]['sequencing_tech']
        if (f['type'] == 'interleaved'):
            reads_data.append({'fwd_file': f['fwd'], 'type': 'paired', 'seq_tech': seq_tech})
        elif (f['type'] == 'paired'):
            reads_data.append({'fwd_file': f['fwd'], 'rev_file': f['rev'], 'type': 'paired', 'seq_tech': seq_tech})
        elif (f['type'] == 'single'):
            reads_data.append({'fwd_file': f['fwd'], 'type': 'single', 'seq_tech': seq_tech})
        else:
            raise ValueError(('Something is very wrong with read lib' + reads_name))
    kmer_sizes = None
    if ((self.PARAM_IN_KMER_SIZES in params) and (params[self.PARAM_IN_KMER_SIZES] is not None)):
        if (len(params[self.PARAM_IN_KMER_SIZES]) > 0):
            kmer_sizes = ','.join((str(num) for num in params[self.PARAM_IN_KMER_SIZES]))
    skip_error_correction = 0
    if ((self.PARAM_IN_SKIP_ERR_CORRECT in params) and (params[self.PARAM_IN_SKIP_ERR_CORRECT] is not None)):
        if (params[self.PARAM_IN_SKIP_ERR_CORRECT] == 1):
            skip_error_correction = 1
    spades_out = self.exec_spades(params[self.PARAM_IN_DNA_SOURCE], reads_data, phred_type, kmer_sizes, skip_error_correction)
    self.log(('SPAdes output dir: ' + spades_out))
    output_contigs = os.path.join(spades_out, 'scaffolds.fasta')
    self.log('Uploading FASTA file to Assembly')
    assemblyUtil = AssemblyUtil(self.callbackURL, token=ctx['token'], service_ver='release')
    if (params.get('min_contig_length', 0) > 0):
        assemblyUtil.save_assembly_from_fasta({'file': {'path': output_contigs}, 'workspace_name': wsname, 'assembly_name': params[self.PARAM_IN_CS_NAME], 'min_contig_length': params['min_contig_length']})
        (report_name, report_ref) = self.load_report((output_contigs + '.filtered.fa'), params, wsname)
    else:
        assemblyUtil.save_assembly_from_fasta({'file': {'path': output_contigs}, 'workspace_name': wsname, 'assembly_name': params[self.PARAM_IN_CS_NAME]})
        (report_name, report_ref) = self.load_report(output_contigs, params, wsname)
    output = {'report_name': report_name, 'report_ref': report_ref}
    if (not isinstance(output, dict)):
        raise ValueError(('Method run_SPAdes return value ' + 'output is not type dict as required.'))
    return [output]