Ejemplo n.º 1
0
 def test_export_theta(self):
     """The 'export theta' command."""
     segarr = cnvlib.read("formats/tr95t.cns")
     len_seg_auto = len(segarr.autosomes())
     table_theta = export.export_theta(segarr, None)
     self.assertEqual(len(table_theta), len_seg_auto)
     ref = cnvlib.read("formats/reference-tr.cnn")
     table_theta = export.export_theta(segarr, ref)
     self.assertEqual(len(table_theta), len_seg_auto)
     varr = commands.load_het_snps("formats/na12878_na12882_mix.vcf",
                                   "NA12882", "NA12878", 15, None)
     tumor_snps, normal_snps = export.export_theta_snps(varr)
     self.assertLess(len(tumor_snps), len(varr))
     self.assertGreater(len(tumor_snps), 0)
     self.assertLess(len(normal_snps), len(varr))
     self.assertGreater(len(normal_snps), 0)
Ejemplo n.º 2
0
 def test_export_theta(self):
     """The 'export theta' command."""
     segarr = cnvlib.read("formats/tr95t.cns")
     len_seg_auto = len(segarr.autosomes())
     table_theta = export.export_theta(segarr, None)
     self.assertEqual(len(table_theta), len_seg_auto)
     ref = cnvlib.read("formats/reference-tr.cnn")
     table_theta = export.export_theta(segarr, ref)
     self.assertEqual(len(table_theta), len_seg_auto)
     varr = commands.load_het_snps("formats/na12878_na12882_mix.vcf",
                                   "NA12882", "NA12878", 15, None)
     tumor_snps, normal_snps = export.export_theta_snps(varr)
     self.assertLess(len(tumor_snps), len(varr))
     self.assertGreater(len(tumor_snps), 0)
     self.assertLess(len(normal_snps), len(varr))
     self.assertGreater(len(normal_snps), 0)