Gravar-mail: An algebra-based method for inferring gene regulatory networks