'FASTQ files are split on cluster boundaries, in increments of 4 lines'

def split(cls, input_datasets, subdir_generator_function, split_params):

    if (split_params is None):
        return None
    toc_file_datasets = []
    for ds in input_datasets:
        tmp_ds = ds
        fqtoc_file = None
        while ((fqtoc_file is None) and (tmp_ds is not None)):
            fqtoc_file = tmp_ds.get_converted_files_by_type('fqtoc')
            tmp_ds = tmp_ds.copied_from_library_dataset_dataset_association
        if (fqtoc_file is not None):
            toc_file_datasets.append(fqtoc_file)
    if (len(toc_file_datasets) == len(input_datasets)):
        return cls.do_fast_split(input_datasets, toc_file_datasets, subdir_generator_function, split_params)
    return cls.do_slow_split(input_datasets, subdir_generator_function, split_params)
