def test_phaseDiagramDefinitions(self):
        base = "EKEKEKEKEKEKEK"
        sequences = []
        phaseplotreg = []
        for extender in ['E', 'K', 'G', 'GK', 'GE']:
            for i in range(0, 50):
                if i > 20:
                    if i % 2 == 0:
                        continue
                if i > 30:
                    if i % 3 == 0:
                        continue

                sequences.append(
                    sequenceParameters.SequenceParameters(base + extender * i))
                phaseplotreg.append(
                    sequenceParameters.SequenceParameters(
                        base + extender * i).get_phasePlotRegion())

        plots.save_multiple_phasePlot2(
            sequences, 'tmpfiles/check_phasePlot_regions_match', phaseplotreg)
    def test_phaseDiagramDefinitions(self):
        base = "EKEKEKEKEKEKEK"
        sequences = []
        phaseplotreg = []
        for extender in ['E', 'K', 'G', 'GK', 'GE']:
            for i in range(0, 50):
                if i > 20:
                    if i % 2 == 0:
                        continue
                if i > 30:
                    if i % 3 == 0:
                        continue

                sequences.append(
                    sequenceParameters.SequenceParameters(
                        base + extender * i))
                phaseplotreg.append(
                    sequenceParameters.SequenceParameters(
                        base + extender * i).get_phasePlotRegion())

        plots.save_multiple_phasePlot2(
            sequences,
            'tmpfiles/check_phasePlot_regions_match',
            phaseplotreg)
예제 #3
0
    def test_save_multiple_phasePlot2(self):

        rseq2 = sequenceParameters.SequenceParameters(testTools.generate_random_sequence(minLen=20, maxLen=500))

        plots.save_multiple_phasePlot2([self.rseq, rseq2], "tmpfiles/mult_PP", ["a", "b"], "TEST TITLE")
        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2], "tmpfiles/mult_PP_NO_LEGEND", ["a", "b"], "TEST TITLE", False
        )
        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2],
            "tmpfiles/mult_PP_NO_LEGEND_xLim1",
            ["a", "b"],
            title="TEST TITLE",
            legendOn=False,
            xLim=1,
        )
        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2],
            "tmpfiles/mult_PP_NO_LEGEND_xlim2",
            ["a", "b"],
            title="TEST TITLE",
            legendOn=False,
            xLim=2,
        )
        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2],
            "tmpfiles/mult_PP_NO_LEGEND_xlim2_ylim2",
            ["a", "b"],
            title="TEST TITLE",
            legendOn=False,
            xLim=2,
            yLim=2,
        )
        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2],
            "tmpfiles/mult_PP_NO_LEGEND_xlim2_ylim2_fs_20",
            ["a", "b"],
            title="TEST TITLE",
            legendOn=False,
            xLim=2,
            yLim=2,
            fontSize=20,
        )
예제 #4
0
    def test_save_multiple_phasePlot2(self):

        rseq2 = sequenceParameters.SequenceParameters(
            testTools.generate_random_sequence(minLen=20, maxLen=500))

        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2], 'tmpfiles/mult_PP', ['a', 'b'], 'TEST TITLE')
        plots.save_multiple_phasePlot2(
            [self.rseq, rseq2], 'tmpfiles/mult_PP_NO_LEGEND', ['a', 'b'], 'TEST TITLE', False)
        plots.save_multiple_phasePlot2([self.rseq,
                                        rseq2],
                                       'tmpfiles/mult_PP_NO_LEGEND_xLim1.png',
                                       ['a',
                                        'b'],
                                       title='TEST TITLE',
                                       legendOn=False,
                                       xLim=1)

        plots.save_multiple_phasePlot2([self.rseq,
                                        rseq2],
                                       'tmpfiles/mult_PP_NO_LEGEND_xlim2.png',
                                       ['a',
                                        'b'],
                                       title='TEST TITLE',
                                       legendOn=False,
                                       xLim=2)

        plots.save_multiple_phasePlot2([self.rseq,
                                        rseq2],
                                       'tmpfiles/mult_PP_NO_LEGEND_xlim2_ylim2.png',
                                       ['a',
                                        'b'],
                                       title='TEST TITLE',
                                       legendOn=False,
                                       xLim=2,
                                       yLim=2)

        plots.save_multiple_phasePlot2([self.rseq,
                                        rseq2],
                                       'tmpfiles/mult_PP_NO_LEGEND_xlim2_ylim2_fs_20.png',
                                       ['a',
                                        'b'],
                                       title='TEST TITLE',
                                       legendOn=False,
                                       xLim=2,
                                       yLim=2,
                                       fontSize=20)

        plots.save_multiple_phasePlot2([self.rseq,
                                        rseq2],
                                       'tmpfiles/mult_PP_NO_LEGEND_xlim2_ylim2_fs_20.pdf',
                                       ['a',
                                        'b'],
                                       title='TEST TITLE',
                                       legendOn=False,
                                       xLim=2,
                                       yLim=2,
                                       fontSize=20,
                                       saveFormat='pdf')