def test_pdb_mutation_pipeline_have_sequences(pdb_id):
    """Make sure that we can copy folders with precalculated Provean score(s).
    """
    unique_temp_dir_old = _get_unique_temp_dir(pdb_id)
    unique_temp_dir = op.join(op.splitext(__file__)[0], pdb_id + '_have_sequences', '.elaspic')
    os.makedirs(unique_temp_dir, exist_ok=True)
    try:
        shutil.copy2(
            op.join(unique_temp_dir_old, 'sequence.json'),
            op.join(unique_temp_dir, 'sequence.json'))
        shutil.copytree(
            op.join(unique_temp_dir_old, 'sequence'),
            op.join(unique_temp_dir, 'sequence'))
        conf.read_configuration_file(
            DEFAULT={
                'unique_temp_dir': unique_temp_dir
            },
            EXTERNAL_DIRS={
                'pdb_dir': os.environ['PDB_DIR'],
                'blast_db_dir': os.environ['BLAST_DB_DIR'],
                'archive_dir': os.environ['ARCHIVE_DIR']
            }
        )
        os.chdir(unique_temp_dir)
        helper_fns.run_pdb_mutation_pipeline(
            pdb_id, pdb_mutatations, have_sequences=True)
    except:
        raise
    finally:
        shutil.rmtree(unique_temp_dir)
def test_pdb_mutation_pipeline(pdb_id):
    """Canonical folder.
    """
    unique_temp_dir = _get_unique_temp_dir(pdb_id)
    os.makedirs(unique_temp_dir, exist_ok=True)
    conf.read_configuration_file(
        DEFAULT={
            'unique_temp_dir': unique_temp_dir
        },
        EXTERNAL_DIRS={
            'pdb_dir': os.environ['PDB_DIR'],
            'blast_db_dir': os.environ['BLAST_DB_DIR'],
            'archive_dir': os.environ['ARCHIVE_DIR']
        }
    )
    os.chdir(unique_temp_dir)
    helper_fns.run_pdb_mutation_pipeline(pdb_id, pdb_mutatations)