<commit_before>import argparse
import os
import sys
from tasks_v2 import Supervisor, Task
import task_functions_v2 as tf
import time

def gen_quality_supervisor(transrate_fastq1, transrate_fastq2, transrate_unpaired,  dependency_set, busco_ref, cpu=12, cegma_flag=False, transrate_reference=''):
    tasks = []
    cegma = tf.cegma_task(cpu, []) 
    busco = tf.busco_task(busco_ref, int(cpu/2), [])
    assembly_stats = tf.assembly_stats_task([])
    transrate = tf.transrate_task(transrate_fastq1, transrate_fastq2, transrate_unpaired, transrate_reference, int(round(float(cpu), 4)), [])
    tasks.append(transrate)
    tasks.append(assembly_stats)
    tasks.append(busco)
    if(cegma_flag):
        tasks.append(cegma)
    return Supervisor(tasks=tasks,dependencies=dependency_set)

if(__name__ == '__main__'):<commit_msg>quality edits for many busco refs, split transrate task structure<commit_after>import argparse
import os
import sys
from tasks_v2 import Supervisor, Task
import task_functions_v2 as tf
import time

def gen_quality_supervisor(transrate_fastq1, transrate_fastq2, transrate_unpaired,  dependency_set, busco_refs, cpu=12, cegma_flag=False, transrate_reference=''):
    tasks = []
    cegma = tf.cegma_task(cpu, []) 
    for busco_ref in busco_refs:
        tasks.append(tf.busco_task(busco_ref, int(cpu/2), []))
    assembly_stats = tf.assembly_stats_task([])
    transrate = tf.transrate_task(transrate_fastq1, transrate_fastq2, transrate_unpaired, "transrate_quality", transrate_reference, int(round(float(cpu), 4)), [])
    reference_name = os.path.basename(transrate_reference)
    transrateRef = tf.transrate_to_reference_task("transrate_" + reference_name, transrate_reference, int(round(float(cpu), 4)), [])
    tasks.append(transrate)
    tasks.append(transrateRef)
    tasks.append(assembly_stats)
    if(cegma_flag):
        tasks.append(cegma)
    return Supervisor(tasks=tasks,dependencies=dependency_set)

if(__name__ == '__main__'):
{'fraction_non_alphanumeric': 0.10823170731707317, 'fraction_numerical': 0.010670731707317074, 'mean_word_length': 5.908771929824561, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4357851', 'n_tokens_mistral': 688, 'n_tokens_neox': 669, 'n_words': 120}