ultraplex/__main__.py
def make_dict_of_3p_bc_dicts(linked_bcds, three_p_mismatches, dont_build_reference):
    """
	this function makes a different dictionary for each 5' barcode
	it also checks that they're all the same length
	"""

    d = {}
    min_score_d = {}
    for five_p_bc, three_p_bcs in linked_bcds.items():
        if len(three_p_bcs) > 0:  # ie this 5' barcode has 3' barcodes
            # check they're consistent
            check_N_position(three_p_bcs, "3")
            # work out the min score - only do first one because already checked they're consistent
            min_score = len([a for a, b in enumerate(three_p_bcs[0]) if b != "N"]) - three_p_mismatches
            if dont_build_reference:
                d[five_p_bc] = "dont_build"
            else:
                this_dict = make_3p_bc_dict(three_p_bcs, min_score)
                d[five_p_bc] = this_dict
            min_score_d[five_p_bc] = min_score

    return d, min_score_d

	this function makes a different dictionary for each 5' barcode
	it also checks that they're all the same length
	
this function makes a different dictionary for each 5' barcode
it also checks that they're all the same length
this function makes a different dictionary for each 5 ' barcode it also checks that they ' re all the same length
def make_dict_of_3p_bc_dicts(linked_bcds, three_p_mismatches, dont_build_reference):
    d = {}
    min_score_d = {}
    for five_p_bc, three_p_bcs in linked_bcds.items():
        if len(three_p_bcs) > 0:  
            check_N_position(three_p_bcs, "3")
            min_score = len([a for a, b in enumerate(three_p_bcs[0]) if b != "N"]) - three_p_mismatches
            if dont_build_reference:
                d[five_p_bc] = "dont_build"
            else:
                this_dict = make_3p_bc_dict(three_p_bcs, min_score)
                d[five_p_bc] = this_dict
            min_score_d[five_p_bc] = min_score
    return d, min_score_d
def make_dict_of_3p_bc_dicts ( linked_bcds , three_p_mismatches , dont_build_reference ) : d = { } min_score_d = { } for five_p_bc , three_p_bcs in linked_bcds . items ( ) : if len ( three_p_bcs ) > 0 : check_N_position ( three_p_bcs , "3" ) min_score = len ( [ a for a , b in enumerate ( three_p_bcs [ 0 ] ) if b != "N" ] ) - three_p_mismatches if dont_build_reference : d [ five_p_bc ] = "dont_build" else : this_dict = make_3p_bc_dict ( three_p_bcs , min_score ) d [ five_p_bc ] = this_dict min_score_d [ five_p_bc ] = min_score return d , min_score_d
this function makes a different dictionary for each 5' barcode
it also checks that they're all the same length
this function makes a different dictionary for each 5 ' barcode it also checks that they ' re all the same length
"""
	this function makes a different dictionary for each 5' barcode
	it also checks that they're all the same length
	""" # ie this 5' barcode has 3' barcodes
 # check they're consistent
 # work out the min score - only do first one because already checked they're consistent

linked_bcds
three_p_mismatches
dont_build_reference