def compress(taxid=9606, target='../gpickle'): if not os.path.exists(target): os.mkdir(target) source = os.path.join(global_settings.pickle_folder, f'taxid{taxid}') for pf in os.listdir(source): p = ProteinCore().load(file=os.path.join(source, pf)) p.gdump(file=os.path.join(target, os.path.splitext(pf)[0] + '.gzp'))
def compress( taxid=9606, target='/home/matteo/Coding/Michelanglo/MichelaNGLo-human-protein-data/gpickle' ): if not os.path.exists(target): os.mkdir(target) source = os.path.join(global_settings.pickle_folder, f'taxid{taxid}') for pf in os.listdir(source): p = ProteinCore().load(file=os.path.join(source, pf)) p.gdump(file=os.path.join(target, os.path.splitext(pf)[0] + '.gzp'))