Ejemplo n.º 1
0
 def test_reference(self):
     """The 'reference' command."""
     # Empty/unspecified antitargets
     nlines = linecount("formats/amplicon.cnr") - 1
     ref = commands.do_reference(["formats/amplicon.cnr"], ["formats/empty"])
     self.assertEqual(len(ref), nlines)
     ref = commands.do_reference(["formats/amplicon.cnr"])
     self.assertEqual(len(ref), nlines)
     # Empty/unspecified antitargets, flat reference
     nlines = linecount("formats/amplicon.bed")
     ref = commands.do_reference_flat("formats/amplicon.bed",
                                      "formats/empty")
     self.assertEqual(len(ref), nlines)
     ref = commands.do_reference_flat("formats/amplicon.bed")
     self.assertEqual(len(ref), nlines)
Ejemplo n.º 2
0
 def test_reference(self):
     # Empty antitargets
     ref = commands.do_reference(["formats/amplicon.cnr"], ["formats/empty"])
     self.assertTrue(len(ref) > 0)
     # Empty antitargets, flat reference
     ref = commands.do_reference_flat("formats/amplicon.bed",
                                      "formats/empty")
     self.assertTrue(len(ref) > 0)
Ejemplo n.º 3
0
 def test_reference(self):
     """The 'reference' command."""
     # Empty antitargets
     ref = commands.do_reference(["formats/amplicon.cnr"], ["formats/empty"])
     self.assertGreater(len(ref), 0)
     # Empty antitargets, flat reference
     ref = commands.do_reference_flat("formats/amplicon.bed",
                                      "formats/empty")
     self.assertGreater(len(ref), 0)
Ejemplo n.º 4
0
 def test_reference(self):
     """The 'reference' command."""
     # Empty antitargets
     ref = commands.do_reference(["formats/amplicon.cnr"], ["formats/empty"])
     self.assertGreater(len(ref), 0)
     # Empty antitargets, flat reference
     ref = commands.do_reference_flat("formats/amplicon.bed",
                                      "formats/empty")
     self.assertGreater(len(ref), 0)
Ejemplo n.º 5
0
 def test_reference(self):
     """The 'reference' command."""
     # Empty/unspecified antitargets
     nlines = linecount("formats/amplicon.cnr") - 1
     ref = commands.do_reference(["formats/amplicon.cnr"], ["formats/empty"])
     self.assertEqual(len(ref), nlines)
     ref = commands.do_reference(["formats/amplicon.cnr"])
     self.assertEqual(len(ref), nlines)
     # Empty/unspecified antitargets, flat reference
     nlines = linecount("formats/amplicon.bed")
     ref = commands.do_reference_flat("formats/amplicon.bed",
                                      "formats/empty")
     self.assertEqual(len(ref), nlines)
     ref = commands.do_reference_flat("formats/amplicon.bed")
     self.assertEqual(len(ref), nlines)
     # Misc
     ref = cnvlib.read('formats/reference-tr.cnn')
     targets, antitargets = reference.reference2regions(ref)
     self.assertLess(0, len(antitargets))
     self.assertEqual(len(antitargets), (ref['gene'] == 'Background').sum())
     self.assertEqual(len(targets), len(ref) - len(antitargets))
Ejemplo n.º 6
0
 def test_reference(self):
     """The 'reference' command."""
     # Empty/unspecified antitargets
     nlines = linecount("formats/amplicon.cnr") - 1
     ref = commands.do_reference(["formats/amplicon.cnr"], ["formats/empty"])
     self.assertEqual(len(ref), nlines)
     ref = commands.do_reference(["formats/amplicon.cnr"])
     self.assertEqual(len(ref), nlines)
     # Empty/unspecified antitargets, flat reference
     nlines = linecount("formats/amplicon.bed")
     ref = commands.do_reference_flat("formats/amplicon.bed",
                                      "formats/empty")
     self.assertEqual(len(ref), nlines)
     ref = commands.do_reference_flat("formats/amplicon.bed")
     self.assertEqual(len(ref), nlines)
     # Misc
     ref = cnvlib.read('formats/reference-tr.cnn')
     targets, antitargets = reference.reference2regions(ref)
     self.assertLess(0, len(antitargets))
     self.assertEqual(len(antitargets), (ref['gene'] == 'Background').sum())
     self.assertEqual(len(targets), len(ref) - len(antitargets))