def check_reads(self, params, reads, reftoname):
    (phred64_reads, phred33_reads, unknown_phred_reads) = (set() for i in range(3))
    for ref in reads:
        rds = reads[ref]
        obj_name = reftoname[ref]
        obj_ref = rds['ref']
        if (rds['phred_type'] == '33'):
            phred33_reads.add(obj_name)
        elif (rds['phred_type'] == '64'):
            phred64_reads.add(obj_name)
        else:
            unknown_phred_reads.add(ref)
        if (rds['read_orientation_outward'] == self.TRUE):
            raise ValueError((('Reads object {} ({}) is marked as having outward ' + 'oriented reads, which SPAdes does not ') + 'support.').format(obj_name, obj_ref))
        if ((rds['single_genome'] == self.FALSE) and (params[self.PARAM_IN_DNA_SOURCE] != self.PARAM_IN_METAGENOME)):
            raise ValueError((('Reads object {} ({}) is marked as containing ' + 'metagenomic data but the assembly method was not ') + 'specified as metagenomic').format(obj_name, obj_ref))
    if (len(unknown_phred_reads) > 0):
        (phred64_reads, phred33_reads) = self.determine_unknown_phreds(reads, phred64_reads, phred33_reads, unknown_phred_reads, reftoname)
    if ((len(phred64_reads) > 0) and (len(phred33_reads) > 0)):
        raise ValueError((((('The set of Reads objects passed in have reads that have different ' + 'phred type scores. SPAdes does not support assemblies of ') + 'reads with different phred type scores.\nThe following read objects ') + 'have phred 33 scores : {}.\nThe following read objects have phred 64 ') + 'scores : {}').format(', '.join(phred33_reads), ', '.join(phred64_reads)))
    elif (len(phred64_reads) > 0):
        return '64'
    elif (len(phred33_reads) > 0):
        return '33'
    else:
        raise ValueError('The phred type of the read(s) was unable to be determined')
def check_reads(self, params, reads, reftoname):
    (phred64_reads, phred33_reads, unknown_phred_reads) = (set() for i in range(3))
    for ref in reads:
        rds = reads[ref]
        obj_name = reftoname[ref]
        obj_ref = rds['ref']
        if (rds['phred_type'] == '33'):
            phred33_reads.add(obj_name)
        elif (rds['phred_type'] == '64'):
            phred64_reads.add(obj_name)
        else:
            unknown_phred_reads.add(ref)
        if (rds['read_orientation_outward'] == self.TRUE):
            raise ValueError((('Reads object {} ({}) is marked as having outward ' + 'oriented reads, which SPAdes does not ') + 'support.').format(obj_name, obj_ref))
        if ((rds['single_genome'] == self.FALSE) and (params[self.PARAM_IN_DNA_SOURCE] != self.PARAM_IN_METAGENOME)):
            raise ValueError((('Reads object {} ({}) is marked as containing ' + 'metagenomic data but the assembly method was not ') + 'specified as metagenomic').format(obj_name, obj_ref))
    if (len(unknown_phred_reads) > 0):
        (phred64_reads, phred33_reads) = self.determine_unknown_phreds(reads, phred64_reads, phred33_reads, unknown_phred_reads, reftoname)
    if ((len(phred64_reads) > 0) and (len(phred33_reads) > 0)):
        raise ValueError((((('The set of Reads objects passed in have reads that have different ' + 'phred type scores. SPAdes does not support assemblies of ') + 'reads with different phred type scores.\nThe following read objects ') + 'have phred 33 scores : {}.\nThe following read objects have phred 64 ') + 'scores : {}').format(', '.join(phred33_reads), ', '.join(phred64_reads)))
    elif (len(phred64_reads) > 0):
        return '64'
    elif (len(phred33_reads) > 0):
        return '33'
    else:
        raise ValueError('The phred type of the read(s) was unable to be determined')