コード例 #1
0
 def test_full_merge(self):
     """
     Tests from main() entry for single star file.
     """
     args = FakeArgs()
     args.input = [self.star_counts_1, self.star_counts_2]
     args.output = self.out_test_pfx + ".1_2.tsv.gz"
     self.to_remove.append(args.output)
     main(args)
     with gzip.open(self.exp_star_1_2,
                    "rt") as fh, gzip.open(args.output, "rt") as ofh:
         exp = fh.read()
         found = ofh.read()
         self.assertEqual(exp, found)
     os.remove(args.output)
コード例 #2
0
 def test_full_junction_single(self):
     """
     Tests the the whole main() function of junction merge for
     a single file.
     """
     args = FakeArgs()
     args.input = [self.star_junctions_1]
     args.output = self.out_test_pfx + ".1.tsv.gz"
     self.to_remove.append(args.output)
     main(args)
     with gzip.open(self.exp_star_1,
                    "rt") as fh, gzip.open(args.output, "rt") as ofh:
         exp = fh.read()
         found = ofh.read()
         self.assertEqual(exp, found)
     os.remove(args.output)
コード例 #3
0
    def test_full_run(self):
        """
        Full end-to-end test
        """
        outfile = 'main_output.tsv'
        self.to_remove.append(outfile)

        args = FakeArgs()
        args.input = self.ts1_counts_file
        args.gene_info = self.ts1_gene_info_file
        args.output = outfile
        args.gencode_version = 36
        self.to_remove.append(args.output)

        main(args)

        result = pd.read_table(args.output, comment='#')
        expected = pd.read_table(self.ts1_final_file, comment='#')
        pd.testing.assert_frame_equal(result, expected)