def format_info_frags(info_frags):
    """A function to seamlessly run on either scaffold dictionaries or
    info_frags.txt files without having to check the input first.
    """
    if isinstance(info_frags, dict):
        return info_frags
    else:
        try:
            scaffolds = parse_info_frags(info_frags)
            return scaffolds
        except OSError:
            print("Error when opening info_frags.txt")
            raise
def format_info_frags ( info_frags ) : if isinstance ( info_frags , dict ) : return info_frags else : try : scaffolds = parse_info_frags ( info_frags ) return scaffolds except OSError : print ( "Error when opening info_frags.txt" ) raise
A function to seamlessly run on either scaffold dictionaries or
    info_frags.txt files without having to check the input first.