Python code for converting from GWES pairs file to JSON format readable by Rede. Matlab code not working