def setUp(self):
     
     self.solution ={'A':allele("A"),
                     'T':allele("T"),
                     'C':allele("C"),
                     'G':allele("G"),
                     '-':allele("-")}
     self.solution["A"].count = 11
     self.solution["A"].freq = 11/18.0
     self.solution["T"].count = 4
     self.solution["T"].freq = 4/18.0
     self.solution["C"].count = 1
     self.solution["C"].freq = 1/18.0
     self.solution["G"].count = 1
     self.solution["G"].freq = 1/18.0
     self.solution["-"].count = 1
     self.solution["-"].freq = 1/18.0
     self.pileup = "AAAAATTAATTAAA-AGC"
     self.l = locus(pos =0)
     for b in self.pileup:
         self.l.update(b)
 def test_outside_splice(self):
     output = {
         "ORF": "myFavoriteProtien",
         "codonPos": None,
         "codingPos": None,
         "aminoAcidPos": None,
         "consensusAA": None,
         "varAA": None,
         "classification": "Noncoding"
     }
     a = allele("T")
     a.classifyVar(self.sequence, self.codingRegion[0], 1)
     self.assertEqual(output, a.mutationalClass[0])
 def test_stop(self):
     output = {
         "ORF": "myFavoriteProtien_alternate_splice",
         "codonPos": 0,
         "codingPos": 3,
         "aminoAcidPos": 1,
         "consensusAA": "E",
         "varAA": "*",
         "classification": "Stop"
     }
     a = allele("T")
     a.classifyVar(self.sequence, self.codingRegion[1], 6)
     self.assertEqual(output, a.mutationalClass[0])
 def test_readthrough(self):
     output = {
         "ORF": "myFavoriteProtien",
         "codonPos": 0,
         "codingPos": 15,
         "aminoAcidPos": 5,
         "consensusAA": "*",
         "varAA": "E",
         "classification": "Readthrough"
     }
     a = allele("G")
     a.classifyVar(self.sequence, self.codingRegion[0], 25)
     self.assertEqual(output, a.mutationalClass[0])
 def test_S(self):
     output = {
         "ORF": "myFavoriteProtien",
         "codonPos": 2,
         "codingPos": 14,
         "aminoAcidPos": 4,
         "consensusAA": "E",
         "varAA": "E",
         "classification": "Synonymous"
     }
     a = allele("G")
     a.classifyVar(self.sequence, self.codingRegion[0], 24)
     self.assertEqual(output, a.mutationalClass[0])
 def test_NS(self):
     output = {
         "ORF": "myFavoriteProtien",
         "codonPos": 0,
         "codingPos": 3,
         "aminoAcidPos": 1,
         "consensusAA": "A",
         "varAA": "P",
         "classification": "Nonsynonymous"
     }
     a = allele("C")
     a.classifyVar(self.sequence, self.codingRegion[0], 6)
     self.assertEqual(output, a.mutationalClass[0])
 def test_indel(self):
     output = {
         "ORF": "myFavoriteProtien",
         "codonPos": 1,
         "codingPos": 1,
         "aminoAcidPos": 0,
         "consensusAA": "M",
         "varAA": None,
         "classification": "Indel"
     }
     a = allele("-")
     a.classifyVar(self.sequence, self.codingRegion[0], 4)
     self.assertEqual(output, a.mutationalClass[0])
    def setUp(self):

        self.solution = {
            'A': allele("A"),
            'T': allele("T"),
            'C': allele("C"),
            'G': allele("G"),
            '-': allele("-")
        }
        self.solution["A"].count = 11
        self.solution["A"].freq = 11 / 18.0
        self.solution["T"].count = 4
        self.solution["T"].freq = 4 / 18.0
        self.solution["C"].count = 1
        self.solution["C"].freq = 1 / 18.0
        self.solution["G"].count = 1
        self.solution["G"].freq = 1 / 18.0
        self.solution["-"].count = 1
        self.solution["-"].freq = 1 / 18.0
        self.pileup = "AAAAATTAATTAAA-AGC"
        self.l = locus(pos=0)
        for b in self.pileup:
            self.l.update(b)