def setUp(self): if not pysam.config.HAVE_LIBCURL or not check_url(self.url): self.remote_file = None else: self.remote_file = pysam.TabixFile(self.url, "r") self.local_file = pysam.TabixFile(self.local, "r")
def setUp(self): if not check_url(self.url): self.remote_file = None else: self.remote_file = pysam.TabixFile(self.url, "r") self.local_file = pysam.TabixFile(self.local, "r")
def testFTPView(self): if not check_url(self.url): return try: with pysam.Fastafile(self.url) as f: self.assertEqual(len(f.fetch("chr1", 0, 1000)), 1000) except (OSError, IOError): pass
def test_sequence_lengths_are_available(self): if not check_url(self.url): return with pysam.Fastafile(self.url) as f: self.assertEqual(len(f.references), 3366) self.assertTrue("chr1" in f.references) self.assertEqual(f.lengths[0], 248956422) self.assertEqual(f.get_reference_length("chr1"), 248956422)
def testFTPView(self): if not check_url(self.url): return with pysam.Fastafile(self.url) as f: self.assertEqual(len(f.fetch("chr1", 0, 1000)), 1000)