# Path: constants.py
# TFFM_KIND = enum(FIRST_ORDER="1st-order", DETAILED="detailed",
#                  ZERO_ORDER="0-order")


import sys
import tffm_module
from constants import TFFM_KIND
sys.path.append("/home/amathelier/PostDoc/HMM/GHMM/src/TFFM-framework_github")

tffm_first_order = tffm_module.tffm_from_meme("meme.txt", TFFM_KIND.FIRST_ORDER)
tffm_first_order.write("tffm_first_order_initial.xml")
tffm_first_order.train("train.fa")
tffm_first_order.write("tffm_first_order.xml")
out = open("tffm_first_order_summary_logo.svg", "w")
tffm_first_order.print_summary_logo(out)
out.close()
out = open("tffm_first_order_dense_logo.svg", "w")
tffm_first_order.print_dense_logo(out)
out.close()

tffm_detailed = tffm_module.tffm_from_meme("meme.txt", TFFM_KIND.DETAILED)
tffm_detailed.write("tffm_detailed_initial.xml")
tffm_detailed.train("train.fa")
tffm_detailed.write("tffm_detailed.xml")
out = open("tffm_detailed_summary_logo.svg", "w")
tffm_detailed.print_summary_logo(out)
out.close()
out = open("tffm_detailed_dense_logo.svg", "w")
tffm_detailed.print_dense_logo(out)
out.close()

tffm_first_order = tffm_module.tffm_from_xml("tffm_first_order.xml",

# Path: constants.py
# TFFM_KIND = enum(FIRST_ORDER="1st-order", DETAILED="detailed",
#                  ZERO_ORDER="0-order")


# Path: tutorial/test_TFFM.py
import sys
import tffm_module
from constants import TFFM_KIND

sys.path.append("/home/amathelier/PostDoc/HMM/GHMM/src/TFFM-framework_github")

tffm_first_order = tffm_module.tffm_from_meme("meme.txt", TFFM_KIND.FIRST_ORDER)
tffm_first_order.write("tffm_first_order_initial.xml")
tffm_first_order.train("train.fa")
tffm_first_order.write("tffm_first_order.xml")
out = open("tffm_first_order_summary_logo.svg", "w")
tffm_first_order.print_summary_logo(out)
out.close()
out = open("tffm_first_order_dense_logo.svg", "w")
tffm_first_order.print_dense_logo(out)
out.close()

tffm_detailed = tffm_module.tffm_from_meme("meme.txt", TFFM_KIND.DETAILED)
tffm_detailed.write("tffm_detailed_initial.xml")
tffm_detailed.train("train.fa")
tffm_detailed.write("tffm_detailed.xml")
out = open("tffm_detailed_summary_logo.svg", "w")
tffm_detailed.print_summary_logo(out)
out.close()
out = open("tffm_detailed_dense_logo.svg", "w")
tffm_detailed.print_dense_logo(out)
out.close()

tffm_first_order = tffm_module.tffm_from_xml("tffm_first_order.xml",

        TFFM_KIND.FIRST_ORDER)