ultraplex/__main__.py
def start_workers(n_workers, input_file, need_work_queue, adapter,
                  five_p_bcs, three_p_bcs, save_name, total_demultiplexed, total_reads_assigned,
                  total_reads_qtrimmed, total_reads_adaptor_trimmed, total_reads_5p_no_3p,
                  min_score_5_p, three_p_mismatches, linked_bcds, three_p_trim_q,
                  ultra_mode, output_directory, final_min_length, q5, i2, adapter2, min_trim,
                  ignore_no_match, dont_build_reference, keep_barcode):
    """
	This function starts all the workers
	"""
    workers = []
    all_conn_r = []
    all_conn_w = []

    total_demultiplexed.put([0, 0])  # [total written, last time it was printed] - initialise [0,0]
    total_reads_assigned.put(0)
    total_reads_qtrimmed.put(0)
    total_reads_adaptor_trimmed.put(0)
    total_reads_5p_no_3p.put(0)

    for index in range(n_workers):
        # create a pipe to send data to this worker
        conn_r, conn_w = Pipe(duplex=False)
        all_conn_r.append(conn_r)
        all_conn_w.append(conn_w)

        worker = WorkerProcess(index=index,
                               read_pipe=conn_r,  # this is the "read_pipe"
                               need_work_queue=need_work_queue,  # worker tells the reader it needs work
                               adapter=adapter,  # the 3' adapter to trim
                               output_directory=output_directory,
                               five_p_bcs=five_p_bcs,
                               three_p_bcs=three_p_bcs,
                               save_name=save_name,
                               total_demultiplexed=total_demultiplexed,
                               total_reads_assigned=total_reads_assigned,
                               total_reads_qtrimmed=total_reads_qtrimmed,
                               total_reads_adaptor_trimmed=total_reads_adaptor_trimmed,
                               total_reads_5p_no_3p=total_reads_5p_no_3p,
                               ultra_mode=ultra_mode,
                               min_score_5_p=min_score_5_p,
                               three_p_mismatches=three_p_mismatches,
                               linked_bcds=linked_bcds,
                               three_p_trim_q=three_p_trim_q,
                               q5=q5,
                               i2=i2,
                               adapter2=adapter2,
                               min_trim=min_trim,
                               ignore_no_match=ignore_no_match,
                               final_min_length=final_min_length,
                               dont_build_reference=dont_build_reference,
                               keep_barcode=keep_barcode)

        worker.start()
        workers.append(worker)

    return workers, all_conn_r, all_conn_w

	This function starts all the workers
	
This function starts all the workers
This function starts all the workers
def start_workers(n_workers, input_file, need_work_queue, adapter,
                  five_p_bcs, three_p_bcs, save_name, total_demultiplexed, total_reads_assigned,
                  total_reads_qtrimmed, total_reads_adaptor_trimmed, total_reads_5p_no_3p,
                  min_score_5_p, three_p_mismatches, linked_bcds, three_p_trim_q,
                  ultra_mode, output_directory, final_min_length, q5, i2, adapter2, min_trim,
                  ignore_no_match, dont_build_reference, keep_barcode):
    workers = []
    all_conn_r = []
    all_conn_w = []
    total_demultiplexed.put([0, 0])  
    total_reads_assigned.put(0)
    total_reads_qtrimmed.put(0)
    total_reads_adaptor_trimmed.put(0)
    total_reads_5p_no_3p.put(0)
    for index in range(n_workers):
        conn_r, conn_w = Pipe(duplex=False)
        all_conn_r.append(conn_r)
        all_conn_w.append(conn_w)
        worker = WorkerProcess(index=index,
                               read_pipe=conn_r,  
                               need_work_queue=need_work_queue,  
                               adapter=adapter,  
                               output_directory=output_directory,
                               five_p_bcs=five_p_bcs,
                               three_p_bcs=three_p_bcs,
                               save_name=save_name,
                               total_demultiplexed=total_demultiplexed,
                               total_reads_assigned=total_reads_assigned,
                               total_reads_qtrimmed=total_reads_qtrimmed,
                               total_reads_adaptor_trimmed=total_reads_adaptor_trimmed,
                               total_reads_5p_no_3p=total_reads_5p_no_3p,
                               ultra_mode=ultra_mode,
                               min_score_5_p=min_score_5_p,
                               three_p_mismatches=three_p_mismatches,
                               linked_bcds=linked_bcds,
                               three_p_trim_q=three_p_trim_q,
                               q5=q5,
                               i2=i2,
                               adapter2=adapter2,
                               min_trim=min_trim,
                               ignore_no_match=ignore_no_match,
                               final_min_length=final_min_length,
                               dont_build_reference=dont_build_reference,
                               keep_barcode=keep_barcode)
        worker.start()
        workers.append(worker)
    return workers, all_conn_r, all_conn_w
def start_workers ( n_workers , input_file , need_work_queue , adapter , five_p_bcs , three_p_bcs , save_name , total_demultiplexed , total_reads_assigned , total_reads_qtrimmed , total_reads_adaptor_trimmed , total_reads_5p_no_3p , min_score_5_p , three_p_mismatches , linked_bcds , three_p_trim_q , ultra_mode , output_directory , final_min_length , q5 , i2 , adapter2 , min_trim , ignore_no_match , dont_build_reference , keep_barcode ) : workers = [ ] all_conn_r = [ ] all_conn_w = [ ] total_demultiplexed . put ( [ 0 , 0 ] ) total_reads_assigned . put ( 0 ) total_reads_qtrimmed . put ( 0 ) total_reads_adaptor_trimmed . put ( 0 ) total_reads_5p_no_3p . put ( 0 ) for index in range ( n_workers ) : conn_r , conn_w = Pipe ( duplex = False ) all_conn_r . append ( conn_r ) all_conn_w . append ( conn_w ) worker = WorkerProcess ( index = index , read_pipe = conn_r , need_work_queue = need_work_queue , adapter = adapter , output_directory = output_directory , five_p_bcs = five_p_bcs , three_p_bcs = three_p_bcs , save_name = save_name , total_demultiplexed = total_demultiplexed , total_reads_assigned = total_reads_assigned , total_reads_qtrimmed = total_reads_qtrimmed , total_reads_adaptor_trimmed = total_reads_adaptor_trimmed , total_reads_5p_no_3p = total_reads_5p_no_3p , ultra_mode = ultra_mode , min_score_5_p = min_score_5_p , three_p_mismatches = three_p_mismatches , linked_bcds = linked_bcds , three_p_trim_q = three_p_trim_q , q5 = q5 , i2 = i2 , adapter2 = adapter2 , min_trim = min_trim , ignore_no_match = ignore_no_match , final_min_length = final_min_length , dont_build_reference = dont_build_reference , keep_barcode = keep_barcode ) worker . start ( ) workers . append ( worker ) return workers , all_conn_r , all_conn_w
This function starts all the workers
This function starts all the workers
"""
	This function starts all the workers
	""" # [total written, last time it was printed] - initialise [0,0]
 # create a pipe to send data to this worker
 # this is the "read_pipe"
 # worker tells the reader it needs work
 # the 3' adapter to trim

n_workers
input_file
need_work_queue
adapter
five_p_bcs
three_p_bcs
save_name
total_demultiplexed
total_reads_assigned
total_reads_qtrimmed
total_reads_adaptor_trimmed
total_reads_5p_no_3p
min_score_5_p
three_p_mismatches
linked_bcds
three_p_trim_q
ultra_mode
output_directory
final_min_length
q5
i2
adapter2
min_trim
ignore_no_match
dont_build_reference
keep_barcode