def test_save_rarefaction_data(self):
        """save_rarefaction_data: This tests the rarefaction average output"""

        exp = [
            "# test.txt\n",
            "# SampleID\n",
            "xaxis: 10.0\t\n",
            "xmax: 140\n",
            ">> Sample1\n",
            "color #7fff00\n",
            "series ",
            "2.03172\t9.441785\t12.508435\t\n",
            "error ",
            "nan\tnan\tnan\t\n",
        ]

        obs = save_rarefaction_data(
            self.ave_seqs_per_sample1,
            self.data["xaxis"],
            self.xmax,
            self.mapping_category,
            self.colors2,
            "test.txt",
            self.data_colors,
            self.groups,
            self.std_type,
        )

        self.assertEqual(obs, exp)
Beispiel #2
0
 def test_save_rarefaction_data(self):
     '''save_rarefaction_data: This tests the rarefaction average output'''
     
     exp=['# test.txt\n', '# SampleID\n', 'xaxis: 10.0\t\n', 'xmax: 140\n', '>> Sample1\n', 'color #7fff00\n', 'series ', '2.03172\t9.441785\t12.508435\t\n', 'error ', 'nan\tnan\tnan\t\n']
     
     obs=save_rarefaction_data(self.ave_seqs_per_sample1,self.data['xaxis'],\
                               self.xmax,self.mapping_category,self.colors2,\
                               'test.txt',self.data_colors,self.groups)
                 
     self.assertEqual(obs,exp)