def join_warps(reference, affine_fs_2_anat, affine_anat_2_atlas,
    warp_anat_2_atlas):
    """
        join warps to align freesurfer output to atlas
    """
    import os
    cwd = os.getcwd()
    fs_concat_transform = os.path.join(cwd, 'fs_concat_transform.nii.gz')
    command = (
        'antsApplyTransforms -f 0.0 -d 3 -o [{},1] -t {} -t {} -t {} -r {} -v'
        .format(fs_concat_transform, warp_anat_2_atlas, affine_anat_2_atlas,
        affine_fs_2_anat, reference))
    print(command)
    os.system(command)
    return fs_concat_transform
