

def save_features_and_arrays(features, arrays, prefix, compressed=False, link_features=False, overwrite=False):
    '\n    Saves NumPy arrays of processed data, along with the features that\n    correspond to each row, to files for later use.\n\n    Two files will be saved, both starting with `prefix`:\n\n        prefix.features : a file of features.  If GFF features were provided,\n        this will be in GFF format, if BED features were provided it will be in\n        BED format, and so on.\n\n        prefix.npz : A NumPy .npz file.\n\n    Parameters\n    ----------\n    arrays : dict of NumPy arrays\n        Rows in each array should correspond to `features`.  This dictionary is\n        passed to np.savez\n\n    features : iterable of Feature-like objects\n        This is usually the same features that were used to create the array in\n        the first place.\n\n    link_features : bool\n        If True, then assume that `features` is either a pybedtools.BedTool\n        pointing to a file, or a filename.  In this case, instead of making\n        a copy, a symlink will be created to the original features.  This helps\n        save disk space.\n\n    prefix : str\n        Path to where data will be saved.\n\n    compressed : bool\n        If True, saves arrays using np.savez_compressed rather than np.savez.\n        This will save disk space, but will be slower when accessing the data\n        later.\n    '
    if link_features:
        if isinstance(features, pybedtools.BedTool):
            assert isinstance(features.fn, basestring)
            features_filename = features.fn
        else:
            assert isinstance(features, basestring)
            features_filename = features
        if compressed:
            force_flag = '-f'
        else:
            force_flag = ''
        cmds = ['ln', '-s', force_flag, os.path.abspath(features_filename), (prefix + '.features')]
        os.system(' '.join(cmds))
    else:
        pybedtools.BedTool(features).saveas((prefix + '.features'))
    if compressed:
        np.savez_compressed(prefix, **arrays)
    else:
        np.savez(prefix, **arrays)

dataset/ETHPy150Open daler/metaseq/metaseq/persistence.py save_features_and_arrays/VarMisuse@80/607 `overwrite`->`compressed`