ultraplex/__main__.py
def make_5p_bc_dict(barcodes, min_score, dont_build_reference):
    """
	this function generates a dictionary that matches each possible sequence
	from the read with the best 5' barcode
	"""
    if dont_build_reference:
        return {"dont_build": True}
    else:
        first_bc = barcodes[0]
        seq_length = len(first_bc.replace("N", ""))

        # check all the barcodes are the same length (ignoring UMIs)
        for bc in barcodes:
            assert len(bc.replace("N", "")) == seq_length, "Your experimental barcodes are different lengths."

        seqs = make_all_seqs(seq_length)

        # trim sequences to desired length
        # create dictionary
        barcode_dictionary = {}

        for seq in seqs:
            barcode_dictionary[seq] = score_barcode_for_dict(seq, barcodes, min_score)
        return barcode_dictionary

	this function generates a dictionary that matches each possible sequence
	from the read with the best 5' barcode
	
this function generates a dictionary that matches each possible sequence
from the read with the best 5' barcode
this function generates a dictionary that matches each possible sequence from the read with the best 5 ' barcode
def make_5p_bc_dict(barcodes, min_score, dont_build_reference):
    if dont_build_reference:
        return {"dont_build": True}
    else:
        first_bc = barcodes[0]
        seq_length = len(first_bc.replace("N", ""))
        for bc in barcodes:
            assert len(bc.replace("N", "")) == seq_length, "Your experimental barcodes are different lengths."
        seqs = make_all_seqs(seq_length)
        barcode_dictionary = {}
        for seq in seqs:
            barcode_dictionary[seq] = score_barcode_for_dict(seq, barcodes, min_score)
        return barcode_dictionary
def make_5p_bc_dict ( barcodes , min_score , dont_build_reference ) : if dont_build_reference : return { "dont_build" : True } else : first_bc = barcodes [ 0 ] seq_length = len ( first_bc . replace ( "N" , "" ) ) for bc in barcodes : assert len ( bc . replace ( "N" , "" ) ) == seq_length , "Your experimental barcodes are different lengths." seqs = make_all_seqs ( seq_length ) barcode_dictionary = { } for seq in seqs : barcode_dictionary [ seq ] = score_barcode_for_dict ( seq , barcodes , min_score ) return barcode_dictionary
this function generates a dictionary that matches each possible sequence
from the read with the best 5' barcode
this function generates a dictionary that matches each possible sequence from the read with the best 5 ' barcode
"""
	this function generates a dictionary that matches each possible sequence
	from the read with the best 5' barcode
	""" # check all the barcodes are the same length (ignoring UMIs)
 # trim sequences to desired length
 # create dictionary

barcodes
min_score
dont_build_reference