lama/tests/test_permutation_stats.py
def copy_data():
    """
    Copy data over from the registration test output.
    Modify some data so we get some hits
    """
    outdir = permutation_stats_dir / 'output_with_hits'
    reg_root = permutation_stats_dir / 'registration_data'
    outdir.mkdir(exist_ok=True)
    reg_root.mkdir(exist_ok=True)
    wt_dir = reg_root / wt_registration_dir.name
    mut_dir = reg_root / mut_registration_dir.name
    shutil.rmtree(wt_dir, ignore_errors=True)
    shutil.rmtree(mut_dir, ignore_errors=True)
    shutil.copytree(wt_registration_dir, wt_dir )
    shutil.copytree(mut_registration_dir, mut_dir)

    # Now alter the organ volumes so we get some hits
    for ov_file in mut_dir.rglob('organ_volumes.csv'):
        df = read_spec_csv(ov_file)
        # Make organ 1 smaller and organ 2 larger
        df[['1']] *= 100
        df[['2']] /= 200
        df.to_csv(ov_file)

    Copy data over from the registration test output.
    Modify some data so we get some hits
    
Copy data over from the registration test output.
Modify some data so we get some hits
Copy data over from the registration test output . Modify some data so we get some hits
def copy_data():
    outdir = permutation_stats_dir / 'output_with_hits'
    reg_root = permutation_stats_dir / 'registration_data'
    outdir.mkdir(exist_ok=True)
    reg_root.mkdir(exist_ok=True)
    wt_dir = reg_root / wt_registration_dir.name
    mut_dir = reg_root / mut_registration_dir.name
    shutil.rmtree(wt_dir, ignore_errors=True)
    shutil.rmtree(mut_dir, ignore_errors=True)
    shutil.copytree(wt_registration_dir, wt_dir )
    shutil.copytree(mut_registration_dir, mut_dir)
    for ov_file in mut_dir.rglob('organ_volumes.csv'):
        df = read_spec_csv(ov_file)
        df[['1']] *= 100
        df[['2']] /= 200
        df.to_csv(ov_file)
def copy_data ( ) : outdir = permutation_stats_dir / 'output_with_hits' reg_root = permutation_stats_dir / 'registration_data' outdir . mkdir ( exist_ok = True ) reg_root . mkdir ( exist_ok = True ) wt_dir = reg_root / wt_registration_dir . name mut_dir = reg_root / mut_registration_dir . name shutil . rmtree ( wt_dir , ignore_errors = True ) shutil . rmtree ( mut_dir , ignore_errors = True ) shutil . copytree ( wt_registration_dir , wt_dir ) shutil . copytree ( mut_registration_dir , mut_dir ) for ov_file in mut_dir . rglob ( 'organ_volumes.csv' ) : df = read_spec_csv ( ov_file ) df [ [ '1' ] ] *= 100 df [ [ '2' ] ] /= 200 df . to_csv ( ov_file )
Copy data over from the registration test output.
Copy data over from the registration test output .
"""
    Copy data over from the registration test output.
    Modify some data so we get some hits
    """ # Now alter the organ volumes so we get some hits # Make organ 1 smaller and organ 2 larger