import unittest
import tempfile
from pygor3 import IgorTask

str_mock_sequences = \
"""seq_index;nt_sequence
0;GCTGGCATTATCCAGTCACCCAAGCATGAGGTGACAGAAATGGGACAAACAGTGACTCTGAGATGTGAGCCAATTTTTGGCCACAATTTCCTTTTCTGGTACAGAGATACCTTCGTGCAGGGACTGGAATTGCTGAGTTACTTCCGGAGCTGATCTATTATAGATAATGCAGGTATGCCCACAGAGCGATTCTCAGCTGAGAGGCCTGATGGATCATTCTCTACTCTGAAGATCCAGCCTGCAGAGCAGGGGGACTCGGCCGTGTATGTCTGTGCAAGTCGCTTACCGTACAGGGGCTCATTTGAACACTGAAGCTTTCTTTGGACAAGGCACCAGACTCACAGTTGTAG
1;GATGCTAGAGTCACCCAGACACCAAGGCACAAGGTGACAGAGATGGGACAAGAAGTAACAATGAGATGTCAGCCAATTTTAGGCCACAATACTGTTTTCTGGTACAGACAGACCATGATGCAAGGACTGGAGTTGCTGGCTTACTTCCGCAACCGGGCTCCTCTAGATGATTCGGGGATGCCGAAGGATCGATTCTCAGCAGAGATGCCTGATGCAACTTTAGCCACTCTGAAGATCCAGCCCTCAGAACCCAGGGACTCAGCTGTGTATTTTTGTGCTAGATAGGGACGTTGAGCAGTTCTTCGGGCCAGGGACACGGCTCACCGTGCTAG
2;AATGCCGGCGTCATGCAGAACCCAAGACACCTGGTCAGGAGGAGGGGACAGGAGGCAAGACTGAGATGCAGCCCAATGAAAGGACACAGTCATGTTTACTGGTATCGGCAGCTCCCAGAGGAAGGTCTGAAATTCATGGTTTATCTCCAGAAAGAAAATATCATAGATGAGTCAGGAATGCCAAAGGAACGATTTTCTGCTGAATTTCCCAAAGAGGGCCCCAGCATCCTGAGGATCCAGCAGGTAGTGCGAGGAGATTCGGCAGCTTATTTCTGTGCCAGCTCCCTGAACACGGGGGGAGGGATCGAACACTGAAGCTTTCTTTGGACAAGGCACCAGACTCACAGTTGTAG
3;GACGCTGGAGTCACCCAAAGTCCCACACACCTGATCAAAACGAGAGGACAGCAAGTGACTCTGAGATGCTCTCCTAAGTCTGGGCATGACACTGTGTCCTGGTACCAACAGGCCCTGGGTCAGGGGCCCCAGTTTATCTTTCAGTATTATGAGGAGGAAGAGAGACAGAGAGGCAACTTCCCTGATCGATTCTCAGGTCACCAGTTCCCTAACTATAGCTCTGAGCTGAATGTGAACGCCTTGTTGCTGGGGGACTCGGCCCTCTATCTCTGTGCCAGCAGCTTCACAGGGGGCAGTCGCAACTAATGAAAAACTGTTTTTTGGCAGTGGAACCCAGCTCTCTGTCTTGG
4;ATATCTGGAGTCTCCCACAACCCCAGACACAAGATCACAAAGAGGGGACAGAATTTAACTTTCAGGTGTGATCCAATTTCTGAACACAACCGCCTTTATTGGTACCGACAGAACCCTGGGCAGGGCCCAGAGTTTCTGACTTACTTCCAGAATGAAGCTCAACTGGAAAAATCAGGGCTGCTCAGTGATCGGATCTCTGCAGAGAGGCCTAAGGGATCTTTCTCCACCTTGGAGATCCAGCGCACAGAGCAGGGGGACTCGGCCATGTATCTCTGTGCCAGCACCTTTCCGGGACATAGGTATAATTCACCCCTCCACTTTGGGAATGGGACCAGGCTCACTGTGACAG
5;GAAGCCCAAGTGACCCAGAACCCAAGATACCTCATCACAGTGACTGGAAAGAAGTTAACAGTGACTTGTTCTCAGAATATGAACCATGAGTATATGTCCTGGTAACGACAAGACCCAGGGCTGGGCTTAAGGCAGATCTACTATTCAATGAATGTTGAGGTGACTGATAAGGGAGATGTTCCTGAAGGGTACAAAGTCTCTCGAAAAGAGAAGAGGAATTTCCCCCTGATCCTGGAGTCGCCCAGCCCCAACCAGACCTCTCTGTACTTCTGTGCCAGCAGTATCGGGGGGGTACACTCTGGGGCCAACGTCCTGACTTTCGGGGCCGGCAGCAGGCTGACCGTGCTGG
6;GACGCTGGAGTCACCCAAAGTCCCACACACCTGATCAAAACGAGAGGACAGCAAGTGACTCTGAGATGCTCTCCTAAGTCTGGGCATGACACTGTGTCCTGGTACCAACAGGCCCTGGGTCAGGGGCCCCAGTTTATCTTTCAGTATTATGAGGAGGAAGAGAGACAGAGAGGCAACTTCCCTGATCGATTCTCAGGTCACCAGTTCCCTAACTATAGCTCTGAGCTGAATGTGAACGCCTTGTTGCTGGGGGACTCGGCCCTCTATCTCTGTGCCAGCAGCTCCCCCGGGACCGCGTGGCATGCCATGAACACTGAAGCTTTCTTTGGACAAGGCACCAGACTCACAGTTGTAG
7;AATGCTGGTGTCACTCAGACCCCAAAATTCCAGGTCCTGAAGACAGGACAGAGCATGACACTGCAGTGTGCCCAGGATATGAACCATGAATACATGTCCTGGTATCGACAAGACCCAGGCATGGGGCTGAGGCTGATTCATTACTCAGTTGGTGCTGGTATCACTGACCAAGGAGAAGTCCCCAATGGCTACAATGTCTCCAGATCAACCACAGAGGATTTCCCGCTCAGGCTGCTGTCGGCTGCTCCCTCCCAGACATCTGTGTACTTCTGTGCCAGCAGTTACTCGGTATAACGGGACAAACTTGATCAGCCCCAGCATTTTGGTGATGGGACTCGACTCTCCATCCTAG
8;GGAGCTGGAGTCTCCCAGTCCCCCAGTAACAAGGTCACAGAGAAGGGAAAGGATGTAGAGCTCAGGTGTGATCCAATTTCAGGTCATACTGCCCTTTACTGGTACCGACAGAGGCTGGGGCAGGGCCTGGAGTTTTTAATTTACTTCCAAGGCAACAGTGCACCAGACAAATCAGGGCTGCCCAGTGATCGCTTCTCTGCAGAGAGGACTGGGGAATCCGTCTCCACTCTGACGATCCAGCGCACATAGCAGGAGGACTCGGCCGTGTATCTCTGTGCCAGCATCCCATAAACACCCCTAGCGGCCTAGCCAAAAACATTCAGTACTTCGGCGCCGGGACCCGGCTCTCAGTGCTGG
9;GGTGCTGTCGTCTCTCAACATCCGAGCTGGGTTATCTGTAAGAGTGGAACCTCTGTGAAGATCGAGTGCCGTTCCCTGGACTTTCAGGCCACAACTATGTTTTGGTATCGTCAGTTCCCGAAACAGAGTCTCATGCTGATGGCAACTTCCAATGAGGGCTCCAAGGCCACATACGAGCAAGGCGTCGAGAAGGACAAGTTTCTCATCAACCATGCAAGCCTGACCTTGTCCACTCTGACAGTGACCAGTGCCCATCCTGAAGACAGCAGCTTCTACATCTGCAGTGGGACAGAGTCTCCTACGAGCAGTACGTCGGGCCGGGCACCAGGCTCACGGTCACAG
"""


class MyTestCase(unittest.TestCase):
    def setUp(self) -> None:
        self.tmp_dir = tempfile.TemporaryDirectory(dir=".", prefix="pre_proc_test")

        with open(self.fln_dict[fln_key], mode='w') as ofile:
            ofile.write(str_mock_VDJ_fln_dict[fln_key])

        # Write a ref genome to use in other tests.
        self.ref_genome_path_dir = self.tmp_dir.name + "/ref_genome"
        os.makedirs(self.ref_genome_path_dir)

        self.model_path_dir = self.tmp_dir.name + "/models"
        os.makedirs(self.model_path_dir)

        for fln_key in self.fln_dict.keys():
            if fln_key in str_mock_VDJ_fln_dict.keys():
                with open(self.fln_dict[fln_key], mode='w') as ofile:
                    ofile.write(str_mock_VDJ_fln_dict[fln_key])
    def test_something(self):
        task = IgorTask.default_model("human", "beta")
        df =
        task.pre_processing_input


if __name__ == '__main__':
    unittest.main()
