from subprocess import run
import os.path

def predict_genes_balrog(contigs_fasta, output_prefix):
    run((
        'balrog',
        '-i', contigs_fasta,
        '-o', f'{output_prefix}.balrog'
    ))

def _predict_genes_balrog(run_accession, contigs_dir, genes_dir):
    predict_genes_balrog(
        os.path.join(contigs_dir, f'{run_accession}.contigs.fa'),
        os.path.join(genes_dir, run_accession)
    )

