def main_duplication(reads_length, multiple_count, single_count, bp,
                     repeat_time, copy_number):

    sum_info = {}
    for ti in range(int(repeat_time)):
        raw_fasta_prefix = "raw_duplication_" + str(ti +
                                                    1) + "_" + str(bp) + "bp"
        raw_fasta = produce_fasta(raw_fasta_prefix)
        multiple_output = "/".join(
            raw_fasta.split("/")[:2]) + "/multiple" + '_' + str(
                ti + 1) + '_dup_' + str(bp) + "bp" + "_"
        single_output = "/".join(
            raw_fasta.split("/")[:2]) + "/single" + '_' + str(
                ti + 1) + '_dup_' + str(bp) + "bp" + "_"
        produce_fq(raw_fasta, reads_length, multiple_count, multiple_output)
        info_record = duplication_bp(bp, raw_fasta, copy_number)
        new_fasta = info_record['fasta']
        produce_fq(new_fasta, reads_length, single_count, single_output)
        files = [multiple_output, single_output]
        fq1, fq2 = merge_file(files)
        info_record['fq1'] = fq1
        info_record['fq2'] = fq2
        info_record['raw_fasta'] = raw_fasta
        sum_info[(ti + 1)] = info_record
        dup_sum_info = info_sorting(sum_info)
        ### add tools to be tested here ###

        ###################################

    return sum_info, dup_sum_info
Esempio n. 2
0
def test_produce_fasta():

    fasta_name = produce_fasta(test)
    print(fasta_name)