Ejemplo n.º 1
0
 def test_remap_invalid_assembly(self):
     s = SNPs("tests/input/GRCh37.csv")
     chromosomes_remapped, chromosomes_not_remapped = s.remap(-1)
     self.assertEqual(s.build, 37)
     self.assertEqual(s.assembly, "GRCh37")
     self.assertEqual(len(chromosomes_remapped), 0)
     self.assertEqual(len(chromosomes_not_remapped), 2)
Ejemplo n.º 2
0
 def f():
     s = SNPs("tests/input/GRCh37.csv")
     chromosomes_remapped, chromosomes_not_remapped = s.remap(36)
     self.assertEqual(s.build, 36)
     self.assertEqual(s.assembly, "NCBI36")
     self.assertEqual(len(chromosomes_remapped), 2)
     self.assertEqual(len(chromosomes_not_remapped), 0)
     pd.testing.assert_frame_equal(s.snps, self.snps_NCBI36(), check_exact=True)
Ejemplo n.º 3
0
 def test_remap_37_to_37(self):
     s = SNPs("tests/input/GRCh37.csv")
     chromosomes_remapped, chromosomes_not_remapped = s.remap(37)
     self.assertEqual(s.build, 37)
     self.assertEqual(s.assembly, "GRCh37")
     self.assertEqual(len(chromosomes_remapped), 0)
     self.assertEqual(len(chromosomes_not_remapped), 2)
     pd.testing.assert_frame_equal(s.snps, self.snps_GRCh37(), check_exact=True)
Ejemplo n.º 4
0
 def f():
     s = SNPs("tests/input/NCBI36.csv", parallelize=True)
     chromosomes_remapped, chromosomes_not_remapped = s.remap(37)
     self.assertEqual(s.build, 37)
     self.assertEqual(s.assembly, "GRCh37")
     self.assertEqual(len(chromosomes_remapped), 2)
     self.assertEqual(len(chromosomes_not_remapped), 0)
     pd.testing.assert_frame_equal(s.snps, self.snps_GRCh37(), check_exact=True)
Ejemplo n.º 5
0
 def test_remap_no_snps(self):
     s = SNPs()
     chromosomes_remapped, chromosomes_not_remapped = s.remap(38)
     self.assertFalse(s.build)
     self.assertEqual(len(chromosomes_remapped), 0)
     self.assertEqual(len(chromosomes_not_remapped), 0)